-
Notifications
You must be signed in to change notification settings - Fork 7.8k
[Gallery] Use google_fonts #299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
|
||
| flutter: | ||
| assets: | ||
| - fonts/google_fonts/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The google_fonts package will first check assets for font files before fetching them and caching them. See https://github.com/material-foundation/google-fonts-flutter/blob/1255da8321fb84be2ffe56fcc5f792eb1dadf83d/README.md#bundling-font-files-in-your-applications-assets for more details
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could chose not to bundle them, but then you'd get a flicker as fonts load the first time, and the fonts wouldn't load if you opened the app offline for the first time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha, the readme mentions that the directory should be - google_fonts/, but I guess ours works with the extra level in there? Or should we modify that too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can use any directory. I just figured it made more sense to put them under fonts/
|
|
||
| flutter: | ||
| assets: | ||
| - fonts/google_fonts/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also I see all the fonts are still included in the directory, is that how it's supposed to work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, see above
rami-a
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but I think we should get @clocksmith or @johnsonmh to review this one also.
johnsonmh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
██╗ ██████╗ ████████╗███╗ ███╗
██║ ██╔════╝ ╚══██╔══╝████╗ ████║
██║ ██║ ███╗ ██║ ██╔████╔██║
██║ ██║ ██║ ██║ ██║╚██╔╝██║
███████╗╚██████╔╝ ██║ ██║ ╚═╝ ██║
╚══════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝
In all but two places, we can use the google_fonts package.
Merging is blocked on material-foundation/flutter-packages#58 (for web support)