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


Fills an alternate font list created by DynaPDF.CreateAltFontList with data.

Component Version macOS Windows Linux Server iOS SDK
DynaPDF 12.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "DynaPDF.SetAltFonts"; PDF; ListHandle; FontNames )   More


Parameter Description Example
PDF The PDF reference returned from DynaPDF.New. $pdf
ListHandle The handle for the list.
Returned by DynaPDF.DeleteAltFontList function.
FontNames The list of font names. "Helvetica¶Times"


Returns OK or error.


Fills an alternate font list created by DynaPDF.CreateAltFontList with data.
Alternate font list are tested if one more glyphs were not found in the current font. Since the fonts in the list are used as fallback they should be compatible to the active font in regard to properties like serif, sans serif, proportional or fixed pitch, and so on.
A list should be sorted by priority and not by name. That means index 0 should contain a font name that is most probably the best match. If this one was not available or incompatible then the next font in the list will be tested until the end of the list was reached. If no suitable font was found then system fonts are tested.
The fonts in the list should support the language that must be output. Otherwise, the fonts can never be selected. An alternate font list can be arbitrary large but it is usually best to restrict the number fonts in a list to speed up processing.
A list can contain font names which are not available on the system. This causes no error. Non existing fonts are simply ignored. This makes it possible to define suitable alternate font lists statically. Such lists can then be loaded on demand.
After a list was filled with data it can be activated with DynaPDF.ActivateAltFontList. If a list is no longer needed delete it with DynaPDF.DeleteAltFontList.
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 SetAltFonts 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

DynaPDF.SetAlpha - DynaPDF.SetAnnotBorderStyle