DynaPDF.SetUseSystemFonts
-------------------------

The property specifies whether the system fonts should be automatically loaded.

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

MBS( "DynaPDF.SetUseSystemFonts"; PDF; Value ) 

**MBS**( **"DynaPDF.SetUseSystemFonts";** /\* The property specifies whether the system fonts should be automatically loaded. \*/  
**$PDF**; /\* The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). \*/   
**$Value**) /\* The new setting, can be 0 or 1.e.g. 1 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| PDF | The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). | $pdf |
| Value | The new setting, can be 0 or 1. | 1 |

### Result

Returns OK or error.

### Description

The property specifies whether the system fonts should be automatically loaded.   
On Windows all fonts in the Windows/Fonts directory will be loaded as well as shared fonts listed in the Registry. On macOS the following font paths will be added to the list of font search paths:  
 /System/Library/Fonts  
 /Library/Fonts  
~/Library/Fonts  
  
Additional font paths can be added with [DynaPDF.AddFontSearchPath](DynaPDFAddFontSearchPath.md). Default value = 1 (true)  
The fonts are loaded when [DynaPDF.SetFont](DynaPDFSetFont.md) is called the first time. The property is ignored on Linux or UNIX.  
  
Please note that the internal font list is not automatically updated when the system's font pool changes. Windows operating systems send a WM\_FONTCHANGE message if the font pool was modified. In this case, the application should call DynaPDF.ClearHostFonts before calling SetFont() the next time so that the list of available system fonts can be updated.  
On macOS there is no notification when the font database changes. macOS applications need to use functions of the font manager to determine whether font database has been modified.  
  
See also [DynaPDF.GetUseSystemFonts](DynaPDFGetUseSystemFonts.md).  
See also [SetUseSystemFonts](https://www.monkeybreadsoftware.com/DynaPDF-Manual/SetUseSystemFonts.shtml) function in DynaPDF manual.

### Examples

Enable system fonts

 MBS ( "DynaPDF.SetUseSystemFonts"; $PDF ; 1 )  
### See also

- [DynaPDF.ActivateAltFontList](DynaPDFActivateAltFontList.md)
- [DynaPDF.AddFontSearchPath](DynaPDFAddFontSearchPath.md)
- [DynaPDF.Clear](DynaPDFClear.md)
- [DynaPDF.GetUseStdFonts](DynaPDFGetUseStdFonts.md)
- [DynaPDF.GetUseSystemFonts](DynaPDFGetUseSystemFonts.md)
- [DynaPDF.New](DynaPDFNew.md)
- [DynaPDF.SetFont](DynaPDFSetFont.md)
- [DynaPDF.SetUseStdFonts](DynaPDFSetUseStdFonts.md)

This function checks for a license.

Created 18th August 2014 , last changed 10th August 2020

  
[DynaPDF.SetUseStdFonts](DynaPDFSetUseStdFonts.md) - [DynaPDF.SetUseTransparency](DynaPDFSetUseTransparency.md)

[HTML Version](DynaPDFSetUseSystemFonts.shtml)