diff options
author | Christopher Zimmermann <madroach@gmerlin.de> | 2020-07-18 08:39:01 +0200 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2020-09-22 22:00:38 +0000 |
commit | 19412d9ac3fb7f00346273cfe914601c844f5872 (patch) | |
tree | d862bb2684bb68e5f8e83fb7bbe93b2ed57438e7 /read.c | |
parent | 1fa97fdc6dc900728be8523be89096b4cb117d4d (diff) |
Add warnings when wrapping multiple fonts and on PCF fonts
Diffstat (limited to 'read.c')
-rw-r--r-- | read.c | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -29,6 +29,7 @@ THE SOFTWARE. #include FT_FREETYPE_H #include FT_MODULE_H #include FT_BDF_H +#include FT_FONT_FORMATS_H #include "X11/Xos.h" #include "fonttosfnt.h" #include "X11/fonts/fontenc.h" @@ -102,7 +103,7 @@ readFile(char *filename, FontPtr font) BitmapPtr bitmap; int symbol = 0; int force_unicode = 1; - char *encoding_name = NULL; + const char *encoding_name, *file_format; FontMapPtr mapping = NULL; FontMapReversePtr reverse = NULL; @@ -133,6 +134,15 @@ readFile(char *filename, FontPtr font) return -1; } + file_format = FT_Get_Font_Format(face); + if(strcmp(file_format, "BDF") != 0) + fprintf(stderr, + "font file %s is of format %s.\n" + "It's recommended to convert directly from a BDF font.\n" + "Some font properties may get lost when converting via a PCF font.\n", + filename ? filename : "<stdin>", + file_format); + /* FreeType will insist on encodings which are simple subsets of unicode * to be read as unicode regardless of what we call them. */ for(j = 0; j < face->num_charmaps; ++j) { |