Skip to content

[web] ☂️ WebParagraph #172561

@mdebbar

Description

@mdebbar

What is WebParagraph?

It's a new implementation of Flutter's text layout system on the web (ParagraphBuilder, Paragraph, etc). This new implementation takes advantage of new browser APIs, namely Enhanced TextMetrics.

Why?

The browser already contains a full text layout system, but because it's not exposed to web apps, we had to bundle a lot of the same bits in each Flutter web app. By utilizing Enhanced TextMetrics, we can achieve the following:

  1. Reduce code size: Delete some parts of the text layout system that we don't need anymore: HarfBuzz, Font management, Freetype, Brotli decoder (was needed for Woff2), etc.
  2. Eliminate fallback fonts: Fallback fonts cost extra network bandwidth and add complexity. They were needed because we didn't have access to system/browser fonts.
  3. Eliminate the tofu box issue!
  4. Apple Emoji !

Here's a few examples of issues that we aim to close with WebParagraph:

How can I try it out?

Thanks for your interest in this project! Please subscribe to this issue to be notified when WebParagraph is ready for testing by our users.

Sub-issues

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work lista: typographyText rendering, possibly libtxtplatform-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