开发者

How do I change a font's metadata (specifically a title)?

I need a way to dynamically change the name of a font, and I cannot find a way to do so in .net. I am not concerned about the font file ty开发者_如何学Cpe, so otf, fon, ttf are all open.

Things I've tried:

  1. Using dsofile.dll / OleDocument Properties Reader. These are not the same properties used by whatever accesses the name of fonts.
  2. Changing the name directly in the registry.

I've read that .fon files are just dlls in disguise, (one example), so perhaps that is a way to get to it?


  • Import your font file in the online Glyphrstudio font editor
  • Click the hamburger icon on the top left
  • Select font setting and change title and meta data from there

Hope it helps.


To change the font name, you will have to open the font with a real font editor and rename it, then re-export it to the format you need.

Install FontForge and then you can open the font from your computer and using "Font Info" under the "Element" menu, you can change the font metadata, including the font name and font family.


It’s better to use specified tools used in font production Workflows. When opening a binary font file in an editor the editor tries to reverse engineer the font, and that almost never works out. Most of the time you’ll lose big parts of your OT Layout Features (glyph replacement, mark positioning, sometimes even the Kerning). The newly produced font file will work but will have lost a lot of features.

As a font engineer I use these tools on a daily basis to work with binary font files without destroying them:

DTL OTMaster Quite a posh paid app that lets you access and edit all the tables inside a font. Nice touch: you can side to side compare/edit multiple files.

https://www.fontmaster.nl/otmaster.html

TTX CLI as part of the fonttools Cheap (free) alternative. TTX can dump all (or specific) tables of a binary font into readable XML files which can be edited in a text editor. Single tables can be merged back into the original font, whole font TTX dumps get converted back to completely new binary font files.

It’s cheap (free), requires a bit more work but is quite fun when stringed up with shell and python build scripts to batch edit bigger amounts of font files.

https://github.com/fonttools/fonttools

However: in all the cases you should know what you’re doing. Editing the wrong thing, or not all the things in fonts can render them unusable. Use the OT specifications to check in what table which information is stored in a font.

https://learn.microsoft.com/en-us/typography/opentype/spec/

Also, and this is probably the most important thing: check your license if you are allowed to change anything at all in the fonts you have. Designing and producing fonts is a lot of tedious and time consuming work, if you have a proper license and need a custom version of your font check with the designer or the vendor, usually they are more than happy to provide assistance :)


FontForge -- An outline font editor that lets you create your own postscript, truetype, opentype, cid-keyed, multi-master, cff, svg and bitmap (bdf, FON, NFNT) fonts, or edit existing ones. Also lets you convert one format to another. FontForge has support for many macintosh font formats.

sourchttps://superuser.com/questions/120593/how-do-you-change-a-ttf-font-name


fontname.py allows to rename a font on the CLI, it depends on fonttools.

Git repo: https://github.com/chrissimpkins/fontname.py

fonttools could be installed with pip: pip3 install fonttools

Example for renaming a font title (new title will be: Nerd Symbols 2048):

python fontname.py 'Nerd Symbols 2048' 'Symbols-2048-em Nerd Font Complete.ttf'

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜