browser.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:glyphBrowser 作者: LettError 项目源码 文件源码
def callbackEditUnicodeText(self, sender):
        # this is the callback for the unicode textbox.
        # if text is edited here, find the glyphs that are used in the text
        # and add those to the selection. This way we can quickly add characters
        # from cut / paste text to the selection
        f = CurrentFont()
        text = sender.get()
        text = text.replace("\r", " ")
        text = text.replace("\n", " ")
        self._typing = True
        if text:
            glyphSelection = findText(self.data, text)
            glyphSelection.sort()
            items = [g.asDict(self._unicodes, self._names, self.joiningTypes) for g in glyphSelection]
            items = sorted(items, key=lambda x: x['uni'], reverse=False)
            self.w.selectedNames.set(items)
        self.w.selectionUnicodeText.set(text)
        self._typing = False
        self.checkSampleSize()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号