Selective Font Embedding
If your document uses a specialized font along with the commonly available fonts such as Arial, you may want to embed just that specialized font (or several fonts) without embedding all fonts used in the document. To do that, follow these steps:
1. Set FontHandling to a value other than FontHandling.EmbedFonts or FontHandling.EmbedActualFonts. This will leave the EmbeddedFonts collection empty when the document generates;
2. Add the specialized fonts (they must be installed on the current system) to the document's EmbeddedFonts collection manually in code. To create an EmbeddedFont, pass the.NET Font object corresponding to your custom font to the EmbeddedFont's constructor. Add the required glyphs to the font using the EmbeddedFont.AddGlyphs method (several overloads are provided).
When a C1PrintDocument with the EmbeddedFonts collection created in this way is saved (as C1DX or C1D file), just the fonts specified in that collection are embedded in the document.
|