open-innovations / oi-lume-viz

Lume Plugin that enables charting
https://open-innovations.github.io/oi-lume-viz/
5 stars 1 forks source link

Hard-coded font names in components #32

Closed gilesdring closed 1 year ago

gilesdring commented 1 year ago

A number of components refer to hard-coded font names CenturyGothicStd, Century Gothic, Helvetica, sans-serif, Poppins

These should be removed in favour of configurable font names

slowe commented 1 year ago

@gilesdring I've hopefully removed hard coded fonts and replaced them with the ability to set font in _config.js.

gilesdring commented 1 year ago

I shall make a new release and check how it looks live...

slowe commented 1 year ago

@gilesdring I've just added some documentation

gilesdring commented 1 year ago

Looks good! Slight issue if I provide a font-string with a space in it:

family: "chaparral-pro, sans-serif"

The library doesn't recognise the sans-serif as being a font, given the leading space

slowe commented 1 year ago

There's a good reason why it doesn't recognise "sans-serif" because that isn't a font but a fallback that depends on the user's system. We cannot know the sizes in advance.

slowe commented 1 year ago

@gilesdring I think this is complete now.