[reportlab-users] PDF without embedding fonts

Yuriy Asyutin yasyutin at gmail.com
Wed May 12 16:19:06 EDT 2010


Hello

I have a task to create PDF that contains utf-8 encoded data in Cyrillic
range without embedding any font resource. I've reviewed reportlab lib and
found that for not embedding fonts are such options:
1. to use one of the 14 standard fonts (those fonts do not contain Cyrillic
glyphs)
2. CID keyed fonts - current cidfontdata contain reference to CJK fonts.

Cyrillic glyphs are supported by Extended Language pack that can be
downloaded and installed into your desktop from adobe.com (MinionPro and
MyriadPro fonts OTF).

Looks like Extended Language pack fonts are not CID keyed (there is no CMap
files) - we get only *.otf files.

So, I tried to follow similar to CID font reference approach - created
another key Myriad in CIDFontInfo dict to test how such font can be accessed
from PDF file:

CIDFontInfo['Myriad'] = {
'Type':'/Font',
'Subtype':'/Type1',
'Name': '/MyriadPro-Regular' ,
'BaseFont': '/MyriadPro-Regular',
'Encoding': '/WinAnsiEncoding',
'Widths': [500]*256

In such way I could render glyphs of Latin group.

My questions are:

1. Is `Subtype/Type1` valid value for such OTF fonts and can I access
Cyrillic glyphs by using one of the unicode encodings and creating special
ToUnicode list?

Actually, I'm not sure - am I on the right way? Or maybe I can include a
CMap stream into PDF source and follow CID keyed appproach for Extended
Language pack.


I'd really appreciate any help to show me right direction.


Thanks

Yuriy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/reportlab-users/attachments/20100512/e1311d2b/attachment.htm>


More information about the reportlab-users mailing list