1 /****************************************************************************
2 * RRDtool 1.2rc4 Copyright by Tobi Oetiker, 1997-2005
3 ****************************************************************************
4 * rrd_afm.h Parsing afm tables to find width of strings.
5 ****************************************************************************/
10 /* measure width of a text string */
11 /* fontname can be full name or postscript name */
12 double afm_get_text_width ( double start, const char* font, double size,
13 double tabwidth, const char* text);
15 /* get postscript name from fullname or postscript name */
16 const char *afm_get_font_postscript_name ( const char* font);
18 /* cc -E -dM /dev/null */
20 /* need charset conversion from macintosh to unicode. */
21 extern const unsigned char afm_mac2iso[128];
22 #define afm_host2unicode(c) \
23 ( (c) >= 128 ? afm_mac2iso[(c) - 128] : (c))
26 #define afm_host2unicode(a_unsigned_char) ((unsigned int)(a_unsigned_char))