[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Devel] Bitmap only sfnt files
From: |
Masatake YAMATO |
Subject: |
Re: [Devel] Bitmap only sfnt files |
Date: |
Sat, 15 May 2004 10:21:59 +0900 (JST) |
> A user of mine complained that a font (which later turned out to be a
> bitmap only sfnt) produced by fontforge worked fine as a system font on
> his mac but did not work with freetype.
>
> The font contains 'bhed', 'bdat' and 'bloc' tables. Is this a format
> that freetype does not support? Or is there a bug either in fontforge's
> generation of this format, or freetype's interpretation of it...
Does the font contains `head' table?
A font which only has 'bhed', 'bdat' and 'bloc' but `head' was found in Mac OS
10.2.
To load(not show:-) the font into FreeType, following patch was needed.
Masatake YAMATO
Index: src/sfnt/ttload.c
===================================================================
RCS file: /cvsroot/freetype2/src/sfnt/ttload.c,v
retrieving revision 1.103
diff -u -r1.103 ttload.c
@@ -225,6 +225,10 @@
if ( FT_STREAM_SEEK( offset + 28 + 16*nn ) )
goto Bad_Format;
}
+#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
+ else if ( table.Tag == TTAG_bhed )
+ goto head_retry;
+#endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */
}
if ( has_head == 0 )