Skip to content

Commit

Permalink
Be more specific in matching dot glyph names
Browse files Browse the repository at this point in the history
  • Loading branch information
khaledhosny committed Jul 1, 2022
1 parent f745246 commit 4e68a55
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Binary file modified AmiriQuranColored.ttf
Binary file not shown.
9 changes: 5 additions & 4 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,7 @@ def makeQuran(options):


def makeCOLR(font):
import re
from fontTools.ttLib import getTableModule, newTable
from fontTools.misc.transform import Identity

Expand Down Expand Up @@ -480,9 +481,9 @@ def makeCOLR(font):
"seenabove-ar", # XXX: can be both a mark and a pause
"wasla-ar",
"madda-ar",
"dot",
"twodots",
"threedots",
"dot.*.-ar",
"twodots.*.-ar",
"threedots.*.-ar",
)

pauses = (
Expand Down Expand Up @@ -539,7 +540,7 @@ def newLayer(name, colorID):
def getColor(glyphName):
for names, color in groups.items():
for name in names:
if glyphName.startswith(name):
if glyphName == name or re.match(name, glyphName):
return palette.index(color)
return 0xFFFF

Expand Down

0 comments on commit 4e68a55

Please sign in to comment.