Index

C/C++ Functions

dtFontMakeInactive

DT_SWORD dtFontMakeInactive(DT_DTENGINE engine, DT_ID_SWORD font_index, DT_ID_UBYTE respect_multireference)

Short Description: Deactivate font

This function deactivates a font in the Font Catalog of the specified Standard Engine instance.

Parameters

ParameterDescription

engine

Handle of the previously created Standard Engine instance.

font_index

Index of the font to be deactivated.

respect_multireference

A flag that tells the Font Engine when/how to deactivate the referenced font.

  • If respect_multireference = 0, the Font Engine will always deactivate the referenced font and, if applicable, all of its multiple-master font instances.

  • If respect_multireference = 1, the Font Engine will deactivate the referenced font only if it does not have any multiple-master font instances. If the referenced font has at least one multiple-master font instance, the font will not be deactivated.

Return Value

If successful, the function returns 1. Otherwise the function returns 0.

Comments

Applications can call dtFontMakeInactive to deactivate (but not remove) the referenced font in the Font Catalog. This function should be used whenever there is a chance that the referenced font will not be used for a longer period of time. The result is that the Font Engine will release any resources previously allocated for that font. Effectively, the font goes to sleep and uses virtually no memory. However, the font is not permanently removed form the Font Catalog. This means the font retains its unique font index. The font will be activated again either automatically by the Font Engine when it is used next time or explicitly by the application when the dtFontMakeActive function is called.

When a font or font instance should be permanently removed from the Font Catalog, applications should use the dtFontRemove function.

 

Index