Giaco
April 19, 2022, 12:24pm
1
Hello everyone,
I designed a variable font with a weight and width axis. I was wondering if there is a way to animate variable fonts with processing. Do you know any examples of processing projects using variable fonts?
1 Like
Hi @Giaco ,
I found this Reddit thread about variable fonts:
Also this issue on p5.js:
opened 06:00PM - 09 Jan 18 UTC
closed 05:36PM - 13 Jan 18 UTC
#### Nature of issue?
- [ ] New feature request
#### Most appropriate sub-… area of p5.js?
- [ ] Typography
Hey all,
The `text('sometext', x, y);` only uses the default parameters of the fonts. Since we have now variable fonts there is no way to access these in the current version. Please correct me if I am wrong.
**Variable what?**
Variable font are font files with additional data. Short explanation: one font file with a whole font family inside.
Variable font have so called _axes_ and these have a _default value_, _minimum value_ and _maximum value_.
**Axes**
An axis has a tag, name and the values
example: weight, wght, 0 1000 200
A reasonable way to handle these variation is just like colours. There is a current state and all the thing you do will have this state. Until you change them...
This way the `text()` function will not change at all.
We only need a way to set the state of a font:
`fontVariations()`
As arguments something like: `wght=394, wdth=4`
I have little experience with javascript, I come from python-land. But these variable fonts are ideal for browser environments.
Please join this discussion and hopefully get this thing working :)
All the best,
enjoy!
Thom
look at this!: https://www.axis-praxis.org
2 Likes
I’d like to bump this one. There are few things as “Processing” as variable fonts. PLEASE implement variable font support in Java/Processing??