DynaPDF.ActivateAltFontList
---------------------------

Activates or deactivates an alternate font list that was created by [DynaPDF.CreateAltFontList](DynaPDFCreateAltFontList.md).

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [DynaPDF](component_DynaPDF.md) | [12.0](newinversion120.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "DynaPDF.ActivateAltFontList"; PDF; FontListHandle { ; EnableSysFonts } ) 

**MBS**( **"DynaPDF.ActivateAltFontList";** /\* Activates or deactivates an alternate font list that was created by DynaPDF.CreateAltFontList. \*/  
**$PDF**; /\* The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). \*/   
**$FontListHandle**; /\* Pass -1 to deactivate or number of list. \*/   
**$EnableSysFonts**) /\* Optional; Whether to include system fonts.  
Pass 1 to enable or 0 to disable.e.g. 1 \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| PDF | The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). | $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](DynaPDFCreateAltFontList.md).  
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](DynaPDFSetUseSystemFonts.md)() 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](DynaPDFSetGStateFlags.md)().  
See also [ActivateAltFontList](https://www.monkeybreadsoftware.com/DynaPDF-Manual/ActivateAltFontList.shtml) function in DynaPDF manual.

### See also

- [DynaPDF.CreateAltFontList](DynaPDFCreateAltFontList.md)
- [DynaPDF.DeleteAltFontList](DynaPDFDeleteAltFontList.md)
- [DynaPDF.New](DynaPDFNew.md)
- [DynaPDF.SetAltFonts](DynaPDFSetAltFonts.md)
- [DynaPDF.SetGStateFlags](DynaPDFSetGStateFlags.md)
- [DynaPDF.SetUseSystemFonts](DynaPDFSetUseSystemFonts.md)

### Release notes

- **Version 12.0**
    - Added [DynaPDF.ActivateAltFontList](https://www.mbsplugins.eu/DynaPDFActivateAltFontList.shtml), [DynaPDF.CreateAltFontList](https://www.mbsplugins.eu/DynaPDFCreateAltFontList.shtml), [DynaPDF.DeleteAltFontList](https://www.mbsplugins.eu/DynaPDFDeleteAltFontList.shtml) and [DynaPDF.SetAltFonts](https://www.mbsplugins.eu/DynaPDFSetAltFonts.shtml) functions.

### Blog Entries

- [Top 10 from the MBS Plugin in 2022](https://www.mbsplugins.de/archive/2022-12-29/Top_10_from_the_MBS_Plugin_in_/monkeybreadsoftware_blog_filemaker)
- [New in MBS FileMaker Plugin 12.0](https://www.mbsplugins.de/archive/2022-01-31/New_in_MBS_FileMaker_Plugin_12/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 12.0pr5](https://www.mbsplugins.de/archive/2022-01-01/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

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

  
[DragDrop.UnregisterDropTypes](DragDropUnregisterDropTypes.md) - [DynaPDF.AddActionToObj](DynaPDFAddActionToObj.md)

[HTML Version](DynaPDFActivateAltFontList.shtml)