From c322c79c2b9b8d6075b6782d572033cc50799a49 Mon Sep 17 00:00:00 2001 From: Juliusz Chroboczek Date: Sat, 10 May 2008 23:56:33 +0200 Subject: Fix handling of OpenType/CFF fonts with embedded bitmaps. The old workaround would trigger with CFF fonts with embedded bitmaps. We now explicitly check for the font format being TrueType. Reported by Andrey V. Panov. --- mkfontscale.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mkfontscale.c b/mkfontscale.c index 2634fcd..e6aacd7 100644 --- a/mkfontscale.c +++ b/mkfontscale.c @@ -41,6 +41,7 @@ #include FT_TRUETYPE_IDS_H #include FT_TYPE1_TABLES_H #include FT_BDF_H +#include FT_XFREE86_H #include "list.h" #include "hash.h" @@ -848,8 +849,9 @@ doDirectory(char *dirname_given, int numEncodings, ListPtr encodingsToDo) isBitmap = ((face->face_flags & FT_FACE_FLAG_SCALABLE) == 0); if(!isBitmap) { - /* Workaround for bitmap-only TTF fonts */ - if(face->num_fixed_sizes > 0) { + /* Workaround for bitmap-only SFNT fonts */ + if(FT_IS_SFNT(face) && face->num_fixed_sizes > 0 && + strcmp(FT_Get_X11_Font_Format(face), "TrueType") == 0) { TT_MaxProfile *maxp; maxp = FT_Get_Sfnt_Table(face, ft_sfnt_maxp); if(maxp != NULL && maxp->maxContours == 0) -- cgit v1.2.3