[reportlab-users] Bug when importing TrueType fonts with names containing blanks
Robin Becker
robin at reportlab.com
Thu Nov 29 13:08:33 EST 2007
Dinu Gherman wrote:
> Hi,
>
> I'm getting an error when trying to use TrueType fonts containing
> blanks in their font names. See the following traceback:
>
.......
I found this in an Adobe document
http://www.adobe.com/devnet/font/pdfs/5088.FontNames.pdf
> 2.2 The PostScript Language FontName
> The
> FontName
> generally consists of a family name (specifically, the one
> used for
> FamilyName
> ), followed by a hyphen and style attributes in the same
> order as in the
> FullName
> . For compatibility with the earliest versions of
> PostScript interpreters and with the file systems in some operating systems,
> Adobe limits the number of characters in the
> FontName
> to 29 characters.
> As with any PostScript language name, a valid
> FontName
> must not contain
> spaces, and may only use characters from the standard ASCII character set. If
> abbreviations are necessary to meet the 29 character limit, the abbreviations
> should be used for the entire family. In some cases, some additional
> characters may be included after the family name and before the hyphen,
> such as a Vendor ID (see section 2.4) or a language label such as
> Greek
> or
> Cyrillic
> .
so whether we should allow spaces is problematic. Certainly if we allow them in
the input fonts then we should replace them in our output PDF so they obey the
rules; then we likely are breaking someone's copyright etc etc etc.
Any real experts out there please pipe up. Last time this sort of thing came up
was when we had the not subsettable flag set. I think we agreed that even though
our software could subset we ought not to if it was specifically forbidden.
--
Robin Becker
More information about the reportlab-users
mailing list