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

Binding the TypefaceFontProvider in skparagraph module #288

Open
MeetWq opened this issue Dec 2, 2024 · 3 comments · May be fixed by #293
Open

Binding the TypefaceFontProvider in skparagraph module #288

MeetWq opened this issue Dec 2, 2024 · 3 comments · May be fixed by #293

Comments

@MeetWq
Copy link
Contributor

MeetWq commented Dec 2, 2024

It's useful for building FontMgr from specified typefaces, e.g. reading fonts from a path set by the program and building the FontMgr for Paragraph.
https://github.com/google/skia/blob/d0510ab0535b1ab7aaf237fdb9436a4326f46030/modules/skparagraph/tests/SkParagraphTest.cpp#L74-L75

@HinTak
Copy link
Collaborator

HinTak commented Dec 2, 2024

I remember seeing an upstream example of a fontmgr loading an entire directory of fonts, can't find it quickly at the moment. Maybe that's an alternative.

@HinTak
Copy link
Collaborator

HinTak commented Dec 10, 2024

@MeetWq I found what I mentioned : https://github.com/google/skia/blob/main/include/ports/SkFontMgr_directory.h - this might be much better as it is core API rather than module's.

HinTak added a commit to HinTak/skia-python that referenced this issue Dec 25, 2024
@HinTak HinTak linked a pull request Dec 25, 2024 that will close this issue
@HinTak
Copy link
Collaborator

HinTak commented Dec 25, 2024

@MeetWq gives the CI build in #293 if you want to try it out. See the tests for usage. As I wrote earlier it is somewhat similar to #292, which you might have a try too.

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 a pull request may close this issue.

2 participants