What is the standard font used by Vegalite.jl?

What is the standard font used for text in Vegalite.jl?

This seemed like the right forum to ask. If wrong, can a moderator move it to the right one? Thanks.


1 Like

Yes, thanks. I suppose that is wise.

I think it’s helvetica neue according to this random commit https://github.com/vega/vega-lite/commit/c5cc50cb281114f5db845b174ca0a6983b13ae6f

1 Like

Looks like a good guess, but can we be sure of it based on this?

I have no idea :slight_smile: But I asked on the vega-lite slack, if I get a response I’ll post it here.


Alright, I heard back. In the browser, it will be the browser’s sans serif font. If you save as an SVG, then it will use the sans serif font that the SVG viewer has as a default. If you export to PDF, PNG or one of those formats, Cairo is presumably using the OS default sans serif font.


Ok, got more info: the default font is defined here.

1 Like


So, basically, it will use the viewer’s font and fonts are not embedded; or, if PDF or rasterized, it will embed or rasterize the OS’s sans-serif.

Is there a way to embed a chosen font in an SVG?

The function that produces the SVG is this. I don’t see an option to embed a font there, but it strikes me as a quite reasonable idea in general… Maybe open an issue on the vega repository https://github.com/vega/vega?

1 Like

Yes, perhaps I will.