[CFFToCFF2] Add a test
Exercises: https://github.com/fonttools/fonttools/pull/3518#discussion_r1611033728
This commit is contained in:
parent
6a812ce925
commit
1536efc22e
@ -5,6 +5,7 @@ import copy
|
||||
import os
|
||||
import sys
|
||||
import unittest
|
||||
from io import BytesIO
|
||||
|
||||
|
||||
class CffLibTest(DataFilesHandler):
|
||||
@ -119,5 +120,17 @@ class CffLibTest(DataFilesHandler):
|
||||
self.assertEqual(len(glyphOrder), len(set(glyphOrder)))
|
||||
|
||||
|
||||
class CFFToCFF2Test(DataFilesHandler):
|
||||
|
||||
def test_conversion(self):
|
||||
font_path = self.getpath("CFFToCFF2-1.otf")
|
||||
font = TTFont(font_path)
|
||||
from fontTools.cffLib.CFFToCFF2 import convertCFFToCFF2
|
||||
|
||||
convertCFFToCFF2(font)
|
||||
f = BytesIO()
|
||||
font.save(f)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(unittest.main())
|
||||
|
BIN
Tests/cffLib/data/CFFToCFF2-1.otf
Normal file
BIN
Tests/cffLib/data/CFFToCFF2-1.otf
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user