Improved braille pattern building and referencify

This commit is contained in:
be5invis 2016-05-04 02:34:33 +08:00
parent ce994dbe63
commit 781fb8897f
2 changed files with 275 additions and 1786 deletions

File diff suppressed because it is too large Load Diff

View File

@ -5,8 +5,15 @@ import sys
source = sys.argv[1] source = sys.argv[1]
font = fontforge.open(source) font = fontforge.open(source)
font.selection.all()
# Replace accented characters into references # Replace accented characters into references
font.selection.select("braille1237")
font.replaceWithReference()
font.selection.select("braille123", "braille127", "braille137")
font.replaceWithReference()
font.selection.select("braille13", "braille12")
font.replaceWithReference()
font.selection.select("braille1")
font.replaceWithReference()
font.selection.select(("ranges", "unicode", None), 0x1FCD, 0x1FCF, 0x1FDD, 0x1FDF) font.selection.select(("ranges", "unicode", None), 0x1FCD, 0x1FCF, 0x1FDD, 0x1FDF)
font.replaceWithReference() font.replaceWithReference()
font.selection.all() font.selection.all()
@ -22,8 +29,14 @@ except TypeError:
if hasLigation: if hasLigation:
font.selection.select(("less", "ranges"), "lighy.fr", "lighy.cc", "ligeq.fr", "ligeq.cc") font.selection.select(("less", "ranges"), "lighy.fr", "lighy.cc", "ligeq.fr", "ligeq.cc")
font.selection.select(("less", "ranges"), "braille1", "braille12345678")
font.replaceWithReference() font.replaceWithReference()
font.selection.select("braille1", "braille13", "braille12", "braille123", "braille127", "braille137", "braille1237")
for i in font.selection:
glyph = font[i]
glyph.unlinkRef()
# Remove overlapped area # Remove overlapped area
font.selection.all() font.selection.all()
font.removeOverlap() font.removeOverlap()