-
Notifications
You must be signed in to change notification settings - Fork 30.8k
[google_fonts] Reduce size #184337
Copy link
Copy link
Open
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: google_fontsPackage to use fonts from fonts.google.com. Supports HTTP fetching, caching, and asset bundling.Package to use fonts from fonts.google.com. Supports HTTP fetching, caching, and asset bundling.packageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.team-frameworkOwned by Framework teamOwned by Framework teamtriaged-frameworkTriaged by Framework teamTriaged by Framework team
Description
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: google_fontsPackage to use fonts from fonts.google.com. Supports HTTP fetching, caching, and asset bundling.Package to use fonts from fonts.google.com. Supports HTTP fetching, caching, and asset bundling.packageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.team-frameworkOwned by Framework teamOwned by Framework teamtriaged-frameworkTriaged by Framework teamTriaged by Framework team
Use case
I'm wondering if there is any ongoing work to potentially reduce the size of the google_fonts package.
flutter build apk --analyze-size --target-platform=android-arm64gives me this result :7MB is enormous, almost twice the size of the flutter package itself. And I'm not even on the latest google_fonts.
Proposal
Is there an alternative to google_fonts that will only download the font as needed and not include all the code in such files as google_fonts_parts/part_b.dart and google_fonts_all_parts.dart ? We'd have to use the getFont('Font') only which would download as needed. Basically, remove the static data and keep only the dynamic path.