Skip to content
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

Implement onMatchFamilyStyle for SkParagraph. #150

Closed
wants to merge 1 commit into from

Conversation

omeid
Copy link

@omeid omeid commented Dec 4, 2023

Implement onMatchFamilyStyle for SkParagraph.

CanvasKit uses skparagraph's TypefaceFontProvider which is fine and
dandy but it exposes a very limited interface to FontMgr, with
matchFamilyStyle as the only option for finding typefaces and fonts.

Without implementing this method, it is not possible to use custom fonts
on wasm as calling matchFamilyStyle with current onMatchFamilyStyle is a
noop and returns null.

@skia-codereview-bot
Copy link
Collaborator

This PR (HEAD: c379e02) has been imported to Gerrit for code review.

Please visit review.skia.org/786236 to see it. Please CC yourself to the Gerrit change.

Note:

  • Skia uses only Gerrit for reviews and submitting code (doc).
  • All comments are handled within Gerrit. Any comments on the GitHub PR will be ignored.
  • The PR author can continue to upload commits to the branch used by the PR in order to address feedback from Gerrit.
  • Once the code is ready to be merged, a maintainer will submit the change on Gerrit and skia-codereview-bot will close this PR.
  • Similarly, if a change is abandoned on Gerrit, the corresponding PR will be closed with a note.

@omeid omeid force-pushed the skparagraph/onMatchFamilyStyle branch 2 times, most recently from 11ba58c to 03b67a9 Compare December 6, 2023 00:21
CanvasKit uses skparagraph's TypefaceFontProvider which is fine and
dandy but it exposes a very limited interface to FontMgr, with
matchFamilyStyle as the only option for finding typefaces and fonts.

Without implementing this method, it is not possible to use custom fonts
on wasm as calling matchFamilyStyle with current onMatchFamilyStyle is a
noop and returns null.
@omeid omeid force-pushed the skparagraph/onMatchFamilyStyle branch from 03b67a9 to 619bdbc Compare December 6, 2023 23:32
@skia-codereview-bot
Copy link
Collaborator

This PR is being closed because review.skia.org/786236 has been merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants