How to generate a static font family from a variable font? (details inside)
Jon Palmisciano
Posts: 10
Hello everyone. I apologize if this is the wrong place for this post, but I see that many people here are knowledgeable regarding variable fonts and I've been struggling for a couple days to achieve what I am after.
I own a handful of variable fonts, however not all software supports them, and the predefined instances are a little too bold and wide for me. My goal is to be able to generate static cuts from the original variable font with my own axis parameters. This way, I can use the font with all my software, and have complete control over the font's appearance.
For example, I have a variable font ("ExampleVF") with variable width and weight axes. I want to generate the following cuts:
Is this doable with fonttools? Can anyone suggest how I could achieve this?
I'm a programmer first, type enthusiast second. If someone can simply tell me what tables I need to modify with fonttools, I can do the rest. One thing I did notice is that fonttools exports TTFs, which as far as I understand have a limited number of subfamilies on Windows, so I'm not sure if I also need to add OTF into the mix somewhere.
Sorry for the long post. I would really appreciate some advice on this. If someone can point me in the right direction, I will report back here once I've written the program and publish it on GitHub!
I own a handful of variable fonts, however not all software supports them, and the predefined instances are a little too bold and wide for me. My goal is to be able to generate static cuts from the original variable font with my own axis parameters. This way, I can use the font with all my software, and have complete control over the font's appearance.
For example, I have a variable font ("ExampleVF") with variable width and weight axes. I want to generate the following cuts:
- ExampleVF Light (wdth=85, wght=250)
- ExampleVF Regular (wdth=85, wght=350)
- ExampleVF Medium (wdth=85, wght=450)
- ExampleVF Semi Bold (wdth=85, wght=550)
- ExampleVF Bold (wdth=85, wght=650)
- ExampleVF Extended Light (wdth=110, wght=350)
- ExampleVF Extended Regular (wdth=110, wght=350)
- ExampleVF Extended Medium (wdth=110, wght=450)
- ExampleVF Extended Semi Bold (wdth=110, wght=550)
- ExampleVF Extended Bold (wdth=110, wght=650)
Is this doable with fonttools? Can anyone suggest how I could achieve this?
I'm a programmer first, type enthusiast second. If someone can simply tell me what tables I need to modify with fonttools, I can do the rest. One thing I did notice is that fonttools exports TTFs, which as far as I understand have a limited number of subfamilies on Windows, so I'm not sure if I also need to add OTF into the mix somewhere.
Sorry for the long post. I would really appreciate some advice on this. If someone can point me in the right direction, I will report back here once I've written the program and publish it on GitHub!
0
Comments
-
Generate static, then edit 'name' table with fontTools.
MS Word supports 4 styles per font: regular, bold, italic and bold italic. So if you have more styles, you should split it into subfamilies. Also you may need to modify fsSelection for Bold/Italic styles.
2 -
Viktor Rubenko said:Generate static, then edit 'name' table with fontTools.
MS Word supports 4 styles per font: regular, bold, italic and bold italic. So if you have more styles, you should split it into subfamilies. Also you may need to modify fsSelection for Bold/Italic styles.0 -
Viktor Rubenko said:Generate static, then edit 'name' table with fontTools.
MS Word supports 4 styles per font: regular, bold, italic and bold italic. So if you have more styles, you should split it into subfamilies. Also you may need to modify fsSelection for Bold/Italic styles.
The input to my program is a variable font in TTF format, and the output is static TTFs. Converting these static TTFs to OTFs via an online tool, then installing them makes them work as expected.
Is there a way I can export as OTF from fonttools? I have searched around but cannot find any answers. Is there a workaround to make the TTF format work?0 -
Probably, this online tool makes some modifications, that you did not through your script.
Try to export them to ttx and compare tables data.0 -
Viktor Rubenko said:Probably, this online tool makes some modifications, that you did not through your script.
Try to export them to ttx and compare tables data.
Despite this, when I install the TTFs I generated, they look like this in Windows settings, clearly indicating something is wrong:
When I convert to OTF and then install, it looks as you would expect, with different names and weights.
Is there any way I can convert from TTF to OTF inside of fonttools? It seems like that could be the solution.0 -
Did you tried to convert your ttfs to new ttfs with online tool? I am sure, that they will work too.0
-
Viktor Rubenko said:Did you tried to convert your ttfs to new ttfs with online tool? I am sure, that they will work too.0
-
For anyone who might stumble upon this in the future, if you are interested in a program that can instantiate fonts and tweak names, etc. too, you can check out my project, VFIT, here.2
-
Can you provide some sample files that aren't working and the ones that are?0
-
Aaron Bell said:Can you provide some sample files that aren't working and the ones that are?0
-
Well done indeed! A few thoughts on this since I've been working on something similar:
- it would be nice to provide implicit defaults, so no config is needed, or
- provide only a desired font family and axis values via CLI options
- you can use an existing STAT table to deduct at least a partial name—it won't be unique "enough" but could work for the above in conjunction with the selected axis values
0 -
Johannes Neumeier said:Well done indeed! A few thoughts on this since I've been working on something similar:
- it would be nice to provide implicit defaults, so no config is needed, or
- provide only a desired font family and axis values via CLI options
- you can use an existing STAT table to deduct at least a partial name—it won't be unique "enough" but could work for the above in conjunction with the selected axis values
I'll definitely think about expanding the configuration system or adding defaults in the future. I'm content with where the program is at right now for my use case at least. As far as I am aware, there are no other users, but if others are interested in the program and desire more features, I would happily consider adding them.
For you or anyone who is reading this in the future, feel free to open a GitHub issue for a feature request.0
Categories
- All Categories
- 43 Introductions
- 3.7K Typeface Design
- 798 Font Technology
- 1K Technique and Theory
- 617 Type Business
- 444 Type Design Critiques
- 541 Type Design Software
- 30 Punchcutting
- 136 Lettering and Calligraphy
- 83 Technique and Theory
- 53 Lettering Critiques
- 483 Typography
- 301 History of Typography
- 114 Education
- 68 Resources
- 498 Announcements
- 79 Events
- 105 Job Postings
- 148 Type Releases
- 165 Miscellaneous News
- 269 About TypeDrawers
- 53 TypeDrawers Announcements
- 116 Suggestions and Bug Reports