Skip to main content
Version: 7.9


This function is used by Ignition's Expression language..


Coerces a string into a font. The string must be in the format:

'(fontName, fontType, fontSize)'

fontName is the name of the font to use. Note that special care must be taken with fonts, because of the web-launched nature of the clients. You can only use font names that exist on the client machines. The following font names are known as logical fonts, meaning that they are guaranteed to exist on all systems, mapped to the most appropriate real, or physical font that exists on the host system:

  • Serif
  • SansSerif
  • Monospaced
  • Dialog
  • DialogInput

fontType is a string that should match one of these (case-insensitive):

  • Plain
  • Bold
  • Italic
  • BoldItalic

fontSize is an integer that represents the font's point size.


toFont(value[, failover])

  • Parameters

    • string value - The value to type cast to a font.

    • object failover - Optional. The failover value if type casting fails.

  • Results

    • Font - The value type cast as a font.


Code Snippet
toFont("font(Dialog,Bold,12)") //returns the standard font used in most clients.