Plot font style

Hi there,

my Windows system is producing plots with different font type than on Ubuntu server. Where can I change default font type which Bokeh uses on Ubuntu? Thanks for help.

The default font is Helvetica on every platform. If it looks different then it comes down to platform canvas rendering differences between browsers that cannot be controlled. The only suggestion I can offer offer is to try explicitly setting other fonts on both systems to find one that renders how you want on both.

Do you have any suggestion, where can I find the particular font setting on Ubuntu?

There is not just one font setting. Every text element (titles, tick labels, label annotation, text glyphs, legend items…) all have their own individual font settings. They all default to “Helvetica” and there is no difference between how they are set on different platforms. What specific kind of text are you looking to change, exactly?

Just need to get back to Helvetica, all my plot fonts use Times New Roman or similar one… If Helvetica is default, this could be system override behaviour due to for example missing font, etc… I will try to update Ubuntu font settings.

I’m not sure if we are talking pay each other. But in case it matters: Helvetica is the default for bokeh because all the bokeh text font properties explicitly list it as such, not because of any system setting. AFAIK Helvetica is a fairy safe default which is why we chose it. But you are correct that browsers may substitute fonts of their own if the specified ones (Helvetica or otherwise) are not available. Ultimately we have no control over what fonts any given user will have installed on their system.

Same as you, I expected Helvetica to be default preinstalled on system. My mistake, that I brough up the question without checking it. I uploaded Helvetika on Ubuntu, plots now use render with it. Thanks for you help Bryan.

st 28. 8. 2019 o 0:13 Bryan Van de Ven via Bokeh Discourse [email protected] napĂ­sal(a):

1 Like