How to set a bit that FL7 won't set for me
K Pease
Posts: 182
This one little thing is holding me back. I upgraded from FL5 to FL7 mostly to be able to tick the "Prefer typo metrics" checkbox, but obviously I can't be waiting for a new version to be released every time I need a another checkbox.
Since I have a font that should belong to a family but differs from Regular in a way other than weight or width, I want to follow the advice of @Jens Kutilek seen here: https://typedrawers.com/discussion/comment/55488/#Comment_55488
Putting aside the question of why Fontlab wouldn't do this automatically when anything is written in the "Other" field of the Name info, how do I do this myself? I seem to have some sort of blind spot for how to access these things that are documented in such detail. I'm not a programmer, at least not since Pascal in high school. Opening the font file raw in Notepad sure doesn't give me a clear view of these tables, so what does?0
Comments
-
The program ttx seems pretty powerful and is pretty 'close to the metal'.
0 -
Command-line, huh... well, if I must, I must. This is what I get for writing cartoons about Unix users in my younger days without really knowing what I was talking about. Thanks. If there are easier options, I'd still like to hear them.
0 -
1
-
That certainly answers all questions posed. Now to ponder what my perfectionism is worth to me and whether buyers of my display trash willing to buy more than one font in a family will ever add up to that amount.
0 -
If you've got the ability to run ttx, then you've also got the ability to run this little Python script (offered under correction):from fontTools import ttLib
#This also works with CFF-based fonts
thisFont = ttLib.TTFont('MyFont.ttf')
thisFont['OS/2'].fsSelection &= 0b1011111111
thisFont['name'].setName("MyFont Family Name", 21, 3, 1, 0x409)
thisFont['name'].setName("Subfamily Name", 22, 3, 1, 0x409)
thisFont.save('MyFont-altered.ttf')(I'm old enough to be able to say I miss the CP/M command line, and as an OpenSource guy who's never made a nickel from a font, I've always got to consider spending a little time puzzling over fontTools documentation rather than hundreds of Euros on (admittedly excellent) software.)
0 -
If you have the time and patience to install this...
https://github.com/ftCLI/ftCLIftcli os2 -wws 0 INPUT_PATH ftcli names set-name --name-id 21 --string "Family Name" --platform win INPUT_PATH ftcli names set-name --name-id 22 --string "Subfamily Name" --plaftorm win INPUT_PATH
0 -
Thank you very much. After searching around for the missing pieces of my understanding, I think I have finally worked out how to use Python in Windows. I ran your script, @Peter Baker , but it returns this error message:No handlers could be found for "fontTools.ttLib.tables._n_a_m_e"I was pretty sure I got pip to retrieve fontTools correctly, so I'm not sure what's wrong.0
-
I don't know what "No handlers could be found for" means. I'd suggest trying the script Cesare links to, but it's a frontend for fontTools, so you'll probably get the same error. Maybe someone here will recognize the error message. You're running Python 3.7 or higher, right?0
-
Yes, alas, that's the error you get if you try to run the script under an old version of Python. What people mostly do to run fontTools and other font utilities is install the latest version of Python alongside the old one and run a virtual environment, inside which you run your Python programs. There are lots of tutorials online that will guide you through the process step by step.1
-
Success! My mistake was opening a shell from the folder, which ran an older version for some reason. There are too many ways to open a command line in Windows and all of them are a little different. But simply double-clicking the .py file performs the operation correctly with Python 3.10 and closes itself. Thank you for all your help.
0 -
Huzzah! Very glad to help.
0
Categories
- All Categories
- 43 Introductions
- 3.7K Typeface Design
- 803 Font Technology
- 1K Technique and Theory
- 618 Type Business
- 444 Type Design Critiques
- 542 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
- 499 Announcements
- 80 Events
- 105 Job Postings
- 148 Type Releases
- 165 Miscellaneous News
- 269 About TypeDrawers
- 53 TypeDrawers Announcements
- 116 Suggestions and Bug Reports