Conditional Feature in Variable Font #271
subframe7536
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I first discovered this capability in Recursive Mono. After downloading the source files, I tried to understand the implementation but couldn't figure it out programmly and I have to put it aside.
Today, while looking for showcase font websites, I noticed that Monaspace has the same feature. Interestingly, I found a unique syntax in its
calt
feature:condition 599 < wght
. This seemed to be the key, but when I checked the OpenType Feature File Specification, this syntax wasn't documented. I had to explore other options.Eventually, I found the solution in the FontLab User Manual. FontLab implements this feature differently, using tags with special syntax like
a~sl<-9.9
. You can find it hereWhile this approach looks promising, I've decided NOT to implement it for now. The current font file size has no significant redundancy, though it might slightly increase website loading times if you only want to load regular variable font file via CDN. Since fonts are typically installed once, having separate files works fine. Additionally, combining the fonts into one would require extensive work - maybe comparable to converting a static font to a variable font.
However, I still have an open opinion on this feature. Feel free to leave you comment or suggestion below.
Beta Was this translation helpful? Give feedback.
All reactions