Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

DynaPDF.ActivateAltFontList

Activates or deactivates an alternate font list that was created by DynaPDF.CreateAltFontList.

Component Version macOS Windows Linux Server iOS SDK
DynaPDF 12.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "DynaPDF.ActivateAltFontList"; PDF; FontListHandle { ; EnableSysFonts } )   More

Parameters

Parameter Description Example Flags
PDF The PDF reference returned from DynaPDF.New. $pdf
FontListHandle Pass -1 to deactivate or number of list.
EnableSysFonts Whether to include system fonts.
Pass 1 to enable or 0 to disable.
1 Optional

Result

Returns OK or error.

Description

Activates or deactivates an alternate font list that was created by DynaPDF.CreateAltFontList.
An alternate font list represents a list of fallback fonts which are tested if one or more required glyphs were not found in the current font.

If no compatible font was found in the list, then system fonts are tested if EnableSysFonts was set to true. Although EnableSysFonts should be set to true in most cases, it is sometimes useful to disable system fonts, e.g. to restrict the number of fonts which can be embedded.

In order to disable the current alternate font list set the parameter Handle to -1. The value of EnableSysFonts is ignored this case. To fully deactivate font substitution disable system fonts with DynaPDF.SetUseSystemFonts() before calling a text function.

Please note that alternate font lists are used only, if complex text layout was enabled. This can be done by setting the flag ComplexText with DynaPDF.SetGStateFlags().

See also ActivateAltFontList function in DynaPDF manual.

See also

Release notes

Blog Entries

This function checks for a license.

Created 23th December 2021, last changed 17th July 2022


DragDrop.UnregisterDropTypes - DynaPDF.AddActionToObj