I've just started using PHPlot and created my first graph. The only problem
I'm having is using TTF on our OS X Server. No matter what I try, if I use TTF
fonts (with or without paths, even copying a font to the PHPlot directory),
the graph is not displayed unless I remove SetDefaultTTFont.
Can anyone give me any clues?
TIA
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi... I don't have OS-X, so we are going to have to debug this together.
Are you seeing an image with an error message? PHPlot should produce an image
containing an error message (instead of a plot) if it is unable to find the
font. But it sounds like you aren't even getting this.
Do you have access to the web server error log? You are looking for an error
message in the case where you get no output.
I suspect something worse is wrong here, not just unable to find the font.
Have you tried checking the PHP configuration, using a script with just "<?php
phpinfo();" in it? Look for the gd extension section. You should see: FreeType
Support: enabled, FreeType Linkage: with freetype.
Based on what you find, we can try a simple GD+TrueType test and see what
happens.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've been doing a bit of digging on this and it looks like where OS X is
configured and where it keeps various files and directories is different
enough from a standard Unix setup that getting this stuff working is a major
undertaking. I installed phplot on a Windows server and everything worked
exactly as it should!
Many thanks for responding and I already have a different query which I start
a new thread for.
PHPlot, by the way is excellent!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for following up. Maybe there will be another chance some day to get it
working on OS-X. PHPlot already has a few tricks it uses (in the protected
GetDefaultTTFont() function) that lets it find a font by default on a few
systems (Windows, some Linux, Ubuntu-like Linux). It does bother me that it
couldn't find the fonts in your current directory, though.
I did find one issue, that I am including here for future reference because it
might be relevant. There is a bug report opened against PHP, although it is
actually a Freetype problem. The report says that they could not open TT font
files if they were on a mounted CIFS (e.g. Samba) volume. This was due to a
problem with 32-bit vs 64-bit inode numbers, and Freetype being built without
64 bit file offsets (-D_FILE_OFFSET_BITS=64). There was a work-around for
mount.cifs (noserverinfo option).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi All,
I've just started using PHPlot and created my first graph. The only problem
I'm having is using TTF on our OS X Server. No matter what I try, if I use TTF
fonts (with or without paths, even copying a font to the PHPlot directory),
the graph is not displayed unless I remove SetDefaultTTFont.
Can anyone give me any clues?
TIA
Hi... I don't have OS-X, so we are going to have to debug this together.
Are you seeing an image with an error message? PHPlot should produce an image
containing an error message (instead of a plot) if it is unable to find the
font. But it sounds like you aren't even getting this.
Do you have access to the web server error log? You are looking for an error
message in the case where you get no output.
I suspect something worse is wrong here, not just unable to find the font.
Have you tried checking the PHP configuration, using a script with just "<?php
phpinfo();" in it? Look for the gd extension section. You should see: FreeType
Support: enabled, FreeType Linkage: with freetype.
Based on what you find, we can try a simple GD+TrueType test and see what
happens.
I've been doing a bit of digging on this and it looks like where OS X is
configured and where it keeps various files and directories is different
enough from a standard Unix setup that getting this stuff working is a major
undertaking. I installed phplot on a Windows server and everything worked
exactly as it should!
Many thanks for responding and I already have a different query which I start
a new thread for.
PHPlot, by the way is excellent!
Thanks for following up. Maybe there will be another chance some day to get it
working on OS-X. PHPlot already has a few tricks it uses (in the protected
GetDefaultTTFont() function) that lets it find a font by default on a few
systems (Windows, some Linux, Ubuntu-like Linux). It does bother me that it
couldn't find the fonts in your current directory, though.
I did find one issue, that I am including here for future reference because it
might be relevant. There is a bug report opened against PHP, although it is
actually a Freetype problem. The report says that they could not open TT font
files if they were on a mounted CIFS (e.g. Samba) volume. This was due to a
problem with 32-bit vs 64-bit inode numbers, and Freetype being built without
64 bit file offsets (-D_FILE_OFFSET_BITS=64). There was a work-around for
mount.cifs (noserverinfo option).