VpeSetFontSubstitution

<< Click to Display Table of Contents >>

Navigation:  Text Functions >

VpeSetFontSubstitution

Previous pageReturn to chapter overviewNext page

Substitutes a given font with another font. By using this method, VPE will substitute fonts immediately when creating a document. This is especially useful on Non-Windows platforms when importing RTF (Rich Text) documents. Often RTF documents are created on Windows platforms and use Windows specific True-Type fonts. With this method you can instruct VPE to substitute for example the True-Type font "Arial" with the Base 14 font "Helvetica", so Helvetica is used in place of Arial.

void VpeSetFontSubstitution(

VpeHandle hDoc,

LPCTSTR original_font,

LPCTSTR subst_font

)

VpeHandle hDoc

Document Handle

LPCTSTR original_font

the font which shall be subtituted by the subst_font

LPCTSTR subst_font

the font which shall be used in place of the original_font

Remarks:

In contrast to nearly all other methods, the font substitution is not related to the current document! It is active during the lifetime of your application for ALL documents which are currently open, as well as for ALL documents you are going to create after calling this method! Use this method with care.

 

You can reset all font substitution settings at once by calling the method VpePurgeFontSubstitution().

 

On Windows, this method also affects the preview and printing. This method does not affect the document export to other formats than PDF. There is a second method VpeSetFontControl() to substitute fonts, which is only active during the export to PDF documents.

 

For important details about fonts and font handling, please see the Programmer's Manual, chapter "Programming Techniques", subchapter "Fonts and Font Handling".

Example:

VpeSetFontSubstitution(hDoc, "Arial", "Helvetica")

Substitutes the True-Type font "Arial" with the Base 14 font "Helvetica", so Helvetica is used in place of Arial.