Re: gd2 & fontconfig/freetype fail to find fonts on Mac OS X (macports)
[email protected] (Ryan Schmidt) Mon, 13 Apr 2009 02:56:34 -0500
| Newsgroups | php.gd.devel |
|---|---|
| Message-ID | <[email protected]> |
On Apr 13, 2009, at 01:47, Mojca Miklavec wrote: > I'm using Mac OS X 10.5 with GD installed via Macports > (http://gd2.darwinports.com/) and as many others (I think both linux > and mac users), I have problem using some deafult fonts inside gnuplot > when using GD library to generate plots. Please do not refer to that web site for information about MacPorts. That web site is not affiliated with the MacPorts project. For information about MacPorts, go to http://www.macports.org/ For more information on the web site that is not related to our project, please read: http://trac.macports.org/wiki/DarwinPorts >> gnuplot >> set term png > Terminal type set to 'png' > Could not find/open font when opening font "arial", using internal > non-scalable font > Options are 'nocrop medium size 640,480 ' > > Please note that this only happens with recent (maybe only > development) version of gnuplot. I'm working with 4.3 from CVS. In > past, gnuplot simply ignored the fact the GD was not able to find > trutype fonts, it's only recently that it issues a warning. > > But the font in available on computer of course and "fc-list arial" > returns this (+ dozens of translations): > > Arial:style=Bold Italic > Arial:style=Italic > Arial:style=Regular > Arial:style=Bold > > Following instructions on http://www.libgd.org/DOC_INSTALL_OSX I > tried to set > export GDFONTPATH=$HOME/Library/Fonts:/Library/Fonts:/System/ > Library/Fonts > and afterwards it worked OK. > > But the main question is: why doesn't GD find the font out-of-the-box, > without having to give it a hint about GDFONTPATH? It may be a problem > with configuration in macports that ships this library, but it > probably makes more sense to ask here first. I can try to play a bit > with installation following your instructions and then ask on macports > to change some bits in configuration if needed. What I understand from reading that DOC_INSTALL_OSX page you referenced above is that setting GDFONTPATH is only necessary if fontconfig cannot be found. But the gd2 port does declare a dependency on the fontconfig port so it should be there. If there is something I need to change in the gd2 port or the fontconfig port related to this, please copy me on the replies; I am not subscribed to the gd-devel mailing list.