Warning: imagettftext() [function.imagettftext]: Could not find/open font in /home/a2424901/public_html/index.php on line 35

前端 未结 10 2004
被撕碎了的回忆
被撕碎了的回忆 2020-12-03 21:02


        
相关标签:
10条回答
  • 2020-12-03 21:45

    if you are using pChart use this:

    $myPicture->setFontProperties(array("FontName"=>"../fonts/Forgotte.ttf","FontSize"=>11));
    
    0 讨论(0)
  • 2020-12-03 21:48

    On GoDaddy (shared hosting, Cpanel), I have to specify the path only after the domain:

    My files are here:

    URL:  http://example.com/assets/fonts/verdana/verdana.ttf
    path:  /home/content/123456/html/example/assets/fonts/verdana/verdana.ttf
    

    PHP code which works:

    $font = 'assets/fonts/verdana/verdana.ttf';
    

    Using other values for the path did not work.

    0 讨论(0)
  • 2020-12-03 21:48

    Please check for the font folder under Resources.

    0 讨论(0)
  • 2020-12-03 21:53

    My solve (works for me):

    realpath('here/is/right/path/to/font.ttf');
    
    0 讨论(0)
提交回复
热议问题