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

SkSVGDOM::renderNode() is not exposed in python #192

Closed
HinTak opened this issue Jul 4, 2023 · 3 comments
Closed

SkSVGDOM::renderNode() is not exposed in python #192

HinTak opened this issue Jul 4, 2023 · 3 comments

Comments

@HinTak
Copy link
Collaborator

HinTak commented Jul 4, 2023

Is your feature request related to a problem? Please describe.

According to:
https://github.com/kyamagu/skia-python/blob/main/src/skia/SVGDOM.cpp

SkSVGDOM::RenderNode() is not exposed. It is also not mentioned in the doc.

Look like it shouldn't be too hard?

https://api.skia.org/classSkSVGDOM.html#a28b33bb4471777ee37034f9f8c4766c6

Describe the solution you'd like

Describe alternatives you've considered

Additional context
Looking for skia equivalent of rsvg's render_layer() routine. For OT-SVG support.

@kyamagu
Copy link
Owner

kyamagu commented Jul 5, 2023

We welcome a PR. Could be that the old m87 branch has different APIs.

@HinTak
Copy link
Collaborator Author

HinTak commented Jul 5, 2023

It takes an argument of the sort returned by "findNodeByID()", so I am wondering why that entry us commented out in current code? Hmm, oh, that returns a SkSVGSVG type which is not a class in python-skia... But RenderNode() just take a str argument.

Okay, I'll see if I can find my way around...

@HinTak
Copy link
Collaborator Author

HinTak commented Jul 8, 2023

Skia m88 is the first build where SVG functionality is considered non-experimental (headers moved).

Skia m103 is the first Skia build which contains 9cbadcd9280dc139af2f4d41d25a6c9a750e0302.
That introduces "SkSVGDOM::renderNode()" among other stuff, necessary for rendering "some" OT-SVG fonts. Guess what, that commit is titled "Add optional OT-SVG support to FreeType"! No kidding. :-).

I guess somebody needs to update the skia submodule first. Then we can fix the small m88 breakage (just headers moved), before attempting this.

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

No branches or pull requests

2 participants