[R-SIG-Mac] Possible mac-specific bug in svg (cairo) graphics

Yan Wong yan at pixie.org.uk
Fri Jan 30 12:26:50 CET 2009

On 29 Jan 2009, at 15:29, Simon Urbanek wrote:

> You can enable fontconfig debug using FC_DEBUG=1 -- that will at  
> least tell you what fontconfig found.

Thanks. That's helpful.

> To make things worse, FreeType on Mac is quite buggy and screws up  
> numbering of fonts within a container which results in incorrect  
> styles - it is something we try to work around, but if FT  
> recognizes the wrong style we can't do anything about it.

I managed to figure this out after playing with it a bit (using the  
Cairo package allows you to control what font styles are used).  
Oddly, the CairoFontMatch() function correctly identifies a font  
using the normal font specs, but then the Cairo() call doesn't seem  
to use the same one.

> From what I can see this is what happens -- the main difference  
> between 10.4 and 10.5 is that Arial and friends are supplied as (rf- 
> style) font suitcases in 10.4 which is what FT has trouble dealing  
> with. In 10.5 they come as individual fonts which FT can deal with  
> just fine.

In case other people have the same problem, I got around it by using  
a 3rd party utility (fontu) to separate out the faces within the  
Verdana font file into separate .ttf files, which were then used  
sensibly by CairoSVG.

> I know that this is catching straws, but of one the few fonts that  
> come as TTF in 10.4 is "Euphemia UCAS", so this will produce italic  
> output even on 10.4:


> Although this is a nuisance, working around bugs in 3rd party  
> libraries on older systems is not high on my priority list, os I  
> cannot promise anything, but maybe I'll get to it...

Of course - don't worry about it, and thanks for the help.


More information about the R-SIG-Mac mailing list