Balanced a lot of glyphs, especially o-shaped. Also reduced file size massively.

This commit is contained in:
be5invis 2015-08-12 02:45:17 +08:00
parent f64a11c4e3
commit af9ba2e094
15 changed files with 125 additions and 213 deletions

View file

@ -4,13 +4,23 @@ import sys
source = sys.argv[1]
font = fontforge.open(source)
font.mergeFeature(sys.argv[2])
font.selection.all()
# Replace accented characters into references
font.selection.select(("ranges", "unicode", None), 0x1FCD, 0x1FCF, 0x1FDD, 0x1FDF)
font.replaceWithReference(4)
font.selection.none()
font.selection.select(("ranges", "unicode", None), 0x0300, 0x036F)
font.replaceWithReference(4)
font.selection.none()
font.selection.select(("ranges", "unicode", None), 0x0000, 0xFFFF)
font.replaceWithReference(4)
font.selection.none()
font.selection.all()
font.removeOverlap()
font.round()
font.removeOverlap()
font.unlinkReferences()
font.removeOverlap()
font.simplify(1)
font.layers["Fore"].is_quadratic = False
font.simplify(4, ("smoothcurves", "removesingletonpoints", "setstarttoextremum"), 0.2)
font.canonicalContours()
font.canonicalStart()
font.generate(sys.argv[3], flags = ("short-post", "opentype"))