Skip to content
Snippets Groups Projects
Commit c5373097 authored by stuebinm's avatar stuebinm
Browse files

render text into svg paths; no fonts in svg

this uses opentype.js to parse the fonts and render the given text into
svg paths. Since the svg no longer has to include both fonts in their
entirety, the resulting file sizes are much smaller (~44KB instead of 6.5MB)

Most obvious downside: the output is somewhat fragile to changes in the
template: since we can't let svg automatically center a path, the
text has to be centered by hand, which depends on the width of the svg.
It might be possible to extract that from the svg, but I don't know how,
so instead it's just a hardcoded value.

Also one caveat: opentype.js doesn't have a fallback font in case glyphs
are missing. Since Genos doesn't seem to include any japanese
characters, this currently leads boxes in the main header … (before, we at
least had the pixelated versions).
parent 13400306
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment