Text attributes can (and should?) be encoded within the normal data stream. For some kinds of text attributes, multiple attributes can apply to one character. Some kinds of attributes can override each other. Therefore, the buffer (view!) should keep track of where the attribute changes are (using text marks) and what kind of changes they are so that the view can ask "which attributes apply to position " with some kind of speed (neccessary for scrolling and nice-to-have anyhow). Still to be determined is whether the painter maintains a _stack_ of attributes or whether the painter only sees the currently "active" attribute. Because the number of attributes that a human can distinguish in a single screen is limited anyhow, there is no need for a "full-color" attribute scheme but rather a "palette" attribute storage scheme is both sufficient and more practical. The codes used within the data stream to encode an attribute reference should be short, however, in order to conserve RAM. Alternative: save the text attributes on "special" (mostly normal) text marks. = Kinds of Attributes = Font size Font set Foreground color underline strike-through italic bold(ness) set tab stop box drawing start table start table row start table column (end table column) (end table row) end table (Insert image) = Representation = attribute_definition := pair(attribute_type_and_kind, attribute_parameters) attribute_reference := ??? backreference (as in " attribute definitions back", possibly encoded in as few bits as possible?) or something more sophisticated?