-
-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an option to change font family name and/or id #7
Comments
This is a great idea Anton. It would also be useful to modify the name in case you want to re-release a modified version of a open font licensed font with a reserved font name. This is not difficult. Will leave this open to remind me to do it when I get back to work on this tool. |
We just discussed this over here source-foundry/Hack#345 (comment). I am interested in whether anyone has thoughts about whether we should support an automated approach (e.g. add integer that indicates the percent UPM value passed at the command line to the current font family name - Coolfont 25, Coolfont 15) or user specified at the command line so that you can change the font family name to anything that you would like in order to create your own naming scheme. Either approach should permit side-by-side installs of fonts with different line spacing settings. Let me know what you think. I am prepared to add this if there is interest in it. |
@chrissimpkins Would love to rename font so I could have multiple line heights installed as well. |
On the to do list! I have actually been considering a standalone tool to rename fonts because we need this for other things. Here is a Python script that will accomplish this until it is in this tool or we have a standalone renaming tool (that will likely be based on the script in the repo below): https://github.com/chrissimpkins/fontname.py Let me know if you have any problems with it. Instructions are on the repository readme page. Note that the script renames the fonts without writing to new file paths so create copies if you intend to keep previous names. |
@jesseleite if we do add the font renaming to this tool, best to create option to specify name on command line or automate it in some fashion based upon the change in the line spacing? |
Hey @chrissimpkins thanks for reply!
Probably because I'm new to python, but I am having trouble with fonttools dependency...
100% could have optional flag to specify name, like:
Or something similar? |
@jesseleite strange. Mind dropping into the Python2 and Python3 REPL to check the import?:
|
Incidentally, you should already have fontTools installed if you are using font-line... It is a dependency and is automatically installed with the font-line install. Maybe it is installed under Py3 for some reason? Let's see what the above shows and can troubleshoot from there. |
👍 thanks for the feedback! |
Ahh it was |
you must default to python3. this is a good thing! time to get rid of py2... work as a separate install? |
Yeah learning :) I did get it to work though, thanks! |
@jesseleite great! enjoy! |
Assuming that the font has all the namerecords correcly set, I'd do the following:
Since some namerecords contain spaces and other don't, a double replacement is needed:
But I'd not to this by default, leaving the choice to the user. Anyway, I tested this script yesterday for the first time and it's superb! |
Something that you intend to support in ftCLI? |
Yes! I will add an option to allow the user choose if changing the family name or leave it as is. |
Sometimes there is a need to have installed a couple versions of the same font with different interline spacing. Therefore, OS should be able to treat these fonts as different.
The text was updated successfully, but these errors were encountered: