本文整理汇总了Python中defcon.Font.updateGlyphOrder方法的典型用法代码示例。如果您正苦于以下问题:Python Font.updateGlyphOrder方法的具体用法?Python Font.updateGlyphOrder怎么用?Python Font.updateGlyphOrder使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类defcon.Font
的用法示例。
在下文中一共展示了Font.updateGlyphOrder方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_updateGlyphOrder_rename
# 需要导入模块: from defcon import Font [as 别名]
# 或者: from defcon.Font import updateGlyphOrder [as 别名]
def test_updateGlyphOrder_rename(self):
font = Font(getTestFontPath())
self.assertEqual(font.glyphOrder, [])
font.glyphOrder = sorted(font.keys())
self.assertEqual(font.glyphOrder, ["A", "B", "C"])
font.updateGlyphOrder(addedGlyph="new", removedGlyph="B")
self.assertEqual(font.glyphOrder, ["A", "new", "C"])
示例2: test_updateGlyphOrder_remove
# 需要导入模块: from defcon import Font [as 别名]
# 或者: from defcon.Font import updateGlyphOrder [as 别名]
def test_updateGlyphOrder_remove(self):
font = Font(getTestFontPath())
self.assertEqual(font.glyphOrder, [])
font.glyphOrder = ["test"]
self.assertEqual(font.glyphOrder, ["test"])
font.updateGlyphOrder(removedGlyph="test")
self.assertEqual(font.glyphOrder, [])
示例3: test_updateGlyphOrder_add
# 需要导入模块: from defcon import Font [as 别名]
# 或者: from defcon.Font import updateGlyphOrder [as 别名]
def test_updateGlyphOrder_add(self):
font = Font(getTestFontPath())
self.assertEqual(font.glyphOrder, [])
font.updateGlyphOrder(addedGlyph="test")
self.assertEqual(font.glyphOrder, ["test"])
示例4: test_updateGlyphOrder_none
# 需要导入模块: from defcon import Font [as 别名]
# 或者: from defcon.Font import updateGlyphOrder [as 别名]
def test_updateGlyphOrder_none(self):
font = Font(getTestFontPath())
self.assertEqual(font.glyphOrder, [])
font.updateGlyphOrder()
self.assertEqual(font.glyphOrder, [])