-
Notifications
You must be signed in to change notification settings - Fork 71
Description
Setting a Node
's label or string value is easy — but which is used when? Is set_label
only for a label on something else (like a checkbox) when not specified as an independent node?
It appears that all of the below must be specified as new Node
s with role TextRun
under another node of role Label
/ TextInput
/ etc., at least for complex text or where selection may be supported.
Can a simple (non-selectable) label specify its own text directly or should this also use a Role::TextRun
sub-Node
?
When a sub-tree of Node
s is used to specify text, is the text only provided in parts split between that sub-tree, or on the parent, or both? (Most of the time my representation uses a single contiguous text, with style attributes applying to sub-ranges.)
Fonts
Are font family, size and weight expected for all text items or only when differing from the default? Aha, the font_family
specifies "Only present when different from parent." Does this imply that the root should specify the default font family?
Font size is in pixels.
Physical pixels per Em, I presume?
Is font style (italic/oblique) missing?
What are the above font properties even useful for? I'm not certain if they are sufficient to recreate the exact font face used. Likely not without style and without knowing whether font synthesis is enabled; also since the text system might use its own sources of fonts.
They are also a little problematic to specify the font family; it's always going to require a lookup in the local font database.
Characters
character_lengths, word_lengths
, character positions and widths all need to come from the text backend and are a significant amount of data.
It is expected that these are provided for all texts in the tree all the time? Or only for those texts supporting selection?