def lookup(self):
# look up all the external references we need.
if self.uniNumber is None:
return
try:
self.uniLetter = unicodeToChar(self.uniNumber)
except:
print("GlyphName valueerror for %04X" % self.uniNumber)
return
if self.uniNumber in mathUniNumbers:
self.isMath = True
try:
self.uniName = unicodelist.get(self.uniNumber)
if self.uniName is None:
self.uniNameProcessed = ""
else:
self.uniNameProcessed = self.uniName
# NOTE: this is still a dependency on the unicodedata module.
# Would be nice to extract this data directly from the unicode data
# but the algotirhm is ot trivial..
self.bidiType = unicodedata.bidirectional(self.uniLetter)
except ValueError:
self.uniName = None
self.uniNameProcessed = ""
self.uniLetter = None
self.bidiType = None
except:
import traceback
traceback.print_exc()
self.uniRangeName = getRangeName(self.uniNumber)
# these can be called by a range processor to set the status of a name.
评论列表
文章目录