summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuliusz Chroboczek <jch@pps.jussieu.fr>2008-05-10 23:56:33 +0200
committerJuliusz Chroboczek <jch@pps.jussieu.fr>2008-05-10 23:56:33 +0200
commitc322c79c2b9b8d6075b6782d572033cc50799a49 (patch)
tree251b00c3e0888c02e613bd9de543c4d94f5861fa
parent5db9e13aafbed8c0562838005147ebefb12d08ac (diff)
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.
-rw-r--r--mkfontscale.c6
1 files 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)