Perfa fonts formulas: Calculating costs; Counting symbols and texts

The formulas that follow extract:

The examples that follow have the n0 rounding attribute, which makes the formula print the result as an integer.

Perfa fonts cost

For Cost of all texts Cost of texts in a specified font
1up OneUpN.TextCost() OneUpN.TextCost(FontName)
Layout LayoutN.TextCost() LayoutN.TextCost(FontName)

Examples

NOTE: The n0 rounding identifier displays the result without a fractional part.

TO extract THE COST OF USE Example
All texts in the 1up drawing "FontABC" $FontABC.TextCost(); n0$ 4
All texts in the layout drawing "LayoutABC" $LayoutABC.TextCost(); n0$ 12
All texts in the font "ABC" in the 1up drawing "FontABC" $FontABC.TextCost(ABC); n0$ 6
All texts in the font "ABC" in the layout drawing "LayoutABC" $LayoutABC.TextCost(ABC); n0$ 4

Counting symbols

For In all texts In texts in a specified font
1up OneUpN.SymbolCount(FontName) OneUpN.SymbolCount(FontName; SymbolName)
Layout LayoutN.SymbolCount(FontName) LayoutN.SymbolCount(FontName; SymbolName)

Examples

NOTE: To count all symbols, leave SymbolName empty.

To print the symbols Use Example
In the font "ABC" there are in the layout drawing "LayoutABC" $LayoutABC.SymbolCount(ABC); n0$ 23
With the name "My Symbol" there are in the font "ABC" in the 1up drawing "FontABC" $FontAbc.SymbolCount(ABC; My Symbol); n0$ 3
With the name "My Symbol" there are in the font "ABC" in the layout drawing "LayoutABC" $LayoutABC.SymbolCount(ABC; My Symbol); n0$ 13

Counting texts

1up OneUpN.TextCount(FontName)
Layout LayoutN.TextCount(FontName)

Examples

NOTE: To count all texts, leave FontName empty.

To print Use Example
How many texts in the font "ABC" there are in the 1up drawing "FontABC" $FontABC.TextCount(ABC); n0$ 15
How many texts in the font "ABC" there are in the layout drawing "LayoutABC" $LayoutABC.TextCount(ABC); n0$ 10

See the general rules for how to write formulas and format formula results.