#34072: gnuplot & gd: Could not find/open font when opening font "arial" --------------------------------------------+------------------------------- Reporter: mojca.miklavec.lists@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.4 Keywords: | Port: gnuplot --------------------------------------------+------------------------------- Comment(by mojca.miklavec.lists@…): Replying to [comment:3 and.damore@…]:
I remember that I saw it working earlier and I have no idea why it
still complains. But anyway, Ethan's patch might be worth exploring even if this particular issue with "arial not found" goes away. I can still imagine that users put fonts to exotic places and change fontconfig's configuration. In those cases simply setting the three default paths to fonts doesn't suffice anyway.
In that case it would be the user's task to set the software
accordingly. Default path values are for default case. But if GD is able to use fontconfig (and gnuplot links against fontconfig anyway), there is no reason why it shouldn't listen to user's configuration of fontconfig out of the box. I mean: if there is a trivial patch to enable that behaviour. I certainly wouldn't try to reinvent the wheel to get it working.
IIRC I had issues with the recursive paths so I removed the exclamation marks, if you think those are not needed we can remove the patch for sure.
Is there any way that you could recall what issues exactly? I have fonts in /Library/Fonts/Microsoft for example. I don't claim that I would want to use them in Gnuplot, but there is a valid reason why one would not want to exclude subfolders.
I'm not a gnuplot user so I'm not aware how to list/test available fonts.
I will try to find some example using subfolder.
Since MacPorts now has the necessary patch in gd2 (r92005), we could fix gnuplot in MacPorts before the patch is included in gnuplot upstream. But I would like to do some additional testing with both PostScript and GD (png) terminals before committing anything.
I wouldn't suggest to patch it in Macports if upstream is aware of the issue and ready to patch. I'd rather ask for GD to release a new patched version so gnuplot can push the updated version too.
The main problem is: how do you convince GD to release a new version? They don't even have a working webpage and it doesn't seem like they are going to release a new version any time soon. I'm not exactly sure (website isn't working), but some sources suggest that last stable version was released in 2007, five years ago.
Back to this ticket:
what does '''show fontpath''' output at gnuplot's prompt?
{{{
show fontpath
fontpath is system fontpath is "/System/Library/Fonts" "/Library/Fonts" "/Users/myusername/Library/Fonts" }}} However I have a question for you. I'm not sure if it is relevant, but what does fc-list arial return you? I get {{{ /Library/Fonts/Microsoft/Arial Bold.ttf: Arial:style=Krepko,Negreta,tučné,fed,Fett,Έντονα,Bold,Negrita,Lihavoitu,Gras,Félkövér,Grassetto,Vet,Halvfet,Pogrubiony,Negrito,Полужирный,Fet,Kalın,đậm,Lodia /Library/Fonts/Microsoft/Arial Italic.ttf: Arial:style=Poševno,Cursiva,kurzíva,kursiv,Πλάγια,Italic,Kursivoitu,Italique,Dőlt,Corsivo,Cursief,Kursywa,Itálico,Курсив,İtalik,nghiêng,Etzana /Library/Fonts/Microsoft/Arial Bold Italic.ttf: Arial:style=Krepko poševno,Negreta cursiva,tučné kurzíva,fed kursiv,Fett Kursiv,Έντονα Πλάγια,Bold Italic,Negrita Cursiva,Lihavoitu Kursivoi,Gras Italique,Félkövér dőlt,Grassetto Corsivo,Vet Cursief,Halvfet Kursiv,Pogrubiona kursywa,Negrito Itálico,Полужирный Курсив,Tučná kurzíva,Fet Kursiv,Kalın İtalik,nghiêng đậm,Lodi etzana /Library/Fonts/Microsoft/Arial.ttf: Arial:style=Navadno,Normal,obyčejné,Standard,Κανονικά,Regular,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,thường,Arrunta }}}
can you reproduce the issue with fresh install of '''gd''' and '''gnuplot''' ports?
I'll try to uninstall gnuplot 4.6.0 first and try it without upgrading gd2, then upgrade gd2, and report back. I will also try if I can disable gd2 ("set term png" can also result in pngcairo if gd2 library is missing). It is unlikely that you are using pngcairo when you switch to png (you probably also disabled pango/cairo during testing), but it might be worth checking, just in case. -- Ticket URL: <https://trac.macports.org/ticket/34072#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS