Python 字型相關工具

Posted in :

Max 分享一些關於處理Python中的字體相關工具。


轉換系統

ufo2ft
https://github.com/googlefonts/ufo2ft
可以通過UFO to OTF/TTF

from defcon import Font
from ufo2ft import compileOTF
ufo = Font('MyFont-Regular.ufo')
otf = compileOTF(ufo)
otf.save('MyFont-Regular.otf')

ufo2fdk
https://github.com/robotools/ufo2fdk
從UFO to AFDKO的轉換

UFO Extractor
https://github.com/robotools/extractor
otf/ttf to UFO

>>> import extractor
>>> import defcon
>>> ufo = defcon.Font()
>>> extractor.extractUFO("/path/to/MyFont.ttf", ufo)
>>> ufo.save("/path/to/MyFont.ufo")

fontmake
https://github.com/googlefonts/fontmake
UFO to otf/ttf

Max 實際測試,這不是一般的折騰!遇到問題時,完全無解,參考看看:
https://stackoverflow.max-everyday.com/2020/02/ufo2ft-filtersrunning-removeoverlapsfilter/

AFDKO
https://github.com/adobe-type-tools/afdko
Adobe Font Development Kit for OpenType

Font Merger
https://github.com/iij/fontmerger
合併字型檔案
You can merge some fonts which are regular fonts and symbol fonts(PowerlineFont Awesome) and others.


編輯器

fontParts
https://github.com/robotools/fontParts
An API for interacting with the parts of fonts during the font development process. FontParts is the replacement for RoboFab.
The documentation is at fontparts.readthedocs.io.

defcon
https://github.com/robotools/defcon
A set of UFO based objects for use in font editing applications.

fonttools
https://github.com/fonttools/fonttools
A library to manipulate font files from Python.

The package is listed in the Python Package Index (PyPI), so you can install it with pip:

pip install fonttools

glyphsLib
https://github.com/googlefonts/glyphsLib
A bridge from Glyphs source files (.glyphs) to UFOs

ufoLib2
https://github.com/fonttools/ufoLib2
ufoLib2 is a UFO font library.


其他

ttfautohint-py
https://github.com/fonttools/ttfautohint-py
Python wrapper for ttfautohint, a free auto-hinter for TrueType fonts

fontbakery
https://github.com/googlefonts/fontbakery
Font quality assurance tool written in Python 3.

kernDump
https://github.com/adobe-type-tools/kern-dump
Scripts for working with and analyzing kerning information


Max 比較建議使用的工具是 FontForge
https://github.com/fontforge/fontforge/releases

還有:Glyphr Studio Desktop

https://github.com/glyphr-studio/Glyphr-Studio-Desktop


相關文章:

Font­Tools 安裝與使用簡明指南
https://stackoverflow.max-everyday.com/2020/02/fonttools/

Awesome Typography
https://github.com/Jolg42/awesome-typography

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *