Skip to content

[Impeller] Typographer: Track multiple atlas Textures when exceeding the device limit. #133092

Open

Description

@bdero

Currently, if the rect packer is unable to fit all of the text glyphs into a single atlas texture, then text rendering will fail.

This is normally not a problem when targeting modern mobile devices with huge texture size limits, but Impeller may be used with embedded systems that are much more restrictive. For example, QNX with a 2048x2048 OpenGL texture size limit. To make Impeller text rendering safer, we should overflow atlas glyphs into multiple packed textures when the max texture size has been reached.

Activity

  1. added
    e: impellerImpeller rendering backend issues and features requests
    on Aug 22, 2023
  2. moved this to 🤔 Needs Triage in Impelleron Aug 22, 2023
  3. jonahwilliams commented on Aug 23, 2023

    @jonahwilliams
    Contributor

    I was also thinking that beyond a certain glyph size we'd need to essentially fall back to path rendering, but this was more of a desktop issue - i.e. something silly like a 1000pt single character A will probably kill our backend. So there are two directions here, one is splitting the atlas when the max texture size is reached (this should come from capabilities because the current size is just hard coded) and the other is falling back to a non atlas strategy if a particular glyph is too large for any atlas (or large enough to not be practical for softare rendering).

  4. bdero commented on Aug 23, 2023

    @bdero
    MemberAuthor

    I think adding a utility to the typographer backend for requesting a path for a given text frame would be a good idea. Letting Aiks make that decision based on some characteristics of the TextFrame would probably be an acceptable design.

    In general, as far as the text atlas is concerned, typefaces can have 10s of thousands of glyphs, so if we want to reuse atlases across frames, we aught to support overflowing to multiple atlases lest we fail to render in constrained environments regardless of the presence of a cross-text-backend path rendering solution.

  5. moved this from 🤔 Needs Triage to 🛠️ Internals in Impelleron Aug 25, 2023
  6. added
    P3Issues that are less important to the Flutter project
    on Aug 28, 2023
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

    P3Issues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilitye: impellerImpeller rendering backend issues and features requestsengineflutter/engine related. See also e: labels.team-engineOwned by Engine teamtriaged-engineTriaged by Engine team

    Type

    No type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions