Closed f1mishutka closed 2 years ago
JpGraph always prepends font file path with dirname(__FILE__).'/fonts/' path. So it is impossible to use custom TTF fonts outside JpGraph sources folder.
dirname(__FILE__).'/fonts/'
Example: $graph->SetUserFont1('/var/lib/my-fonts/font/Roboto-Regular.ttf');
$graph->SetUserFont1('/var/lib/my-fonts/font/Roboto-Regular.ttf');
Solution: do not prepend font file path if it already starts from root ('/').
JpGraph always prepends font file path with
dirname(__FILE__).'/fonts/'
path. So it is impossible to use custom TTF fonts outside JpGraph sources folder.Example:
$graph->SetUserFont1('/var/lib/my-fonts/font/Roboto-Regular.ttf');
Solution: do not prepend font file path if it already starts from root ('/').