Skip to content

[CP] Space character should be optional when tree shaking fonts #132883

Description

@eyebrowsoffire

Issue Link

#132711

Commit Hash

6f227c0

Target

stable

PR Link

#132882

Changelog Description

Fixes an issue with tree shaking fonts that do not contain a space glyph.

Impacted Users

Flutter Web apps that have custom fonts that do not contain a space glyph

Impact Description

The flutter tool fails out with an error when attempting to compile an app that uses a custom icon font that does not contain a space.

Workaround

The user can pass --no-tree-shake-icons to prevent icon tree shaking, which will allow the flutter tool to complete the build process. However, it skips icon tree shaking, which bloats the payload size of their font files.

Risk

low

Test Coverage

yes

Validation Steps

Unit tests verify that the tool is feeding the proper into the font subset tool. Also, verified that the repository provided in #132711 can now build for web without issue.

Metadata

Metadata

Labels

cp: approvedApproved cherry-pick requestcp: merge-to-stableCherry-picks that should be merged to stablecp: mergedCherry-pick has been merged to the release branch.cp: reviewCherry-picks in the review queue

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions