Skip to content

Consume font-subset in flutter_tools and treeshake icon fonts #43644

@dnfield

Description

@dnfield

Blocked by #43642
Part of #16311

Once hb-subset is available from engine builds, we should consume it, we should parse out the constants from the Dart kernel file and use hb-subset to create a new, smaller font based on those constants. We'll want to add an annotation to the relevant classes/constants to make this something extensible beyond the Material and Cupertino icon fonts.

There is an example of parsing the constants from a kernel file in //third_party/dart/pkg/kernel/bin/dump.dart from the Dart SDK.

Related: b/127886310

/cc @willlarche @mehmetf @aam @Hixie

Metadata

Metadata

Assignees

Labels

a: sizeReducing IPA/APK/JS sizesa: typographyText rendering, possibly libtxtc: new featureNothing broken; request for a new capabilityc: performanceRelates to speed or footprint issues (see "perf:" labels)f: cupertinoflutter/packages/flutter/cupertino repositoryf: material designflutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.perf: app sizePerformance issues related to app size (binary/code size) or disk spacetoolAffects the "flutter" command-line tool. See also t: labels.waiting for PR to land (fixed)A fix is in flight

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions