tofont

Purpose

Outputs information about the font formatting of a text fragment.

Syntax

tofont(parameter, $named_group)

Arguments

The function takes two mandatory arguments.

The first argument parameter takes the following values:

Parameter

Value

style

text style

size

font size

name

font name

spacing

spacing between characters

separator

specifies the result separator (the default value is space).

Several parameter values can be combined via underscore (“_”), e.g.: style_size.

The second argument is a named group.

Returned Value

It is integer or fractional number for the size and spacing parameters and string for the other parameters.

Examples

tofont(style, $m) outputs the information about the named group $m style.

tofont(style, separator:=";", $m) outputs the information about the named group $m style, each found result is separated by “;”.

tofont(style_size_name_spacing, $m) outputs the information about the named group $m’s text style, font size, font name and spacing between characters.