Skip to content

Cosmic text: provide API to measure text without drawing it. #19382

@viridia

Description

@viridia
Contributor

What problem does this solve or what need does it fill?

Often in games text is used for things like signs and placards; when creating such it would be useful to be able to accurately measure the size of the text so that it can be scaled appropriately.

What solution would you like?

Cosmic-text is a layout, not rendering, engine, so it should be possible to get metrics about a given text string without actually needing to draw it.

Activity

added
C-FeatureA new feature, making something new possible
A-TextRendering and layout for characters
D-StraightforwardSimple bug fixes and API improvements, docs, test and examples
on May 26, 2025
removed
D-StraightforwardSimple bug fixes and API improvements, docs, test and examples
on May 28, 2025
ickshonpe

ickshonpe commented on May 28, 2025

@ickshonpe
Contributor

More annoying than it looks.

linked a pull request that will close this issue on May 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-TextRendering and layout for charactersC-FeatureA new feature, making something new possible

    Type

    No type

    Projects

    Status

    Widget-ready

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @viridia@ickshonpe

      Issue actions

        Cosmic text: provide API to measure text without drawing it. · Issue #19382 · bevyengine/bevy