[R-SIG-Mac] FreeType on osx

Simon Urbanek simon.urbanek at r-project.org
Sat Mar 15 23:02:39 CET 2008


On Mar 15, 2008, at 1:30 PM, Duncan Murdoch wrote:

> I'm trying to add FreeType support to rgl.  I see that there are
> versions that ship with OSX, and also versions on DarwinPorts and  
> fink.
>  What would be the recommended advice to users on this, and what would
> a configure script need in order to find FreeType?
>

FreeType is a bit of a pain (I'll elaborate on that below). For CRAN  
binaries of packages that use FreeType we use a static build instead  
of the system one because those are too old. From a package's point of  
view it's easy, though, because you only have to ask pkgconfig or  
freetype-config. I wouldn't bother doing anything Mac-specific,  
because both Tiger and Leopard have freetype-config, but their  
versions are too old or buggy to bother.


> On Linux, looking for freetype-config works, but that's not working  
> on  my OSX 10.4 laptop.

It should - do you have X11 on your PATH?


>  Would it work in Leopard out of the box, or does a user need to  
> install FreeType explicitly?
>

Sort of - X11 in Leopard is broken out of the box, so you have to fix  
that first, but once you do, it works. Both Tiger and Leopard come  
with FreeType.

The real problem is that FreeType (even the last release) is somewhat  
broken on OS X. It doesn't support system fonts properly. The CVS  
version is a bit better, but still has a bug that causes font styles  
to be mixed up. In addition, it is incompatible with the one shipped  
in the OS. But anyhow, I don't think you should worry about all this  
as a package maintainer - I'll have to sort those things out anyway  
now that we use FreeType in R :).

Cheers,
Simon



More information about the R-SIG-Mac mailing list