This topic covers the implementation details of TFontAttr.
Scope: TypeDefinitions.pas; record. Prepared from the curated implementation supplied for this review on 2 October 2026.
Status: legacy methods with the _XXX suffix. Retained for completeness; current use is not established.
Legacy serializer: the methods are named ReadFromXML_XXX and SaveToXML_XXX. This topic documents the retained implementation; it does not imply that current scripts call it.
Style contains independent fsBold, fsItalic, fsUnderline and fsStrikeOut flags. Color delegates to TColorAttr. This is a different representation from the comma-marker style sets used by TmcFontSettings.
Notation and shared helper rules: Reading this reference.
Literal rec_type values emitted within these routines: TFontAttr. Nested values may belong to child wrappers rather than this owner itself; the attribute entries below give their exact locations.
Structures used directly by this XML implementation:
Exact XML fields and attributes
The paths below start at this record or property node. A slash identifies a child element; @ identifies an attribute. Curly braces mark a variable index or expression, not literal XML text. Initial values describe initialization; they do not establish what an omitted individual element does. The Implementation toggle below contains the supplied routines for exact branch order and conversions.
Style/fsBold
XML representation: The text of the fsBold element.
Reading: Reads the element into buffBool when node2 exists. Before this read, buffBool is set to false.
Writing: Stores true or false according to true when the record’s DoesSomething check succeeds; fsBold is selected in Style.
Style/fsItalic
XML representation: The text of the fsItalic element.
Reading: Reads the element into buffBool when node2 exists. Before this read, buffBool is set to false.
Writing: Stores true or false according to true when the record’s DoesSomething check succeeds; fsItalic is selected in Style.
Style/fsUnderline
XML representation: The text of the fsUnderline element.
Reading: Reads the element into buffBool when node2 exists. Before this read, buffBool is set to false.
Writing: Stores true or false according to true when the record’s DoesSomething check succeeds; fsUnderline is selected in Style.
Style/fsStrikeOut
XML representation: The text of the fsStrikeOut element.
Reading: Reads the element into buffBool when node2 exists. Before this read, buffBool is set to false.
Writing: Stores true or false according to true when the record’s DoesSomething check succeeds; fsStrikeOut is selected in Style.
@rec_type
XML representation: The rec_type attribute.
Writing: Stores the literal text “TFontAttr” whenever the writer reaches this field.
Nested records and repeated elements
Operation |
XML location |
When it is processed |
Read Color |
Color |
node2 exists |
Write Color |
Color |
the record’s DoesSomething check succeeds |
Initialization and reset values
This type has no separate initializer in the supplied code. Its starting values come from its enclosing object, inherited initialization, or existing state. Relevant enclosing initializers are identified below.
Storage declarations relevant to interpretation
These are in-memory member and property types, not a list of mandatory XML children. They retain array bounds, fixed buffers and selector types. The field reference above defines what is actually serialized.
Name |
Declared type / bounds |
Kind |
Color |
TColorAttr |
member |
Style |
TFontStyles |
member |
The Implementation toggle contains only TFontAttr methods. Initializers and helpers belonging to other types are identified separately below. Shared XML-helper limitations are explained in Reading this reference.
Declaration reproduces this record’s complete declaration from the supplied source, including its fields, properties and method signatures.