DynaPDF.ChangeFontEx
--------------------

Changes or sets the font to the one of the parameter Handle.

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

MBS( "DynaPDF.ChangeFontEx"; PDF; FontHandle; FontSize; Style ) 

**MBS**( **"DynaPDF.ChangeFontEx";** /\* Changes or sets the font to the one of the parameter Handle. \*/  
**$PDF**; /\* The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). \*/   
**$FontHandle**; /\* Handle of the new font.e.g. $font \*/   
**$FontSize**; /\* The new font size.e.g. 12 \*/   
**$Style**) /\* Font style value.   
Can be a combination of values 1 for italic, 2 for bold, 4 for underlined and 8 for striked.e.g. 3 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| PDF | The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). | $pdf |
| FontHandle | Handle of the new font. | $font |
| FontSize | The new font size. | 12 |
| Style | Font style value.    Can be a combination of values 1 for italic, 2 for bold, 4 for underlined and 8 for striked. | 3 |

### Result

Returns OK or error.

### Description

Changes or sets the font to the one of the parameter Handle.   
Handle must be a valid font handle that was returned by [DynaPDF.SetFont](DynaPDFSetFont.md), [DynaPDF.SetFontEx](DynaPDFSetFontEx.md), DynaPDF.SetCIDFont, or DynaPDF.LoadFont.   
The style flags should be the same as in the initial [DynaPDF.SetFont](DynaPDFSetFont.md) call with exception of the flags Underline or Striked which can be used to underline or strikeout text.   
The parameter FontSize must be greater zero.  
See also [ChangeFontEx](https://www.monkeybreadsoftware.com/DynaPDF-Manual/ChangeFontEx.shtml) function in DynaPDF manual.

### See also

- [DynaPDF.ChangeFont](DynaPDFChangeFont.md)
- [DynaPDF.ChangeFontSize](DynaPDFChangeFontSize.md)
- [DynaPDF.ChangeFontStyle](DynaPDFChangeFontStyle.md)
- [DynaPDF.ChangeFontStyleEx](DynaPDFChangeFontStyleEx.md)
- [DynaPDF.New](DynaPDFNew.md)
- [DynaPDF.SetFont](DynaPDFSetFont.md)
- [DynaPDF.SetFontEx](DynaPDFSetFontEx.md)

### Release notes

- **Version 12.0**
    - Changed [DynaPDF.SetFont](https://www.mbsplugins.eu/DynaPDFSetFont.shtml), [DynaPDF.Table.SetFont](https://www.mbsplugins.eu/DynaPDFTableSetFont.shtml), [DynaPDF.SetFontEx](https://www.mbsplugins.eu/DynaPDFSetFontEx.shtml), [DynaPDF.ChangeFontEx](https://www.mbsplugins.eu/DynaPDFChangeFontEx.shtml), [DynaPDF.SetFieldFont](https://www.mbsplugins.eu/DynaPDFSetFieldFont.shtml) and [DynaPDF.SetBookmarkStyle](https://www.mbsplugins.eu/DynaPDFSetBookmarkStyle.shtml) functions to accept styles as text.
- **Version 11.2**
    - Added [DynaPDF.ChangeFontEx](https://www.mbsplugins.eu/DynaPDFChangeFontEx.shtml) function.

### Blog Entries

- [MBS FileMaker Plugin, version 11.6pr2](https://www.mbsplugins.de/archive/2021-12-07/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [New in MBS FileMaker Plugin 11.2](https://www.mbsplugins.de/archive/2021-05-26/New_in_MBS_FileMaker_Plugin_11/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 11.2pr3](https://www.mbsplugins.de/archive/2021-04-14/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 14th April 2021 , last changed 14th April 2021

  
[DynaPDF.ChangeFont](DynaPDFChangeFont.md) - [DynaPDF.ChangeFontSize](DynaPDFChangeFontSize.md)

[HTML Version](DynaPDFChangeFontEx.shtml)