From 4e68a558daf7f517e40bfc7127e874dd3c6045f1 Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Fri, 1 Jul 2022 13:37:47 +0200 Subject: [PATCH] Be more specific in matching dot glyph names --- AmiriQuranColored.ttf | Bin 201588 -> 201412 bytes build.py | 9 +++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/AmiriQuranColored.ttf b/AmiriQuranColored.ttf index c0058da552f8929b6f2a513a599fa4bc1f9ce4e2..309fec4bd020d5eb662174815edc6e79de98062d 100644 GIT binary patch delta 8836 zcmY+K3A|0^{)gZ9_r7Z_Q<8KH8BPdSNCzimo|B7ANyss04oM|jNJuhINs>%SGVM)< zb0kSfNOE1_NT>z|dpc8XEOn>K3PWZ3;L%u_OvsFRzvZq;^I z()Tx%OiEU&dB3J@+c&6^TKzF4ho?;MSR!_XK}Y(e4I9Gfd=xE*bMzVTLhrOPEsiUd z(n9HRHT(8T>$!hNqc0g-l>XGdG(0r3!b);Ga_PPUhmYJk$Ge|=oqhOqz~CNf7t2rn zO{tRml)7{Dz_gJ=a+L7<(La*$$%E1c_Bu6n-vp&oHnN*JnhzN~Z1}}9Ren@@+YzN! zwi`0E*O0#clvgRRiwQy25m3d}-E-~yj+y0jt6-aJ3AV2vttS**pQmslSidLvjyp}= zP0eN=d$4TmkGPHB5l@Pjh?k95j@O9Sk2jCEjdzasiVup9h{xg+-)4xnMDs2Nq|rsATuPtNT=bSW*>$rBo6utqQ?1 z%obISd7{cQLsSK3h^oX`QI#1bDuq#^sxnGcHAac5!6;F+V+<2jhhbXPRS&^>4A!c? zssbA@MXQEP(W;S3g^kt2u!*V;n^HupW~wG^t{#Dpsamjwstx~1Rjpc5RjXE1)v7gB zwR)VYTD767R&7PgCK)k!_d&OJq0QBPA)t8Nt3Dvg3#b*G?K zJt(MEPYP<)i-KD9rk+-PsHat5>S^_idII)S?lkRBZLJ1STdRTUsTdlhI>W)L3ml@l z!e`l>RzumGR>RnwR>RqxR?o3HtwyjptzKbsT8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~XmTPkJ)>`qJhFW^#HMydex+bUVP1oeO LmL~I8Ba#0DD#^)$ diff --git a/build.py b/build.py index 664468a7cd..740865abde 100644 --- a/build.py +++ b/build.py @@ -437,6 +437,7 @@ def makeQuran(options): def makeCOLR(font): + import re from fontTools.ttLib import getTableModule, newTable from fontTools.misc.transform import Identity @@ -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 = ( @@ -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