[cairo] Newbie questions on fonts

Fred Clare fred at ucar.edu
Wed Oct 17 11:17:34 PDT 2007


On Oct 17, 2007, at 8:43 AM, Adrian Johnson wrote:

> 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.

I am creating a PostScript file and viewing that with Ghostscript  
which writes to
an X11 window so I am not sure that what I am seeing is the known  
problem
with Preview.

> 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

For one of the fonts I am using that produces the rectangles
(/Library/Fonts/ArialHB.ttf) in a PDF file, pdffonts produces:

name                  type      emb sub uni object ID
--------------------  --------  --- --- --- ---------
SXUHNR+CairoFont-0-0  TrueType  yes yes no       8  0

>
> 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.

I put print statements before all CAIRO_INT_STATUS_UNSUPPORTED returns
in cairo-truetype-subset.c and none was ever executed.

Fred



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cairographics.org/archives/cairo/attachments/20071017/453a9c7b/attachment.html 


More information about the cairo mailing list