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

Function path2FontId

Lib/pagebot/toolbox/transformer.py:690–696  ·  view source on GitHub ↗

Answers the font ID for the font associated with this path. If the path does not exist, or if the font name is invalid, then answer None.

(path)

Source from the content-addressed store, hash-verified

688 return path2FormatPath(path, 'autohint.ttf')
689
690def path2FontId(path):
691 """Answers the font ID for the font associated with this path. If the path
692 does not exist, or if the font name is invalid, then answer None."""
693 if path is not None:
694 name = path2Name(path)
695 return name
696 return None
697
698def path2FileName(path):
699 fileName = path.split('/')[-1]

Callers

nothing calls this directly

Calls 1

path2NameFunction · 0.85

Tested by

no test coverage detected