src/inc/memgfx.h 1.29

1.29 2010/04/22 19:35:38 kent
Refactoring font-for-size code so that Table Browser can reuse it, and thus not make an error message in correlation page.
Index: src/inc/memgfx.h
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/inc/memgfx.h,v
retrieving revision 1.28
retrieving revision 1.29
diff -b -B -U 4 -r1.28 -r1.29
--- src/inc/memgfx.h	6 Apr 2010 20:12:46 -0000	1.28
+++ src/inc/memgfx.h	22 Apr 2010 19:35:38 -0000	1.29
@@ -266,8 +266,23 @@
 
 int mgFontCharWidth(MgFont *font, char c);
 /* How wide is a character? */
 
+char *mgFontSizeBackwardsCompatible(char *size);
+/* Given "size" argument that may be in old tiny/small/medium/big/huge format,
+ * return it in new numerical string format. Do NOT free the return string*/
+
+MgFont *mgFontForSizeAndStyle(char *textSize, char *fontType);
+/* Get a font of given size and style.  Abort with error message if not found.
+ * The textSize should be 6,8,10,12,14,18,24 or 34.  For backwards compatibility
+ * textSizes of "tiny" "small", "medium", "large" and "huge" are also ok.
+ * The fontType should be "medium", "bold", or "fixed" */
+
+MgFont *mgFontForSize(char *textSize);
+/* Get a font of given size and style.  Abort with error message if not found.
+ * The textSize should be 6,8,10,12,14,18,24 or 34.  For backwards compatibility
+ * textSizes of "tiny" "small", "medium", "large" and "huge" are also ok. */
+
 void mgFillUnder(struct memGfx *mg, int x1, int y1, int x2, int y2, 
 	int bottom, Color color);
 /* Draw a 4 sided filled figure that has line x1/y1 to x2/y2 at
  * it's top, a horizontal line at bottom at it's bottom,  and