Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
9.3
9.4
9.5
10.0
10.1
10.2
10.3
10.4
10.5
10.6
Statistic
FMM
Blog
Font.CalculateTextHeight
Calculates height of text.
| Component | Version | macOS | Windows | Linux | Server | FileMaker iOS SDK |
| Font | 8.4 | Yes | Yes | No | Yes | Yes |
MBS( "Font.CalculateTextHeight"; Text; Warp Width { ; Font; Size } ) More
Parameters
| Parameter | Description | Example | Flags |
|---|---|---|---|
| Text | The text to measure. | "Hello World" | |
| Warp Width | The width of the text block to use for wrapping. If < 50 will be set to 50 to avoid endless loops. |
500 | |
| Font | The font name. Using System font in case of empty parameter. |
"Arial" | Optional |
| Size | The font size to use. Default is system font size. |
12 | Optional |
Result
Returns number or error.
Description
Calculates height of text.The plugin uses system font rendering to calculate height given your wrap width. This may be different from what FileMaker renders with it's own engine.
You can use the measured size to detect if text fits a field.
Mac result in logical points, but on Windows in pixels.
Examples
Calculates text height for a given text:
MBS( "Font.CalculateTextHeight"; "Hello World. Just a test."; 100; "Arial"; 12 )
Example result: 36
See also
Example Databases
Blog Entries
- Neues MBS FileMaker Plugin 8.4 - Über 5400 Funktionen in einem Plugin
- MBS FileMaker Plugin 8.4 - More than 5400 Functions In One Plugin
- MBS FileMaker Plugin, version 8.4pr7
Release notes
- Version 8.4
- Added Font.CalculateTextFits and Font.CalculateTextHeight function.
Created 3th September 2018, last changed 16th November 2018
Font.CalculateTextFits - Font.CalculateTextWidth
Feedback: Report problem or ask question.
Links
MBS Xojo Chart Plugins