Re[2]: [xep-support] Fairly urgent question about font encoding of Base 14 fonts

From: Alexei Gagarinov <>
Date: Mon Oct 15 2007 - 19:44:48 PDT


> Is the encoding actually non-standard, or does it merely *say*
> "Custom"? I don't quite know how to prove it one way or the other.

Let me explain some technical details:

Type 1 fonts are one-byte fonts.
It means that text is a sequence of one-byte characters (codes).

The most important step for all viewer/printing applications (while
reading or printing) is the correct codes-to-glyphs conversion.

Glyphs in Type 1 fonts are addressed by their names.
So Encoding for Type 1 fonts means (and is) glyph names to character
codes mapping (i.e. Encoding is a names-to-codes table).

And now an answer for your question:
"Custom" means that an encoding table is *explicitly* defined within
the PDF file.
It does not matter what the mapping is used, the document will always
be displayed and printed equally on any platform/printer (because of
explicitly mapping).

Currently XEP uses Latin-1 mapping.

'Ansi' (or 'Roman', or 'Expert') implies an implicit (but the
predefined) mapping. It means that the PDF file does not contain an
encoding table, but a viewer/printing application internally uses one
of predefined encoding tables. ('Ansi' is CP1252, 'Roman' is Mac OS
standard encoding, 'Expert' is an encoding for use with expert fonts;
see PDF Reference, Appendix D for details of character sets).

Documents with these encodings also will look/print equally on any

'Standard' means a font's built-in encoding.

Strictly speaking, such an encoding is system-dependant, because a
font with the same name may have variations in the built-in encoding
on different platforms. (Though Adobe uses so-called Standard Encoding
for Type 1 Latin-text fonts.)

One more important point here:
An encoding table have up to 256 (glyph) names (one byte is maximum
256 different characters). If text contains more than 256 characters
(or contains characters outside the predefined/explicitly defined
encoding) than the PDF file will contain additional encoding
(actually additional font's object with the same font name, but the
different encoding). And this additional encoding will always be
'custom' (i.e. explicitly defined).

Of course, there can be a situation when text consist of characters
from a font's built-in and/or Ansi character sets only:
JM>> A couple of years ago, I rendered a .fo file using XEP 3.6.3 and
JM>> ... Base 14 Type 1 fonts are encoded either Encoding: Ansi or
JM>> Encoding: Standard.

XEP 3.6 has been using a very complicated algorithm for selecting an
encoding table.

JM>> Using XEP 3.8, some fonts have Encoding: Custom and others have
JM>> Encoding: Standard (several have two entries, one of each), but
JM>> none of them have Encoding: Ansi.

XEP 3.8 has been using the more straightforward algorithm: the first
encoding is a font's built-in encoding, other encodings are explicitly
If text contains characters from the font's built-in encoding only,
then there is one entry (Standard); otherwise -- 2 entries.

But XEP 4 does not use a font's built-in encoding because of its
system-dependant nature.

JM>> But when I render a nearly-identical (editorial textual changes
JM>> only) .fo file using XEP 4.10 build 20070516, I get the same list
JM>> of fonts (except that no fonts show up twice), but they all have
JM>> Encoding: Custom.

Actually there are two encoding tables for those fonts that had 2
entries before, but I think that Acrobat just does not list the
identical encoding types twice.

> Oh, one more thing: I don't suppose that I could be a guinea pig for
> testing that extension in the next week or so?

I've already implemented this extension and it now in testing-cycle --
yes, we have our own 'guinea pigs' team -:).
I hope that XEP 4.11 will be
1. with this extension;
2. and very soon (this week).

But I'd like to note once more: you will can select the initial (i.e.
the first) encoding only.
If there are characters outside the selected encoding, you'll see
2 entries in the Fonts tab: the font entry with the selected encoding
(e.g. 'Ansi') and the font entry with the 'Custom' encoding.

> I have to deliver my documents to ISO very, very soon and they are
> being a bit difficult over this encoding issue.

Sorry for the delayed reply.
The thing is that ... see below -->

> Alternatively, if you can tell me how to reassure ISO that having a
> Custom encoding will not cause any platform difficulty in reading or
> printing the document, that would be extremely helpful.

--> I don't have a strong idea of how to reassure ISO.
All above is rather technical...

But I assure you that custom encoding will not cause any platform
difficulty in reading and printing the document.

> Thanks again,
> Jim


(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service
Received on Mon Oct 15 20:12:17 2007

This archive was generated by hypermail 2.1.8 : Mon Oct 15 2007 - 20:12:23 PDT