When I use phantomjs rasterize, make a PDF of my whole page, and print it normally or view it on Chrome or Firefox the page shows Helvetica as the font.
But when phantomjs does the PDF, everything is fine except the Highcharts SVG. All the text is in what looks like Times New Roman.
Anyone know why this is, maybe?
SVG is in a different namespace, and HighCharts sets the following as the default:
Note that since the default font styles are applied in the renderer, it is ignorant of the individual chart options and must be set globally. Defaults to
{font-family:"'Lucida Grande', 'Lucida Sans Unicode', Verdana, Arial, Helvetica, sans-serif",font-size:"12px"}
.
Use the following CSS to reset it:
.highcharts-root { font-family: inherit; }
Or for older versions of HighCharts:
svg { font-family: inherit; }
References