Add supported custom font formats in official docs#77230
Add supported custom font formats in official docs#77230fluttergithubbot merged 4 commits intoflutter:masterfrom
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat. If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
| /// #### Supported font formats | ||
| /// | ||
| /// Font formats currently supported by Flutter : | ||
| /// * `.ttf` |
There was a problem hiding this comment.
Flutter also supports TrueType Collections, (.ttc) which contain multiple tts files. This is commonly seen in CJK font collections that include multiple fonts for multiple languages.
There was a problem hiding this comment.
For example, see https://www.google.com/get/noto/help/cjk/ where the truetype downloads are .ttc files.
There was a problem hiding this comment.
@GaryQian I had missed to mention it. Thanks for the tip. I'll make the changes.
|
@jason-simmons are there any other more obscure formats that we support that I forgot? |
|
I think those are all the formats that Flutter promises to support. Anything beyond that depends on the configuration of third-party libraries like FreeType. This change selected the types of fonts included in the engine's build of FreeType: |
| /// Font formats currently supported by Flutter : | ||
| /// * `.ttf` | ||
| /// * `.otf` | ||
| /// * `.ttc` |
There was a problem hiding this comment.
very minor nit: Move ttc to be next to ttf for better organization
| /// #### Supported font formats | ||
| /// | ||
| /// Font formats currently supported by Flutter : | ||
| /// * `.ttf` |
There was a problem hiding this comment.
add additional space before each *
| /// | ||
| /// #### Supported font formats | ||
| /// | ||
| /// Font formats currently supported by Flutter : |
There was a problem hiding this comment.
Add newline after this line.
There was a problem hiding this comment.
@GaryQian I have committed the proposed changes. Please check if there are any further changes to be made.
Thank you.
There was a problem hiding this comment.
It LGTM now, thank you for your contribution!
There was a problem hiding this comment.
@GaryQian the cookbook doesn't mention .ttc too. Should it also be updated?
This PR adds the custom font formats that are supported by flutter in the text style docs.
Issues - #76715
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.