[reportlab-users] Handling TrueType fonts not allowing subsetting

Dinu Gherman gherman at darwin.in-berlin.de
Mon Jun 17 08:44:05 EDT 2013


Hi,

I've stumbled for the first time over a TrueType font, that doesn't
allow subsetting, see traceback below. Strange enough a thing to
do... Does anybody know a workaround? Maybe if only including the
whole font without subsetting?

BTW, this is on Py 2.7.5, RL, 2.7, Mac OS X 10.6.8.

Thanks,

Dinu


$ python test.py
Traceback (most recent call last):
File "test.py", line 540, in <module>
registerTrueTypeFont("FluxMedium", "/Fonts/truetype/flux1.ttf")
File "test.py", line 108, in registerTrueTypeFont
font = TTFont(name, path)
File "/opt/lib/python2.7/site-packages/reportlab/pdfbase/ttfonts.py", line 1009, in __init__
self.face = TTFontFace(filename, validate=validate, subfontIndex=subfontIndex)
File "/opt/lib/python2.7/site-packages/reportlab/pdfbase/ttfonts.py", line 915, in __init__
TTFontFile.__init__(self, filename, validate=validate, subfontIndex=subfontIndex)
File "/opt/lib/python2.7/site-packages/reportlab/pdfbase/ttfonts.py", line 413, in __init__
self.extractInfo(charInfo)
File "/opt/lib/python2.7/site-packages/reportlab/pdfbase/ttfonts.py", line 544, in extractInfo
raise TTFError, 'Font does not allow subsetting/embedding (%04X)' % fsType
reportlab.pdfbase.ttfonts.TTFError: Font does not allow subsetting/embedding (0104)



More information about the reportlab-users mailing list