Closed tbonfort closed 12 years ago
Author: sgillies@frii.com Date: 2004/03/15 - 18:28
The metadata issue is resolved in bug 434.
For fonts, I am following suit. There's no real need to use the font filenames
attached to names, but nice to be able to know what fonts are in a map.
Have extended fontSetObj with getFirstFont and getNextFont methods. Below is
a test case that shows the usage.
# fontset tests
class FontSetTestCase(MapTestCase):
def testGetFontSetFile(self):
file = self.mapobj1.fontset.filename
assert file == 'fonts.txt', file
def testFontSetFonts(self):
fonts = []
font = None
while 1:
font = self.mapobj1.fontset.getNextFont(font)
if not font:
break
fonts.append(font)
assert fonts == ['LucidaSansRegular', 'LucidaSansDemiBold'], fonts
Reporter: sgillies@frii.com Date: 2003/09/26 - 17:06