MCPcopy Create free account
hub / github.com/PageBot/PageBot / keys

Method keys

Lib/pagebot/fonttoolbox/objects/font.py:850–863  ·  view source on GitHub ↗

Answers the glyph names of the font. >>> from pagebot.fonttoolbox.objects.font import Font >>> from pagebot.fonttoolbox.fontpaths import getTestFontsPath >>> fontPath = getTestFontsPath() >>> path = fontPath + '/fontbureau/Amstelvar-Roman-VF.ttf' >>> f = getF

(self)

Source from the content-addressed store, hash-verified

848 return sum(matches)/len(matches) # Normalize to value between 0..1
849
850 def keys(self):
851 """Answers the glyph names of the font.
852
853 >>> from pagebot.fonttoolbox.objects.font import Font
854 >>> from pagebot.fonttoolbox.fontpaths import getTestFontsPath
855 >>> fontPath = getTestFontsPath()
856 >>> path = fontPath + '/fontbureau/Amstelvar-Roman-VF.ttf'
857 >>> f = getFont(path, lazy=False)
858 >>> 'A' in f.keys()
859 True
860 """
861 if 'glyf' in self.ttFont:
862 return self.ttFont['glyf'].keys()
863 return []
864
865 def _get_cmap(self):
866 """Answers the dictionary of sorted {unicode: glyphName, ...} in the

Callers 15

__contains__Method · 0.95
getGlossaryMethod · 0.45
appendPageMethod · 0.45
makePagesMethod · 0.45
getLastPageMethod · 0.45
wordsFunction · 0.45
reverseDictFunction · 0.45
node_divMethod · 0.45
generateInstanceFunction · 0.45
_get_blueBarsMethod · 0.45
_get_glyphNamesMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected