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

matchFont is not included unsupported features for Web #2303

Closed
daehyeonmun2021 opened this issue Mar 20, 2024 · 5 comments
Closed

matchFont is not included unsupported features for Web #2303

daehyeonmun2021 opened this issue Mar 20, 2024 · 5 comments
Labels
documentation Improvements or additions to documentation

Comments

@daehyeonmun2021
Copy link
Contributor

Description

Hello Skia team. I really love using Skia. This is a great tool ever. :)

I found out matchFont which is so powerful API to handle multiple fonts is not implemented for Web yet and it's not included in the unsupported features in the docs.

I'm not sure this API is unsupported or unplanned so I couldn't make a PR to fix the docs.

Thanks :)

CleanShot 2024-03-21 at 02 15 41@2x

@daehyeonmun2021 daehyeonmun2021 added the documentation Improvements or additions to documentation label Mar 20, 2024
@wcandillon
Copy link
Contributor

Thanks a lot! We will add it to the documentation.
In the meantime we strongly recommend to use the Paragraph API instead.

@daehyeonmun2021
Copy link
Contributor Author

@wcandillon Thanks! Oh I have a question. Do you have a plan to add canvas.drawParagraph ?

@wcandillon
Copy link
Contributor

canvas.drawParagraph is hard because of a cyclic dependency (SkParagraph depends on SkCanvas via paragraph.paint(canvas)). May I ask why do you need it? We use paragraph.paint(canvas): /~https://github.com/Shopify/react-native-skia/blob/main/package/src/renderer/__tests__/e2e/Paragraphs.spec.tsx#L76
is this good enough?

@daehyeonmun2021
Copy link
Contributor Author

@wcandillon wow! I didn't notice para.paint api! That's more than enough. Thanks a lot :D

@Nickersoft
Copy link

Hey folks, just ran into this myself – is it possible to obtain an SKFont from a Paragraph on web? I'm using a font manager, but the dependency I'm using that relies on Skia (Victory Native) is requiring an SKFont in order to render. Tried using the matchFont API but ran into the above error :/

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

No branches or pull requests

3 participants