开发者

Ghostscript and PDF with fonts not embedded

My system config is OS X with GhostScript 9.02 I would like to know (step by step) how to add and configure the file in GS that make p开发者_如何学运维ossible to do substitutions for fonts. My GS installation don't have installed/created the file. How can I add it?

The problem is that I have One PDF with all embedded subset fonts, except one. And for this one GS can't rasterize the page.

How is possible to solve this problem?


There are two categories of fonts in PDF -- "regular" fonts and CIDFonts. For regular fonts, only a single byte will be used for each glyph and there will be an Encoding and other information provided in the PDF to select the glyph from the font. Ghostscript will make a guess for a substitute font based on the FontName and while it may not look like the original, it should print.

CIDFonts, however are often accessed using multiple bytes, and the name implies some CMap needed for properly decoding the byte stream into a glyph number. The other 'gotcha' is that glyph numbers to particular glyphs will vary depending on the 'Ordering'. For CIDFonts that are not embedded, Ghostscript will produce error output like:

Can't find CID font "KozMin-Bold".
Substituting CID font /Adobe-Japan1 for /KozMin-Bold, see 
  doc/Use.htm#CIDFontSubstitution.
The substitute CID font "Adobe-Japan1" is not provided either. Will exit with error.

What this tells you is that the PDF referenced a font "Kozmin-Bold" that specified Ordering "Adobe-Japan1" and:

1) the Kozmin-Bold font was not found in Ghostscript's Resource/CIDFont directory

2) There was no mapping defined for Kozmin-Bold in the cidfmap file (GS searches for this file in any of the LIBPATH listed as 'Search Paths' from "gs -h".

3) There was no mapping for fonts with Adobe-Japan1 Ordering in the cidfmap. If Ghostscript can't find the font using steps 1 and 2, then it will substitute a font using the Ordering as the font name. At least this should get the correct glyph.

I don't want to reproduce the cidfmap documentation here since we update it on occassion, but it can be accessed online at: http://www.artifex.com/gs-current-release/Use.htm#CIDFontSubstitution

Examples are provided in that section of the Ghostscript documentation.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜