xref: /csrg-svn/lib/libplot/imagen/linemod.c (revision 25015)
124997Ssam /*
224997Ssam  * Copyright (c) 1985 Regents of the University of California.
324997Ssam  * All rights reserved.  The Berkeley software License Agreement
424997Ssam  * specifies the terms and conditions for redistribution.
524997Ssam  */
624997Ssam 
724997Ssam #ifndef lint
8*25015Ssam static char sccsid[] = "@(#)linemod.c	5.3 (Berkeley) 09/21/85";
924997Ssam #endif not lint
1024997Ssam 
11*25015Ssam #include "imp.h"
12*25015Ssam 
1325012Ssam /*
1425012Ssam  * Hack to set font.
1525012Ssam  */
1624997Ssam linemod(s)
1724997Ssam char *s;
1824997Ssam {
1925012Ssam 	register char *tit;
2025012Ssam 	register char *nam;
2125012Ssam 	int siz = 0;
2225012Ssam 	nam = s;
2325012Ssam 	for(tit = "charset="; *tit; )
2425012Ssam 		if (*tit++ != *nam++)
2525012Ssam 			return;
2625012Ssam 	s = nam;
2725012Ssam 	while(*nam)
2825012Ssam 		switch(*nam++) {
2925012Ssam 		case ',':
3025012Ssam 		case '\n':
3125012Ssam 			*--nam = 0;
3225012Ssam 		}
3325012Ssam 	siz = atoi(++nam);
3425012Ssam 	if (siz == 0) {
3525012Ssam 		while (*--nam >= '0' && *nam <= '9')
3625012Ssam 			;
3725012Ssam 		siz = (atoi(++nam)*4)/3;
3825012Ssam 	}
3925012Ssam 	if (siz == 0)
4025012Ssam 		siz = imPcsize;
4125012Ssam 	setfont(s, siz);
4224997Ssam }
43