Sfairadora

  • Reference Guide

Character Format Functions

The functions described in this chapter serve to manipulate character formats, i.e. the type Rich_cformat. This type is used in formatted strings (Rich_string) and formatted texts (Rich_text) for the character format specification.
A character format is determined by the set of attributes (see the Character Format tool window, and the definition type Rich_cformat_def). Individual attributes can be either specified directly by their values or by a reference to a style. In the both cases, it is an option that the attribute value may remain unspecified. This enables the possibility to merge formats with operator | (e.g. x | y). The format resulting from such a merge operation will primarily contain the values of the attributes as specified in the format y, but whenever an attribute is unspecified its value is taken from x.
A format of desired properties can be created using the format construction functions. For instance:
var Rich_cformat rcf = rcf_font("Arial")|rcf_bold(BIT_1);
Conversely, the values of an existing format can be determined by format analysis functions. For instance:
var String font = rcf_get_fong(rcf);

Character Format Construction Functions

Character Format Analysis Functions

Character Format Getting and Setting Functions

●
cformat