<< Click to Display Table of Contents >> SetFontControl |
[VPE Professional Edition and above]
Allows to set several parameters for an individual font. This function overrides the settings of EmbedAllFonts and SubsetAllFonts.
method void VPE.SetFontControl(
string FontName,
string SubstFontName,
boolean DoEmbed,
boolean DoSubset
)
string FontName
the font you want to set the parameters for
string SubstFontName
the font with which you want to substitute the original font with
boolean DoEmbed
Value |
Description |
True |
if the font is a True-Type font, it will be embedded into the document |
False |
the font will not be embedded into the document |
boolean DoSubset
Value |
Description |
True |
if the font is a True-Type font, and it is embedded, it will be subsetted |
False |
the font will not be subsetted |
Remarks:
You can call this method repeatedly for each font you want to set individual parameters for. The settings can be deleted by calling the method ResetFontControl().
Embedding for specific fonts can only be turned off, if global embedding is turned on (see EmbedAllFonts).
Subsetting for specific fonts can only be turned off, if global subsetting is turned on (see SubsetAllFonts).
Whilst the settings for font substitution of this method are only active during the export to PDF documents, there is a second method to substitute fonts SetFontSubstitution(), which is always active.
For important details about fonts and font handling, please see the Programmer's Manual, chapter "Programming Techniques", subchapter "Fonts and Font Handling".
Example:
VPE.SetFontControl("Arial", "Helvetica", False, False)
VPE.SetFontControl("Times New Roman", "Times", False, False)
Instructs VPE to substitute "Arial" with "Helvetica" and "Times New Roman" with "Times".
Since Helvetica as well as Times are PostScript fonts, VPE can neither embed nor subset them. But because both fonts are standard Base 14 PostScript fonts, they are supported by PDF Readers on any platform, so embedding (and therefore subsetting) is not required.
Example 2:
VPE.EmbedAllFonts = True
VPE.SubsetAllFonts = True
VPE.SetFontControl("Arial", "Arial", True, False);
VPE.SetFontControl("Times New Roman", "Times New Roman", True, True);
VPE.SetFontControl("Verdana", "Verdana", False, False);
In the code above, no font substitution is used.
For Arial embedding is enabled and subsetting is disabled.
For Times New Roman embedding and subsetting is enabled.
For Verdana embedding and subsetting is disabled.
Note that setting EmbedAllFonts = True and SetSubsetAllFonts = True is required to be able to specify embedding and subsetting for specific fonts.