Skip to content

Misleading namings in bevy_text #19467

Open
@ickshonpe

Description

@ickshonpe

Problem

The names of some of the components in bevy_text are confusing and inconsistent:

  • TextLayoutInfo
    Contains the final computed text layout. The -Info suffix is redundant and potentially confusing.

  • TextLayout
    Holds the settings for text justification and line breaking. Not the layout.

  • ComputedTextBlock
    This holds the cosmic-text buffer. The name suggests that it contains the final result of a text relayout, but the buffer can be out-of-date until it is updated during the text schedule.

Suggestions

Renamings:

  • TextLayoutInfo -> ComputedTextLayout
  • ComputedTextBlock -> TextBuffer

Remove the TextLayout component.

JustifyText and LineBreak become components Required by Text and Text2d.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-TextRendering and layout for charactersC-Code-QualityA section of code that is hard to understand or changeS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions