def _print_char_info(chars): for char in chars: try: name = unicode_data.name(char) except ValueError: name = '<Unassigned>' print('U+%04X %s' % (char, name))
def _print_char_info(chars): for char in chars: try: name = unicode_data.name(char) except ValueError: name = '<Unassigned>' print 'U+%04X %s' % (char, name)
def _cp_error_msg(self, cp, test_msg, target_msg): test_gid = self._test_gid(cp) target_gid = self._target_gid(cp) if self.emit_config: # omit character name for brevity return 'cp %04x (gid %d) %s but target (gid %d) %s' % ( cp, test_gid, test_msg, target_gid, target_msg) else: cp_name = unicode_data.name(cp) return 'cp %04x (gid %d) %s but target (gid %d) %s (%s)' % ( cp, test_gid, test_msg, target_gid, target_msg, cp_name)
def main(argv): """Outputs the character coverage of fonts given on the command line.""" import unicode_data for font in argv[1:]: print "%s:" % font for char in sorted(character_set(font)): try: name = unicode_data.name(char) except ValueError: name = "<Unassigned>" print "U+%04X %s" % (char, name)
def main(argv): """Outputs the character coverage of fonts given on the command line.""" import unicode_data # f = open('/Users/brucelee/Documents/workspace/noto_source/noto-c21755e239ef/nototools/noto_chars','wb') print argv[1:] for font in argv[1:]: # print "%s:" % font for char in sorted(character_set(font)): try: name = unicode_data.name(char) except ValueError: name = "<Unassigned>" line = "U+%04X %s\n" % (char, name)
def test_name(self): """Tests the name() method.""" self.assertEqual('WARANG CITI OM', unicode_data.name(0x118FF))