Use variable font files #1833
Labels
No Label
dependencies
duplicate
help wanted
invalid
kind/bug
kind/feature
needs reproduction
question
security
wontfix
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: vikunja/vikunja#1833
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Subsequent to vikunja/frontend#759
For the future it might make sense to use variable fonts.
If interested read some stuff about them e.g. here first: https://variablefonts.io/about-variable-fonts/#opsz
We are lucky! Both fonts do exist in a variable editon:
After beeing optimized the variable fonts will be much smaller (since there is just one file per font). Older browser can keep the current fonts as fallback.
Additionally we could do stuff like animate font-weight when hovering, etc. with them.
Right now the linked fonts in the repos above are not optimzed so that's some stuff that needs to happen before it makes sense to use them. I researched a bit and this is what I found out:
What makes the variable font files, that I linked, large is that they have much more OpenType features enabled and a lot of glyphs for all kind of languages that are not (yet) used by Vikunja.
I guess it makes sense to align the features of the current included font file with the variable font.
By using Googles woff2 library with
woff2_decompress font.woff2
I could open the curently used non-variable font files through FontDrop (because it just supports ttf files). I could find out that the only OpenType feature the OpenSans currently uses is ligatures. The currently used Glyphs are just theLatin
unicode-range.With Glyphhanger it should be no problem to subset the font to Latin and use only the ligatures OpenType features
Maybe it makes even sense to add some beautiful features because of the saved space by using just one font. If you drag the ttfs from the repos above in FontDrop you can check out all the cool additional stuff that's available. Just to give an example: the mono-sized numbers might make sense for the task ids.
Sounds really promising! I didn't know variable fonts were a thing. I think it would make sense to explore this further.