Sfairadora

  • Reference Guide

Character Format Merge

x | y
Merges two character formats (the type Rich_cformat) so that the attributes of the result whose value is specified in the format y will take their values from y, while the attributes unspecified in y will take their values from x.
Example 1:
var Rich_cformat x = rcf_bold(BIT_0)|rcf_italic(BIT_1)|rcf_size(20);
var Rich_cformat y = rcf_bold(BIT_1)|rcf_underline(BIT_1);
var Rich_cformat z = x|y;
The format x will contain these attributes set: bold switched off, italic switched on, and the font size set to 20.
The format y will contain these attributes set: bold switched on, and underline switched on.
The format z is created by merging the two previous formats. It will contain these attributes set: bold switched on, underline switched on (inferred from the format x), further italic switched on, and the font size set to 20 (attributes not specified in y, retained from x).
Example 2:
var Rich_cformat x = rcf_style("Normal Text")|rcf_bold(BIT_INVERT);
The bold attribute will have the inverse value set than that is set in the style "Normal Text". Therefore, switching this value in the style definition will lead to the opposite change in the format of the characters, the value of which is se to this format.

See Also