Menu

#158 SetDefaultTTFont breakdown

closed
nobody
None
5
2012-09-07
2011-09-08
Anonymous
No

hi , i meet a problem when i try to use SetDefaultTTFont to set fonts arial.ttf
the enviroment is centos 5.4,
i use the fullpath of the font file to call SetDefaultTTFont, the program breakdown,

but when i try the program on a window 7 system, it work well.

Discussion

  • lbayuk

    lbayuk - 2011-09-08

    SetDefaultTTFont does work on the systems I have tested (Slackware Linux, Xubuntu Linux, and Windows XP).

    Since I don't have access to a CentOS system, this is going to be hard to help you troubleshoot. I assume you installed a copy of the arial font file on CentOS, since I do not think it is included in the distribution. Are you sure the file you copied is a valid font file? Do you have the case-correct path? If you are running the script under a web server, does the web server have read permission to the font file, and execute permission to all the parent directories?

    After checking that, could you try this simple script, after changing the FONT definition to point to your font. You can also try it with a known good font that is included with CentOS. Run the script with the PHP command-line interpreter (CLI), redirecting the output to a file such as "out.png". It will either create a PNG image file with some text, or make a blank PNG and report an error about the font.

    Try that, and let me know. If there is an error message, please include that.

     
  • lbayuk

    lbayuk - 2011-09-12

    Closing this report due to lack of information. Feel free to follow up on the Help and Discussion forum if you have more details. If there is actually a PHPlot bug here, the report can be re-opened.

     

Log in to post a comment.