MCPcopy
hub / github.com/subframe7536/maple-font / set_font_name

Function set_font_name

source/py/utils.py:29–32  ·  view source on GitHub ↗
(font: TTFont, name: str, id: int, mac: bool | None = None)

Source from the content-addressed store, hash-verified

27
28
29def set_font_name(font: TTFont, name: str, id: int, mac: bool | None = None):
30 font["name"].setName(name, nameID=id, platformID=3, platEncID=1, langID=0x409) # type: ignore
31 if mac:
32 font["name"].setName(name, nameID=id, platformID=1, platEncID=0, langID=0x0) # type: ignore
33
34
35def get_font_name(font: TTFont, id: int) -> str:

Callers 3

update_font_namesFunction · 0.90
build_nfFunction · 0.90
add_ital_axis_to_statFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected