CID mode for Unicode fonts

Navigation:  Publishing > PDF and Printed Manuals >

CID mode for Unicode fonts

Previous pageReturn to chapter overviewNext page

The CID Font Mode option in Configuration > Publishing Options > Adobe PDF > Font Embedding is a rather esoteric technology that can reduce the size of your PDF and improve font rendering.

When you activate CID Font Mode by setting it to Unicode the characters actually used in the project are embedded in the PDF file, in a special internal format. However, it only works with fonts that actually contain all the characters you need to display. If you select a normal western font like Trebuchet that does not contain the characters for the language you are using you will have problems. The text will automatically be rendered as graphical glyphs because the characters are not available, which will make your PDF files huge. Also, it will not be possible to select or copy text from the PDF, because it does not contain text, only graphics.

CID Font Mode is only relevant for Unicode fonts!

Recommendations for CID Font Mode

It is not really possible to make provide more than a general rule of thumb for CID font mode: It should usually be off for Asian languages, Russian and Greek and it can often provide better rendering and smaller PDF sizes for other languages. We can only suggest that you test your PDFs with CID on and off to see which is better for your specific needs.

PDF files much too large:
If your PDF files get massively larger with CID switched on that is a sure sign that the fonts you are using do not contain all the characters you need. This also means that these fonts will not actually be used even if CID is off: Then, Windows will perform font substitution and will replace your font with one that does contain the necessary characters (usually Arial Unicode).

Special Unicode characters:
If special characters are not rendering correctly this is also a sign that the font you are using does not contain all the necessary characters, and Windows font substitution is also failing to find them. The only way to really get all characters to render correctly is to use fonts that really contain all the characters you are using. Otherwise you will get oversized PDFs or incorrect rendering or both.

Why CID Font Mode exists

Although Help & Manual can generate PDFs from projects written in Unicode-based languages, the Adobe PDF format does not actually support Unicode directly. This is because PDF is a universal format designed to be displayed on any computer running any operating system. If PDF files were encoded with Unicode they would not display on older operating systems like Windows 98 and Windows NT that have no Unicode support.

PDF files gets around this problem by using a different encoding internally that can map and represent all the Unicode characters. PDF currently supports two internal encoding formats for Unicode: double-byte characters (which are often mistakenly confused with Unicode) and "character identity definition" or CID.

CID Font Mode: CID Off

When CID Font Mode is set to CID Off Unicode font character codes are exported in double-byte format which are used to reference the font characters. Unicode fonts not available on the user's computer must be embedded in the PDF to be rendered correctly.

CID Font Mode: Unicode

When you set CID Font Mode to Unicode the PDF engine does not embed the entire font. Instead, it only embeds the characters that are actually used, which are stored in a special internal format. A single copy of each character in each size used is stored as a graphical glyph and it is then referenced in the text with a special character code that makes it possible to copy text and search in the PDF. You might think that this would make it unnecessary to embed fonts not available on the user's computer in the PDF, but unfortunately this is not always the case.

See also:

International languages setup

Adobe PDF - Font Embedding (Configuration Options)