Font.Activate
-------------

Activates a font inside app or whole computer.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Font](component_Font.md) | [2.6](newinversion26.md) | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ❌ No |

MBS( "Font.Activate"; Path { ; Local } ) 

**MBS**( **"Font.Activate";** /\* Activates a font inside app or whole computer. \*/  
**$Path**; /\* The native file path to the font file.e.g. "/Users/test/Desktop/test.ttf" \*/   
**$Local**) /\* Optional; Pass 1 to activate only inside app or 0 for globally.  
You may need to use 0 in order to let FileMaker see the font when you restart.  
This parameter is ignored on iOS as font activation is only local there.e.g. 0 \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| Path | The native file path to the font file. | "/Users/test/Desktop/test.ttf" |  |
| Local | Pass 1 to activate only inside app or 0 for globally.   You may need to use 0 in order to let FileMaker see the font when you restart.   This parameter is ignored on iOS as font activation is only local there. | 0 | Optional |

### Result

Returns "OK" or error number from OS.

### Description

Activates a font inside app or whole computer.  
It looks like FileMaker reads font list only on startup, so it may not react to loading this font.  
  
For DynaPDF, please use [DynaPDF.AddFontSearchPath](DynaPDFAddFontSearchPath.md) instead.  
### Examples

Activate a font:

 MBS ( "Font.Activate"; "/Users/test/Desktop/test.ttf"; 1 )  
### See also

- [DynaPDF.AddFontSearchPath](DynaPDFAddFontSearchPath.md)
- [Font.Deactivate](FontDeactivate.md)

### Release notes

- **Version 10.3**
    - Rewrote [Font.Activate](https://www.mbsplugins.eu/FontActivate.shtml) and [Font.Deactivate](https://www.mbsplugins.eu/FontDeactivate.shtml) for newer macOS versions.

### Example Databases

- [Utility functions/Load Fonts](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Utility%20functions/Load%20Fonts.shtml#1ScriptAnchor_)

### Blog Entries

- [Neues MBS FileMaker Plugin 10.3 - Über 6200 Funktionen in einem Plugin](https://www.mbsplugins.de/archive/2020-07-21/Neues_MBS_FileMaker_Plugin_103/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin 10.3 - More than 6200 Functions In One Plugin](https://www.mbsplugins.de/archive/2020-07-21/MBS_FileMaker_Plugin_103_-_Mor/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 10.3pr7](https://www.mbsplugins.de/archive/2020-06-28/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [MBS Filemaker Plugin, version 2.6pr5](https://www.mbsplugins.de/archive/2012-02-28/MBS_Filemaker_Plugin_version_2/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 18th August 2014 , last changed 19th November 2024

  
[Folders.Windows](FoldersWindows.md) - [Font.CalculateTextFits](FontCalculateTextFits.md)

[HTML Version](FontActivate.shtml)