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

def khmerconverter v.1.4::modules::FontDataXML::FontData::__readToUnicode (   self,
  element,
  legacyDict 
) [private]
read the legacy replacements 

Definition at line 280 of file FontDataXML.py.

                                                  :
        """ read the legacy replacements """
        maps = element.getElementsByTagName("tounicode")
        if (len(maps) < 1):
            return

        for map in maps[0].getElementsByTagName("map"):
            unicode = map.getAttribute("unicode")
            legacy = self.__decodeLegacy(map.getAttribute("legacy").encode("cp1252"))
            l = len(legacy)
            if (l > 0 and l < MAXLENGTH):
                if (not legacyDict.has_key(legacy)):
                    legacyDict[legacy] = unicode
                else:
                    raise self.XMLDataError("Legacy character " + legacy + " defined twice in toUnicode.")


Generated by  Doxygen 1.6.0   Back to index