Is there any way for Natron to manipulate variable fonts? I’m using the open source Golos Text font which has the weight variable which can be changed. I want to animate the weight being changed (as below) but that variable isn’t shown in the Text node.
Is there any way to use variable fonts or should I file a feature request?
After a lot of frustration I can confirm that pango can render variable fonts. I’m using linux. First use fc-list to get the name of the installed font
fc-list | grep Golos
$HOME/.fonts/Golos-Text_VF.ttf: Golos Text VF:style=Text Regular,Regular
$HOME/.fonts/Golos-Text_VF.ttf: Golos Text VF
$HOME/.fonts/Golos-Text_VF.ttf: Golos Text VF:style=Black
$HOME/.fonts/Golos-Text_VF.ttf: Golos Text VF:style=Medium
$HOME/.fonts/Golos-Text_VF.ttf: Golos Text VF:style=DemiBold
$HOME/.fonts/Golos-Text_VF.ttf: Golos Text VF:style=Bold
Then I can use pango-view to view the font with variable weights pango-view --text=test --font="Golos Text VF @wght=1000"
This will show the output in a tiny window.
I have no idea how to render/change text using “vanilla” pango tools so I looked into using it with imagemagick instead
convert -background lightblue -fill blue -font "Golos Text VF" -pointsize 72 pango:'<span weight="600">100 weight</span>' 100_weight.png
convert -background lightblue -fill blue -font "Golos Text VF" -pointsize 72 pango:'<span weight="1000">1000 weight</span>' 1000_weight.png
So pango can do it but it’s just about exposing this to Natron. Worth noting that there’s more than just the weight attribute that can be varied.
ha, yep! Both work but your solution means I don’t have to leave the Natron workflow. I’ll still clean up my bash script for folk that don’t use Natron or who want to create animations by piping in a text file.
Here’s what I created with your pyplug btw
I created a glitchy variable font and creating animations using a preset wordlist.
That’s what I did in the above bash script. The main difficulty was centering the text horizontally and vertically. Using gravity -center with label: works but when using pango: instead it only centers it horizontally.