2963
|
1 |
|
|
2 |
"""Test TrueType font subsetting & embedding code.
|
|
3 |
|
|
4 |
This test uses a sample font (luxiserif.ttf) taken from XFree86 which is called Luxi
|
|
5 |
Serif Regular and is covered under the license in ../fonts/luxiserif_licence.txt.
|
|
6 |
"""
|
|
7 |
|
|
8 |
import string
|
|
9 |
from cStringIO import StringIO
|
|
10 |
|
2966
|
11 |
import unittest
|
|
12 |
from tests.utils import makeSuiteForClasses, outputfile, printLocation, NearTestCase
|
2963
|
13 |
|
|
14 |
from reportlab.pdfgen.canvas import Canvas
|
|
15 |
from reportlab.pdfbase import pdfmetrics
|
|
16 |
from reportlab.pdfbase.pdfdoc import PDFDocument, PDFError
|
|
17 |
from reportlab.pdfbase.ttfonts import TTFont, TTFontFace, TTFontFile, TTFOpenFile, \
|
|
18 |
TTFontParser, TTFontMaker, TTFError, \
|
|
19 |
parse_utf8, makeToUnicodeCMap, \
|
|
20 |
FF_SYMBOLIC, FF_NONSYMBOLIC, \
|
|
21 |
calcChecksum, add32
|
|
22 |
|
|
23 |
def utf8(code):
|
|
24 |
"Convert a given UCS character index into UTF-8"
|
|
25 |
if code < 0 or code > 0x7FFFFFFF:
|
|
26 |
raise ValueError, 'Invalid UCS character 0x%x' % code
|
|
27 |
elif code < 0x00000080:
|
|
28 |
return chr(code)
|
|
29 |
elif code < 0x00000800:
|
|
30 |
return '%c%c' % \
|
|
31 |
(0xC0 + (code >> 6),
|
|
32 |
0x80 + (code & 0x3F))
|
|
33 |
elif code < 0x00010000:
|
|
34 |
return '%c%c%c' % \
|
|
35 |
(0xE0 + (code >> 12),
|
|
36 |
0x80 + ((code >> 6) & 0x3F),
|
|
37 |
0x80 + (code & 0x3F))
|
|
38 |
elif code < 0x00200000:
|
|
39 |
return '%c%c%c%c' % \
|
|
40 |
(0xF0 + (code >> 18),
|
|
41 |
0x80 + ((code >> 12) & 0x3F),
|
|
42 |
0x80 + ((code >> 6) & 0x3F),
|
|
43 |
0x80 + (code & 0x3F))
|
|
44 |
elif code < 0x04000000:
|
|
45 |
return '%c%c%c%c%c' % \
|
|
46 |
(0xF8 + (code >> 24),
|
|
47 |
0x80 + ((code >> 18) & 0x3F),
|
|
48 |
0x80 + ((code >> 12) & 0x3F),
|
|
49 |
0x80 + ((code >> 6) & 0x3F),
|
|
50 |
0x80 + (code & 0x3F))
|
|
51 |
else:
|
|
52 |
return '%c%c%c%c%c%c' % \
|
|
53 |
(0xFC + (code >> 30),
|
|
54 |
0x80 + ((code >> 24) & 0x3F),
|
|
55 |
0x80 + ((code >> 18) & 0x3F),
|
|
56 |
0x80 + ((code >> 12) & 0x3F),
|
|
57 |
0x80 + ((code >> 6) & 0x3F),
|
|
58 |
0x80 + (code & 0x3F))
|
|
59 |
|
|
60 |
def _simple_subset_generation(fn,npages,alter=0):
|
|
61 |
c = Canvas(outputfile(fn))
|
|
62 |
c.setFont('Helvetica', 30)
|
|
63 |
c.drawString(100,700, 'Unicode TrueType Font Test %d pages' % npages)
|
|
64 |
# Draw a table of Unicode characters
|
|
65 |
for p in xrange(npages):
|
|
66 |
for fontName in ('TestFont','RinaFont'):
|
|
67 |
c.setFont(fontName, 10)
|
|
68 |
for i in xrange(32):
|
|
69 |
for j in xrange(32):
|
|
70 |
ch = utf8(i * 32 + j+p*alter)
|
|
71 |
c.drawString(80 + j * 13 + int(j / 16) * 4, 600 - i * 13 - int(i / 8) * 8, ch)
|
|
72 |
c.showPage()
|
|
73 |
c.save()
|
|
74 |
|
|
75 |
class TTFontsTestCase(unittest.TestCase):
|
|
76 |
"Make documents with TrueType fonts"
|
|
77 |
|
|
78 |
def testTTF(self):
|
|
79 |
"Test PDF generation with TrueType fonts"
|
|
80 |
pdfmetrics.registerFont(TTFont("TestFont", "luxiserif.ttf"))
|
|
81 |
pdfmetrics.registerFont(TTFont("RinaFont", "rina.ttf"))
|
|
82 |
_simple_subset_generation('test_pdfbase_ttfonts1.pdf',1)
|
|
83 |
_simple_subset_generation('test_pdfbase_ttfonts3.pdf',3)
|
|
84 |
_simple_subset_generation('test_pdfbase_ttfonts35.pdf',3,5)
|
|
85 |
|
|
86 |
# Do it twice with the same font object
|
|
87 |
c = Canvas(outputfile('test_pdfbase_ttfontsadditional.pdf'))
|
|
88 |
# Draw a table of Unicode characters
|
|
89 |
c.setFont('TestFont', 10)
|
|
90 |
c.drawString(100, 700, 'Hello, ' + utf8(0xffee))
|
|
91 |
c.save()
|
|
92 |
|
|
93 |
|
|
94 |
class TTFontFileTestCase(NearTestCase):
|
|
95 |
"Tests TTFontFile, TTFontParser and TTFontMaker classes"
|
|
96 |
|
|
97 |
def testFontFileFailures(self):
|
|
98 |
"Tests TTFontFile constructor error checks"
|
|
99 |
self.assertRaises(TTFError, TTFontFile, "nonexistent file")
|
|
100 |
self.assertRaises(TTFError, TTFontFile, StringIO(""))
|
|
101 |
self.assertRaises(TTFError, TTFontFile, StringIO("invalid signature"))
|
|
102 |
self.assertRaises(TTFError, TTFontFile, StringIO("OTTO - OpenType not supported yet"))
|
|
103 |
self.assertRaises(TTFError, TTFontFile, StringIO("\0\1\0\0"))
|
|
104 |
|
|
105 |
def testFontFileReads(self):
|
|
106 |
"Tests TTFontParset.read_xxx"
|
|
107 |
|
|
108 |
class FakeTTFontFile(TTFontParser):
|
|
109 |
def __init__(self, data):
|
|
110 |
self._ttf_data = data
|
|
111 |
self._pos = 0
|
|
112 |
|
|
113 |
ttf = FakeTTFontFile("\x81\x02\x03\x04" "\x85\x06" "ABCD" "\x7F\xFF" "\x80\x00" "\xFF\xFF")
|
|
114 |
self.assertEquals(ttf.read_ulong(), 0x81020304L) # big-endian
|
|
115 |
self.assertEquals(ttf._pos, 4)
|
|
116 |
self.assertEquals(ttf.read_ushort(), 0x8506)
|
|
117 |
self.assertEquals(ttf._pos, 6)
|
|
118 |
self.assertEquals(ttf.read_tag(), 'ABCD')
|
|
119 |
self.assertEquals(ttf._pos, 10)
|
|
120 |
self.assertEquals(ttf.read_short(), 0x7FFF)
|
|
121 |
self.assertEquals(ttf.read_short(), -0x8000)
|
|
122 |
self.assertEquals(ttf.read_short(), -1)
|
|
123 |
|
|
124 |
def testFontFile(self):
|
|
125 |
"Tests TTFontFile and TTF parsing code"
|
|
126 |
ttf = TTFontFile("luxiserif.ttf")
|
|
127 |
self.assertEquals(ttf.name, "LuxiSerif")
|
|
128 |
self.assertEquals(ttf.flags, FF_SYMBOLIC)
|
|
129 |
self.assertEquals(ttf.italicAngle, 0.0)
|
|
130 |
self.assertNear(ttf.ascent,783.203125) # FIXME: or 992?
|
|
131 |
self.assertNear(ttf.descent,-205.078125) # FIXME: or -210?
|
|
132 |
self.assertEquals(ttf.capHeight, 0)
|
|
133 |
self.assertNear(ttf.bbox, [-203.125, -210.9375, 983.3984375, 992.67578125])
|
|
134 |
self.assertEquals(ttf.stemV, 87)
|
|
135 |
self.assertEquals(ttf.defaultWidth, 250)
|
|
136 |
|
|
137 |
def testAdd32(self):
|
|
138 |
"Test add32"
|
|
139 |
self.assertEquals(add32(10, -6), 4)
|
|
140 |
self.assertEquals(add32(6, -10), -4&0xFFFFFFFFL)
|
|
141 |
self.assertEquals(add32(0x80000000L, -1), 0x7FFFFFFF)
|
|
142 |
self.assertEquals(add32(0x7FFFFFFF, 1), 0x80000000L)
|
|
143 |
|
|
144 |
def testChecksum(self):
|
|
145 |
"Test calcChecksum function"
|
|
146 |
self.assertEquals(calcChecksum(""), 0)
|
|
147 |
self.assertEquals(calcChecksum("\1"), 0x01000000)
|
|
148 |
self.assertEquals(calcChecksum("\x01\x02\x03\x04\x10\x20\x30\x40"), 0x11223344)
|
|
149 |
self.assertEquals(calcChecksum("\x81"), 0x81000000L)
|
|
150 |
self.assertEquals(calcChecksum("\x81\x02"), 0x81020000L)
|
|
151 |
self.assertEquals(calcChecksum("\x81\x02\x03"), 0x81020300L)
|
|
152 |
self.assertEquals(calcChecksum("\x81\x02\x03\x04"), 0x81020304L)
|
|
153 |
self.assertEquals(calcChecksum("\x81\x02\x03\x04\x05"), 0x86020304L)
|
|
154 |
self.assertEquals(calcChecksum("\x41\x02\x03\x04\xD0\x20\x30\x40"), 0x11223344)
|
|
155 |
self.assertEquals(calcChecksum("\xD1\x02\x03\x04\x40\x20\x30\x40"), 0x11223344)
|
|
156 |
self.assertEquals(calcChecksum("\x81\x02\x03\x04\x90\x20\x30\x40"), 0x11223344)
|
|
157 |
self.assertEquals(calcChecksum("\x7F\xFF\xFF\xFF\x00\x00\x00\x01"), 0x80000000L)
|
|
158 |
|
|
159 |
def testFontFileChecksum(self):
|
|
160 |
"Tests TTFontFile and TTF parsing code"
|
|
161 |
file = TTFOpenFile("luxiserif.ttf")[1].read()
|
|
162 |
TTFontFile(StringIO(file), validate=1) # should not fail
|
|
163 |
file1 = file[:12345] + "\xFF" + file[12346:] # change one byte
|
|
164 |
self.assertRaises(TTFError, TTFontFile, StringIO(file1), validate=1)
|
|
165 |
file1 = file[:8] + "\xFF" + file[9:] # change one byte
|
|
166 |
self.assertRaises(TTFError, TTFontFile, StringIO(file1), validate=1)
|
|
167 |
|
|
168 |
def testSubsetting(self):
|
|
169 |
"Tests TTFontFile and TTF parsing code"
|
|
170 |
ttf = TTFontFile("luxiserif.ttf")
|
|
171 |
subset = ttf.makeSubset([0x41, 0x42])
|
|
172 |
subset = TTFontFile(StringIO(subset), 0)
|
|
173 |
for tag in ('cmap', 'head', 'hhea', 'hmtx', 'maxp', 'name', 'OS/2',
|
|
174 |
'post', 'cvt ', 'fpgm', 'glyf', 'loca', 'prep'):
|
|
175 |
self.assert_(subset.get_table(tag))
|
|
176 |
|
|
177 |
subset.seek_table('loca')
|
|
178 |
for n in range(4):
|
|
179 |
pos = subset.read_ushort() # this is actually offset / 2
|
|
180 |
self.failIf(pos % 2 != 0, "glyph %d at +%d should be long aligned" % (n, pos * 2))
|
|
181 |
|
|
182 |
self.assertEquals(subset.name, "LuxiSerif")
|
|
183 |
self.assertEquals(subset.flags, FF_SYMBOLIC)
|
|
184 |
self.assertEquals(subset.italicAngle, 0.0)
|
|
185 |
self.assertNear(subset.ascent,783.203125) # FIXME: or 992?
|
|
186 |
self.assertNear(subset.descent,-205.078125) # FIXME: or -210?
|
|
187 |
self.assertEquals(subset.capHeight, 0)
|
|
188 |
self.assertNear(subset.bbox, [-203.125, -210.9375, 983.3984375, 992.67578125])
|
|
189 |
self.assertEquals(subset.stemV, 87)
|
|
190 |
|
|
191 |
def testFontMaker(self):
|
|
192 |
"Tests TTFontMaker class"
|
|
193 |
ttf = TTFontMaker()
|
|
194 |
ttf.add("ABCD", "xyzzy")
|
|
195 |
ttf.add("QUUX", "123")
|
|
196 |
ttf.add("head", "12345678xxxx")
|
|
197 |
stm = ttf.makeStream()
|
|
198 |
ttf = TTFontParser(StringIO(stm), 0)
|
|
199 |
self.assertEquals(ttf.get_table("ABCD"), "xyzzy")
|
|
200 |
self.assertEquals(ttf.get_table("QUUX"), "123")
|
|
201 |
|
|
202 |
|
|
203 |
class TTFontFaceTestCase(unittest.TestCase):
|
|
204 |
"Tests TTFontFace class"
|
|
205 |
|
|
206 |
def testAddSubsetObjects(self):
|
|
207 |
"Tests TTFontFace.addSubsetObjects"
|
|
208 |
face = TTFontFace("luxiserif.ttf")
|
|
209 |
doc = PDFDocument()
|
|
210 |
fontDescriptor = face.addSubsetObjects(doc, "TestFont", [ 0x78, 0x2017 ])
|
|
211 |
fontDescriptor = doc.idToObject[fontDescriptor.name].dict
|
|
212 |
self.assertEquals(fontDescriptor['Type'], '/FontDescriptor')
|
|
213 |
self.assertEquals(fontDescriptor['Ascent'], face.ascent)
|
|
214 |
self.assertEquals(fontDescriptor['CapHeight'], face.capHeight)
|
|
215 |
self.assertEquals(fontDescriptor['Descent'], face.descent)
|
|
216 |
self.assertEquals(fontDescriptor['Flags'], (face.flags & ~FF_NONSYMBOLIC) | FF_SYMBOLIC)
|
|
217 |
self.assertEquals(fontDescriptor['FontName'], "/TestFont")
|
|
218 |
self.assertEquals(fontDescriptor['FontBBox'].sequence, face.bbox)
|
|
219 |
self.assertEquals(fontDescriptor['ItalicAngle'], face.italicAngle)
|
|
220 |
self.assertEquals(fontDescriptor['StemV'], face.stemV)
|
|
221 |
fontFile = fontDescriptor['FontFile2']
|
|
222 |
fontFile = doc.idToObject[fontFile.name]
|
|
223 |
self.assert_(fontFile.content != "")
|
|
224 |
|
|
225 |
|
|
226 |
class TTFontTestCase(NearTestCase):
|
|
227 |
"Tests TTFont class"
|
|
228 |
|
|
229 |
def testParseUTF8(self):
|
|
230 |
"Tests parse_utf8"
|
|
231 |
self.assertEquals(parse_utf8(""), [])
|
|
232 |
for i in range(0, 0x80):
|
|
233 |
self.assertEquals(parse_utf8(chr(i)), [i])
|
|
234 |
for i in range(0x80, 0xA0):
|
|
235 |
self.assertRaises(ValueError, parse_utf8, chr(i))
|
|
236 |
self.assertEquals(parse_utf8("abc"), [0x61, 0x62, 0x63])
|
|
237 |
self.assertEquals(parse_utf8("\xC2\xA9x"), [0xA9, 0x78])
|
|
238 |
self.assertEquals(parse_utf8("\xE2\x89\xA0x"), [0x2260, 0x78])
|
|
239 |
self.assertRaises(ValueError, parse_utf8, "\xE2\x89x")
|
|
240 |
# for i in range(0, 0xFFFF): - overkill
|
|
241 |
for i in range(0x80, 0x200) + range(0x300, 0x400) + [0xFFFE, 0xFFFF]:
|
|
242 |
self.assertEquals(parse_utf8(utf8(i)), [i])
|
|
243 |
|
|
244 |
def testStringWidth(self):
|
|
245 |
"Test TTFont.stringWidth"
|
|
246 |
font = TTFont("TestFont", "luxiserif.ttf")
|
|
247 |
self.assert_(font.stringWidth("test", 10) > 0)
|
|
248 |
width = font.stringWidth(utf8(0x2260) * 2, 1000)
|
|
249 |
expected = font.face.getCharWidth(0x2260) * 2
|
|
250 |
self.assertNear(width,expected)
|
|
251 |
|
|
252 |
def testSplitString(self):
|
|
253 |
"Tests TTFont.splitString"
|
|
254 |
doc = PDFDocument()
|
|
255 |
font = TTFont("TestFont", "luxiserif.ttf")
|
|
256 |
text = string.join(map(utf8, xrange(0, 511)), "")
|
|
257 |
allchars = string.join(map(chr, xrange(0, 256)), "")
|
|
258 |
nospace = allchars[:32] + allchars[33:]
|
|
259 |
chunks = [(0, allchars), (1, nospace)]
|
|
260 |
self.assertEquals(font.splitString(text, doc), chunks)
|
|
261 |
# Do it twice
|
|
262 |
self.assertEquals(font.splitString(text, doc), chunks)
|
|
263 |
|
|
264 |
text = string.join(map(utf8, range(510, -1, -1)), "")
|
|
265 |
allchars = string.join(map(chr, range(255, -1, -1)), "")
|
|
266 |
nospace = allchars[:223] + allchars[224:]
|
|
267 |
chunks = [(1, nospace), (0, allchars)]
|
|
268 |
self.assertEquals(font.splitString(text, doc), chunks)
|
|
269 |
|
|
270 |
def testSplitStringSpaces(self):
|
|
271 |
# In order for justification (word spacing) to work, the space
|
|
272 |
# glyph must have a code 32, and no other character should have
|
|
273 |
# that code in any subset, or word spacing will be applied to it.
|
|
274 |
|
|
275 |
doc = PDFDocument()
|
|
276 |
font = TTFont("TestFont", "luxiserif.ttf")
|
|
277 |
text = string.join(map(utf8, range(512, -1, -1)), "")
|
|
278 |
chunks = font.splitString(text, doc)
|
|
279 |
state = font.state[doc]
|
|
280 |
self.assertEquals(state.assignments[32], 32)
|
|
281 |
self.assertEquals(state.subsets[0][32], 32)
|
|
282 |
self.assertEquals(state.subsets[1][32], 32)
|
|
283 |
|
|
284 |
def testSubsetInternalName(self):
|
|
285 |
"Tests TTFont.getSubsetInternalName"
|
|
286 |
doc = PDFDocument()
|
|
287 |
font = TTFont("TestFont", "luxiserif.ttf")
|
|
288 |
# Actually generate some subsets
|
|
289 |
text = string.join(map(utf8, range(0, 513)), "")
|
|
290 |
font.splitString(text, doc)
|
|
291 |
self.assertRaises(IndexError, font.getSubsetInternalName, -1, doc)
|
|
292 |
self.assertRaises(IndexError, font.getSubsetInternalName, 3, doc)
|
|
293 |
self.assertEquals(font.getSubsetInternalName(0, doc), "/F1+0")
|
|
294 |
self.assertEquals(font.getSubsetInternalName(1, doc), "/F1+1")
|
|
295 |
self.assertEquals(font.getSubsetInternalName(2, doc), "/F1+2")
|
|
296 |
self.assertEquals(doc.delayedFonts, [font])
|
|
297 |
|
|
298 |
def testAddObjectsEmpty(self):
|
|
299 |
"TTFont.addObjects should not fail when no characters were used"
|
|
300 |
font = TTFont("TestFont", "luxiserif.ttf")
|
|
301 |
doc = PDFDocument()
|
|
302 |
font.addObjects(doc)
|
|
303 |
|
|
304 |
def no_longer_testAddObjectsResets(self):
|
|
305 |
"Test that TTFont.addObjects resets the font"
|
|
306 |
# Actually generate some subsets
|
|
307 |
doc = PDFDocument()
|
|
308 |
font = TTFont("TestFont", "luxiserif.ttf")
|
|
309 |
font.splitString('a', doc) # create some subset
|
|
310 |
doc = PDFDocument()
|
|
311 |
font.addObjects(doc)
|
|
312 |
self.assertEquals(font.frozen, 0)
|
|
313 |
self.assertEquals(font.nextCode, 0)
|
|
314 |
self.assertEquals(font.subsets, [])
|
|
315 |
self.assertEquals(font.assignments, {})
|
|
316 |
font.splitString('ba', doc) # should work
|
|
317 |
|
|
318 |
def testParallelConstruction(self):
|
|
319 |
"Test that TTFont can be used for different documents at the same time"
|
|
320 |
doc1 = PDFDocument()
|
|
321 |
doc2 = PDFDocument()
|
|
322 |
font = TTFont("TestFont", "luxiserif.ttf")
|
|
323 |
self.assertEquals(font.splitString(u'hello ', doc1), [(0, 'hello ')])
|
|
324 |
self.assertEquals(font.splitString(u'hello ', doc2), [(0, 'hello ')])
|
|
325 |
self.assertEquals(font.splitString(u'\u0410\u0411'.encode('UTF-8'), doc1), [(0, '\x80\x81')])
|
|
326 |
self.assertEquals(font.splitString(u'\u0412'.encode('UTF-8'), doc2), [(0, '\x80')])
|
|
327 |
font.addObjects(doc1)
|
|
328 |
self.assertEquals(font.splitString(u'\u0413'.encode('UTF-8'), doc2), [(0, '\x81')])
|
|
329 |
font.addObjects(doc2)
|
|
330 |
|
|
331 |
def testAddObjects(self):
|
|
332 |
"Test TTFont.addObjects"
|
|
333 |
# Actually generate some subsets
|
|
334 |
doc = PDFDocument()
|
|
335 |
font = TTFont("TestFont", "luxiserif.ttf")
|
|
336 |
font.splitString('a', doc) # create some subset
|
|
337 |
internalName = font.getSubsetInternalName(0, doc)[1:]
|
|
338 |
font.addObjects(doc)
|
|
339 |
pdfFont = doc.idToObject[internalName]
|
|
340 |
self.assertEquals(doc.idToObject['BasicFonts'].dict[internalName], pdfFont)
|
|
341 |
self.assertEquals(pdfFont.Name, internalName)
|
|
342 |
self.assertEquals(pdfFont.BaseFont, "AAAAAA+LuxiSerif")
|
|
343 |
self.assertEquals(pdfFont.FirstChar, 0)
|
|
344 |
self.assertEquals(pdfFont.LastChar, 127)
|
|
345 |
self.assertEquals(len(pdfFont.Widths.sequence), 128)
|
|
346 |
toUnicode = doc.idToObject[pdfFont.ToUnicode.name]
|
|
347 |
self.assert_(toUnicode.content != "")
|
|
348 |
fontDescriptor = doc.idToObject[pdfFont.FontDescriptor.name]
|
|
349 |
self.assertEquals(fontDescriptor.dict['Type'], '/FontDescriptor')
|
|
350 |
|
|
351 |
def testMakeToUnicodeCMap(self):
|
|
352 |
"Test makeToUnicodeCMap"
|
|
353 |
self.assertEquals(makeToUnicodeCMap("TestFont", [ 0x1234, 0x4321, 0x4242 ]),
|
|
354 |
"""/CIDInit /ProcSet findresource begin
|
|
355 |
12 dict begin
|
|
356 |
begincmap
|
|
357 |
/CIDSystemInfo
|
|
358 |
<< /Registry (TestFont)
|
|
359 |
/Ordering (TestFont)
|
|
360 |
/Supplement 0
|
|
361 |
>> def
|
|
362 |
/CMapName /TestFont def
|
|
363 |
/CMapType 2 def
|
|
364 |
1 begincodespacerange
|
|
365 |
<00> <02>
|
|
366 |
endcodespacerange
|
|
367 |
3 beginbfchar
|
|
368 |
<00> <1234>
|
|
369 |
<01> <4321>
|
|
370 |
<02> <4242>
|
|
371 |
endbfchar
|
|
372 |
endcmap
|
|
373 |
CMapName currentdict /CMap defineresource pop
|
|
374 |
end
|
|
375 |
end""")
|
|
376 |
|
|
377 |
|
|
378 |
def makeSuite():
|
|
379 |
suite = makeSuiteForClasses(
|
|
380 |
TTFontsTestCase,
|
|
381 |
TTFontFileTestCase,
|
|
382 |
TTFontFaceTestCase,
|
|
383 |
TTFontTestCase)
|
|
384 |
return suite
|
|
385 |
|
|
386 |
|
|
387 |
#noruntests
|
|
388 |
if __name__ == "__main__":
|
|
389 |
unittest.TextTestRunner().run(makeSuite())
|
|
390 |
printLocation()
|