Просмотр исходного кода

[generateGlyph] Don't filter by unicode value

I really don't think there's any reason for this, except to whittle
down the GPOS table size so that the AFDKO could compile it. Now that
we're using feaLib and don't have this limitation, the filter is
causing more harm than good (lots of glyphs e.g. Cyrillic characters
end up not getting mark attachments when they should).
James Godfrey-Kittle 8 лет назад
Родитель
Сommit
f0a8f8f475
1 измененных файлов с 2 добавлено и 9 удалено
  1. 2 9
      scripts/lib/fontbuild/generateGlyph.py

+ 2 - 9
scripts/lib/fontbuild/generateGlyph.py

@@ -35,23 +35,16 @@ def parseComposite(composite):
 
 
 def copyMarkAnchors(f, g, srcname, width):
-    unicode_range = set(
-        range(0x0030, 0x02B0) + range(0x1E00, 0x1EFF) +
-        [0x430, 0x435, 0x440, 0x441, 0x445, 0x455, 0x456, 0x471])
-
     for anchor in f[srcname].anchors:
         if anchor.name in ("top_dd", "bottom_dd", "top0315"):
             g.appendAnchor(anchor.name, (anchor.x + width, anchor.y))
 
         if ("top" == anchor.name and
-                (g.unicode in unicode_range or
-                 g.name.endswith((".ccmp", ".smcp", ".NAV"))) and
-                not any(a.name == "parent_top" for a in g.anchors)):
+            not any(a.name == "parent_top" for a in g.anchors)):
             g.appendAnchor("parent_top", anchor.position)
 
         if ("bottom" == anchor.name and
-                (g.unicode in unicode_range or g.name.endswith(".smcp")) and
-                not any(a.name == "bottom" for a in g.anchors)):
+            not any(a.name == "bottom" for a in g.anchors)):
             g.appendAnchor("bottom", anchor.position)
 
     if any(a.name == "top" for a in g.anchors):