X-Git-Url: https://git.octo.it/?p=rrdtool.git;a=blobdiff_plain;f=src%2Frrd_afm.h;h=655a87382b71dc0b0ea392e121568a03558bc9fb;hp=6a59318986aad2216f01e04b8d211bad611c10f2;hb=7c3ed7b5f7e8ce9b266631dc479c02e795acb180;hpb=0f913ead7c1e1e7ba4976e8763d73c3167f8cf73 diff --git a/src/rrd_afm.h b/src/rrd_afm.h index 6a59318..655a873 100644 --- a/src/rrd_afm.h +++ b/src/rrd_afm.h @@ -7,6 +7,18 @@ #ifndef RRD_AFM_H #define RRD_AFM_H +/* + If the font specified by the name parameter in the routes below + is not found + (because it is not compiled into rrd_afm_data.c by compile_afm.pl) + the font specified by RRD_AFM_DEFAULT_FONT will be used. + If it is not installed, it uses the first font compiled + into rrd_afm_data.c + So they will always use some font. +*/ + +#define RRD_AFM_DEFAULT_FONT "Courier" + /* measure width of a text string */ /* fontname can be full name or postscript name */ double afm_get_text_width ( double start, const char* font, double size, @@ -17,6 +29,7 @@ double afm_get_descender(const char* font, double size); /* get postscript name from fullname or postscript name */ const char *afm_get_font_postscript_name ( const char* font); +const char *afm_get_font_name(const char* font); /* cc -E -dM /dev/null */ #ifdef __APPLE__