src/lib/gemfont.c 1.10

1.10 2010/03/27 04:23:08 kent
Adding a bunch of xfree fonts. Moving fonts themselves to a font subdirectory. Adding explicit lineHeight to font structure rather than just calculating it.
Index: src/lib/gemfont.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/lib/gemfont.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -b -B -U 4 -r1.9 -r1.10
--- src/lib/gemfont.c	20 Jun 2006 18:17:38 -0000	1.9
+++ src/lib/gemfont.c	27 Mar 2010 04:23:08 -0000	1.10
@@ -188,11 +188,17 @@
 return(widest);
 }
 
 int font_cel_height(struct font_hdr *f)
+/* How tall is font? */
 {
-int dy;
-
-dy = f->frm_hgt;
-return(dy);
+return f->frm_hgt;
 }
 
+int font_line_height(struct font_hdr *f)
+/* How far to next line. */
+{
+int x = f->lineHeight;
+if (x == 0)
+   f->lineHeight = x = f->frm_hgt + 1 + (f->frm_hgt/5);
+return x;
+}