GetFontSize ( text )
Returns the size of the text font
Average rating: 4.5 (28 votes) Log in to vote
Daniele Raybaudi - Show more from this author
ACI http://www.aci.it |
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
Format: GetFontSize(text)
Parameter: text - any text expression or text field
Data type returned: number
Description: Returns the size of the text font
Comments
Michael Kupietz, Michael Kupietz FileMaker Consulting Sep 3, 2011 |
||
If you try to use it to get the text size of the active field, and the active field's text has not been resized from the field's default size, returns null string (""), not the text size. | ||
Simon, Hull, UK Nov 7, 2013 |
||
I find this works better, especially if there are numerals in the text. Obviously a nul value is returned if the text side has not been modified from the field default size. You can write in a formula to replace the nul value with your default value. GetAsNumber ( Middle ( GetAsCSS( text ) ; Position ( GetAsCSS( text ) ; "font-size: " ; 1 ; 1 ) +11 ; 4 ) ) |
||
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.