engine
engine copied to clipboard
Move extension to TypefaceFontProvider instead of SkFontMgr
This extension should belong on TypefaceFontProvider instead of the parent class. The only usage is in lib/web_ui/lib/src/engine/canvaskit/fonts.dart, and both usages are on a variable typed as TypefaceFontProvider. In the future, multiple extensions on the same @staticInterop
type will be an error (https://github.com/dart-lang/sdk/issues/49350), so this must be migrated.
Pre-launch Checklist
- [X] I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
- [X] I read the [Tree Hygiene] wiki page, which explains my responsibilities.
- [X] I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides].
- [X] I listed at least one issue that this PR fixes in the description above.
- [NO - need test exemption] I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt. See [testing the engine] for instructions on writing and running engine tests.
- [X] I updated/added relevant documentation (doc comments with
///
). - [X] I signed the [CLA].
- [X] All existing and new tests are passing.
cc @yjbanov PTAL
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 (don't just cc him here, he won't see it! He's on Discord!).
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.
test-exempt: this effectively removes (broken) API surface, so there's nothing to test really.
- Please get at least one approved review if you are already a member or two member reviews if you are not a member before re-applying this label. Reviewers: If you left a comment approving, please use the "approve" review action instead.
Validations Fail.