Browse the docs

fontSize

Returns the font size of the text the running action is working on.

Keyboard Maestro: FONTSIZE

Details #

fontSize() takes no arguments and returns a number: the font size in points of the text the current action is working on. When nothing has set it, it returns 12.

It reads the variable kmFontSize, which is set by imported macros whose actions work on styled text.

Parameters #

Takes 0 arguments. {{ fontSize() }}

Examples #

fontSize()
→ 12

Gotchas #

  • Calling it with any argument is an error: fontSize() takes 0 arguments, got 1.

  • Outside an action that sets kmFontSize it is always 12.