DynaPDF.TestGlyphs
------------------

Checks whether all glyphs of the text are available in the current font.

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

MBS( "DynaPDF.TestGlyphs"; PDF; Text ) 

**MBS**( **"DynaPDF.TestGlyphs";** /\* Checks whether all glyphs of the text are available in the current font. \*/  
**$PDF**; /\* The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). \*/   
**$Text**) /\* Text to be checked.e.g. "Hello World" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| PDF | The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). | $pdf |
| Text | Text to be checked. | "Hello World" |

### Result

Returns number or error.

### Description

Checks whether all glyphs of the text are available in the current font.   
The return value is the position of the first missing glyph, or -1 if all glyphs are available.   
If the font uses a mixed 8/16 bit CJK code page that requires a conversion to Unicode (a code page that ends with "\_Uni"), the return value corresponds to the converted Unicode string and not to the CJK input string.   
  
See also [TestGlyphs](https://www.monkeybreadsoftware.com/DynaPDF-Manual/TestGlyphs.shtml) function in DynaPDF manual.

### Examples

Test some text:

 # some text with Japanese characters   
Set Variable \[ $text ; Value: "Tokyo 東京都 " \]   
\# test with Helvetica   
Set Variable \[ $r ; Value: MBS ("[DynaPDF.SetFont](DynaPDFSetFont.md)"; $pdf ; "Helvetica"; 0; 12) \]   
Set Variable \[ $pos1 ; Value: MBS ("DynaPDF.TestGlyphs"; $pdf ; $text ) \]   
\# test with Arial Unicode   
Set Variable \[ $r ; Value: MBS ("[DynaPDF.SetFont](DynaPDFSetFont.md)"; $pdf ; "Arial Unicode MS"; 0; 12) \]   
Set Variable \[ $pos2 ; Value: MBS ("DynaPDF.TestGlyphs"; $pdf ; $text ) \]   
Show Custom Dialog \[ "Position of first character not in the font:" ; $pos1 &amp; ¶ &amp; $pos2 \]  
### See also

- [DynaPDF.New](DynaPDFNew.md)
- [DynaPDF.SetFont](DynaPDFSetFont.md)

### Release notes

- **Version 14.2**
    - Improved [DynaPDF.TestGlyphs](https://www.mbsplugins.eu/DynaPDFTestGlyphs.shtml) to return error message in case you call it outside an open page.
- **Version 13.0**
    - Added [DynaPDF.TestGlyphs](https://www.mbsplugins.eu/DynaPDFTestGlyphs.shtml) function.

### Example Databases

- [DynaPDF/Tables](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Tables.shtml#8ScriptAnchor_)

### Blog Entries

- [MBS FileMaker Plugin, version 14.2pr5](https://www.mbsplugins.de/archive/2024-05-08/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [New in MBS FileMaker Plugin 13.0](https://www.mbsplugins.de/archive/2023-01-24/New_in_MBS_FileMaker_Plugin_13/monkeybreadsoftware_blog_filemaker)
- [Neues MBS Plugin 13.0 für Claris FileMaker](https://www.mbsplugins.de/archive/2023-01-17/Neues_MBS_Plugin_130_für_Clar/monkeybreadsoftware_blog_filemaker)
- [MBS Plugin 13.0 for Claris FileMaker](https://www.mbsplugins.de/archive/2023-01-17/MBS_Plugin_130_for_Claris_File/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 12.6pr1](https://www.mbsplugins.de/archive/2022-12-01/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 27th November 2022 , last changed 27th November 2022

  
[DynaPDF.Table.SetTableWidth](DynaPDFTableSetTableWidth.md) - [DynaPDF.TestPassword](DynaPDFTestPassword.md)

[HTML Version](DynaPDFTestGlyphs.shtml)