Skip to content

Commit

Permalink
Add a test
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanUkhov committed Mar 9, 2023
1 parent dc00c90 commit b56cd51
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/outlineCompiler_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,26 @@ def test_setupTable_meta(self, testufo):
assert meta.data["PRIA"] == b"Some private ascii string"
assert meta.data["PRIU"] == "Some private unicode string…".encode("utf-8")

def test_setupTable_name(self, testufo):
compiler = OutlineTTFCompiler(testufo)
compiler.compile()
actual = compiler.otf["name"].getName(1, 3, 1, 1033).string
assert actual == "Some Font Regular (Style Map Family Name)"

testufo.info.openTypeNameRecords.append(
{
"nameID": 1,
"platformID": 3,
"encodingID": 1,
"languageID": 1033,
"string": "Custom Name for Windows",
}
)
compiler = OutlineTTFCompiler(testufo)
compiler.compile()
actual = compiler.otf["name"].getName(1, 3, 1, 1033).string
assert actual == "Custom Name for Windows"


class OutlineOTFCompilerTest:
def test_setupTable_CFF_all_blues_defined(self, testufo):
Expand Down

0 comments on commit b56cd51

Please sign in to comment.