[cairo] Newbie questions on fonts

Adrian Johnson ajohnson at redneon.com
Wed Oct 17 07:43:24 PDT 2007


Fred Clare wrote:
> Well, I just tried X11 output and get the same rectangles using the
> font /Library/Fonts/ArialHB.ttf.  *However* when I try using the Vera
> .ttf fonts they seem to work fine.  So, I think I have quite a few fonts
> to work with.  Is there a way to use the fonts distributed with  
> Ghostscript
> with freetype?    It would appear that not all .ttf fonts are created
> equal, since I seem to get the rectangles with several of them.  In
> particular I downloaded a greek .ttf font that is producing the  
> rectangles.
> Or, possibly more likely, I am doing something dumb.

The rectangles instead of glyphs bug in Preview only occurs with 
OpenType/CFF fonts. If you are seeing this problem with TrueType fonts 
it is because the TrueType subsetting has failed and a CFF fallback font 
has been embedded.

I previously described how the PDF embedded font typed can be checked here:

http://lists.cairographics.org/archives/cairo/2007-September/011496.html

There is probably a bug in the TrueType subsetting somewhere as it 
should not be failing on fonts that FreeType can display. However I am 
unable to fix this unless I can reproduce the problem on Linux or 
someone on a Mac can find find out which line in cairo-truetype-subset.c 
is returning CAIRO_STATUS_UNSUPPORTED.



More information about the cairo mailing list