FontFormat (PQL)

Returns markup text to format the supplied text with colors, fonts and font size

  • Returned Output: Text
  • Library: PQL \ Dynamic \ Markup
  • Version: 2020.10.000
  • Compatibility: Any content (regardless of data source) in the relevant parts of the application

Syntax

FontFormat( <Text> , OPTIONAL <Fore Color> , OPTIONAL <Back Color> , OPTIONAL <Size > , OPTIONAL <Font Family> )

* Click on the function's arguments above for more details on the input values.

Comments
  • Use this function to mark-up dynamically created text programmatically. Alternatively, you can format the entire dynamic text result in the host text box.
  • Each of the settings is optional. Excluding everything produces no effect on the text. To leave something without a value set it to 'null', or enter 2 double quotes: ""
  • Formatting includes the font color, background color, size and its family.
    • The font family must be recognizable in the browser.
    • Colors can be supplied as
      • hexadecimal colors ("#FF0000" is red")
      • named colors recognized in a browser ("red")
      • RGB formulated colors ("RGB(255,0,0)" is red)
  • The text can be any static or formula driven text element.

Examples

This example returns the following resulting text:

"This is a test"

"This is a " + FontFormat("test", "red", "#00FF00",20,"Arial Black")