Skip to content

Support drawing text along a curved path and on a mesh #16477

@dnfield

Description

@dnfield

I would like to be able to draw text on a non-linear path, e.g. like so: https://fiddle.skia.org/c/@draw_text_on_path

It doesn't appear to be possible to do that today - the Paragraph and Canvas.drawParagraph() classes/methods only appear to support drawing text baselined on a straight line (and paragraph in particular is heavily geared to laying out potentially multi-line text in straight lines).

As linked above, Skia has a method for drawing text on a path, but that seems to fall outside of the text/paragraph painting model used by Flutter and I'm not entirely sure it'd be appropriate for Flutter's design - however, it seems like it would be fairly easy to implement if it could fit in with the design.

It would be nice to have the ability to apply various styles to the text along the path, if that can be done cheaply (I have some doubts that it could be done cheaplym and I could live without it).

This would help to support #1831 and possibly #15501

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projecta: typographyText rendering, possibly libtxtc: new featureNothing broken; request for a new capabilityengineflutter/engine related. See also e: labels.team-engineOwned by Engine teamtriaged-engineTriaged by Engine team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions