Exemple #1
0
 def categoryForGlyphName(self, glyphName, allowPseudoUnicode=True):
     """
     Get the category for **glyphName**. If **allowPseudoUnicode** is
     True, a pseudo-Unicode value will be used if needed. This will
     return *None* if nothing can be found.
     """
     if allowPseudoUnicode:
         value = self.pseudoUnicodeForGlyphName(glyphName)
     else:
         value = self.unicodeForGlyphName(glyphName)
     if value is None:
         return "Cn"
     return unicodeTools.category(value)
Exemple #2
0
 def categoryForGlyphName(self, glyphName, allowPseudoUnicode=True):
     """
     Get the category for **glyphName**. If **allowPseudoUnicode** is
     True, a pseudo-Unicode value will be used if needed. This will
     return *None* if nothing can be found.
     """
     if allowPseudoUnicode:
         value = self.pseudoUnicodeForGlyphName(glyphName)
     else:
         value = self.unicodeForGlyphName(glyphName)
     if value is None:
         return "Cn"
     return unicodeTools.category(value)
Exemple #3
0
 def test_category(self):
     self.assertEqual(category(ord("a")), "Ll")
     self.assertEqual(category(0x0001000), "Lo")
Exemple #4
0
 def test_category(self):
     self.assertEqual(category(ord("a")), "Ll")
     self.assertEqual(category(0x0001000), "Lo")