示例#1
0
 def getScriptsAndLanguages(self, otTableTag):
     scriptsAndLanguages = {}
     for scriptIndex, script in enumerate(
             hb.ot_layout_table_get_script_tags(self.face, otTableTag)):
         scriptsAndLanguages[script] = set(
             hb.ot_layout_script_get_language_tags(self.face, otTableTag,
                                                   scriptIndex))
     return scriptsAndLanguages
示例#2
0
 def getFeatures(self, otTableTag):
     features = set()
     for scriptIndex, script in enumerate(hb.ot_layout_table_get_script_tags(self.face, otTableTag)):
         langIdices = list(range(len(hb.ot_layout_script_get_language_tags(self.face, otTableTag, scriptIndex))))
         langIdices.append(0xFFFF)
         for langIndex in langIdices:
             features.update(hb.ot_layout_language_get_feature_tags(self.face, otTableTag, scriptIndex, langIndex))
     return features
示例#3
0
 def test_ot_layout_table_get_script_tags(self, blankfont):
     tags = hb.ot_layout_table_get_script_tags(blankfont.face, "GPOS")
     assert tags == ['DFLT']