Skip to content

[Web] Don't show tofu boxes temporarily until suitable fonts are found and downloaded. #169455

@amano-kenji

Description

@amano-kenji

Use case

If I type non-english letters not found in the bundled fonts in input boxes, tofu boxes are shown temporarily for seconds until suitable fonts are found and downloaded.

Tofu box looks like this.

Image

This is unacceptable for end-user web applications.

Proposal

#77023 will fail if browser locale doesn't reflect one's languages. I propose a few other options.

  • Expose font query API behind web browsers, and use it to find suitable system fonts automatically.
  • Show loading animation in place of tofu boxes until suitable fonts are displayed. If several tofu boxes are displayed in a row, display them as one loading animation.
  • Allow programmers to show a custom loading animation, and block further typing until font loading is done.
  • Show a loading animation over the affected widgets, and block further typing until font loading is done.
  • ...

I tested a japanese input method which can show multiple candidates for a romaji representation of a japanese word.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterplatform-webWeb applications specificallyteam-webOwned by Web platform teamtriaged-webTriaged by Web platform team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions