Implement mid-level Text
object and TextView
for attributes
#57
Labels
enhancement
New feature or request
Milestone
Currently, when specifying how text should render, the
TextSelection
object offers three methods:text()
,align()
andverticalAlign()
. These methods allow the API user to specify what text should be displayed, and how that text should be aligned.The implementation of
TextSelection
currently usesSelection
as an intermediary. Each element of aTextSelection
is aSelection
of sprites where each sprite is one glyph of text.Instead, a new, mid-level
Text
object should be implemented which extendsSprite
and offers additional attributes for text specification.Proposed example:
API proposal:
While this API proposal is written in the form of a SpriteAttribute, it would not be implemented at that layer of the API. Instead, a
TextView
instance would call through to multiple Sprites, one per glyph.It's an open question whether the
Text
object would useSelection
as its implementation, or manage a collection ofSprite
instances on its own.The text was updated successfully, but these errors were encountered: