Brian Dunning's FileMaker Custom Functions

GetFontSize ( text )

Returns the size of the text font

  Average rating: 4.5 (28 votes) Log in to vote

Daniele Raybaudi   Daniele Raybaudi

Share on Facebook Share on Twitter

  Sample input:
  Sample output:

  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



Michael Kupietz   Michael Kupietz, San Francisco
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   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 ) )

Log in to post comments.


Note: these functions are not guaranteed or supported by Please contact the individual developer with any questions or problems.

Under construction. Email me your wish list for improvements.