I have been using Highcharts on a Windows-based webserver and have recently migrated to a Oracle Enterprise Linux server instead. I'm having an issue with fonts when I export charts to PNG format: the fonts in the SVG are not being honoured.
I have followed instructions in various places to install Microsoft fonts and to ensure that Lucida Grande (the preferred font family, as specified in the SVG) is installed as a TrueType font on the Linux machine.
Despite my efforts (including using -font-family
option of the rasterizer to specify a default font family), all the fonts in generated PNGs come out as something bold and italic (I don't know what font it is).
So, in summary, my questions are:
Solved it!
The answers to my questions are:
The issue was that when I followed the instructions to install TrueType fonts, this was done as root
but the permissions weren't automatically set, meaning that other users (like the apache
user that runs the webserver) weren't allowed to read the font files.
The fix, therefore, was:
cd /usr/share/fonts
chmod 755 ttfonts/
cd ttfonts/
chmod 644 *.*