Logo Search packages:      
Sourcecode: khmerconverter version File versions  Download package

def khmerconverter v.1.4::modules::FontDataXML::FontData::__readGlobalUni (   self,
  element,
  unicodeTable,
  unicodeDicts 
) [private]
read the global replacements for unicode 

Definition at line 310 of file FontDataXML.py.

                                                                  :
        """ read the global replacements for unicode """
        maps = element.getElementsByTagName("global")
        if (len(maps) < 1):
            return

        for map in maps[0].getElementsByTagName("map"):
            unicode = map.getAttribute("unicode")
            legacy = self.__decodeLegacy(map.getAttribute("legacy"))
            l = len(unicode)
            if (l == 1):
                i = ord(unicode) - 0x1780
                if (i >= 0 and i < MAXUNI):
                    if (unicodeTable[i] == ""):
                        unicodeTable[i] = legacy
                    else:
                        raise self.XMLDataError("Unicode character " + ord(unicode).__hex__() + " defined twice in global.")
                else:
                    self.__addToUniData(unicode, legacy, unicodeDicts)
            else:
                if (l > 1 and l < MAXLENGTH):
                    self.__addToUniData(unicode, legacy, unicodeDicts)


Generated by  Doxygen 1.6.0   Back to index