xref: /csrg-svn/lib/libplot/imagen/linemod.c (revision 25012)
1 /*
2  * Copyright (c) 1985 Regents of the University of California.
3  * All rights reserved.  The Berkeley software License Agreement
4  * specifies the terms and conditions for redistribution.
5  */
6 
7 #ifndef lint
8 static char sccsid[] = "@(#)linemod.c	5.2 (Berkeley) 09/21/85";
9 #endif not lint
10 
11 /*
12  * Hack to set font.
13  */
14 linemod(s)
15 char *s;
16 {
17 	register char *tit;
18 	register char *nam;
19 	int siz = 0;
20 	nam = s;
21 	for(tit = "charset="; *tit; )
22 		if (*tit++ != *nam++)
23 			return;
24 	s = nam;
25 	while(*nam)
26 		switch(*nam++) {
27 		case ',':
28 		case '\n':
29 			*--nam = 0;
30 		}
31 	siz = atoi(++nam);
32 	if (siz == 0) {
33 		while (*--nam >= '0' && *nam <= '9')
34 			;
35 		siz = (atoi(++nam)*4)/3;
36 	}
37 	if (siz == 0)
38 		siz = imPcsize;
39 	setfont(s, siz);
40 }
41