SkiaSharp icon indicating copy to clipboard operation
SkiaSharp copied to clipboard

OT-SVG support: binding SkGraphics::SetOpenTypeSVGDecoderFactory()

Open HinTak opened this issue 1 year ago • 1 comments

Is your feature request related to a problem?

The skia-python equivalent is in:

https://github.com/kyamagu/skia-python/blob/e0b030c14e33f70880cfcc502eaeed898a77fc3c/src/skia/main.cpp#L82

Either provide that as a extra /optional call, or put it in SkiaSharp somewhere during load-time, one off, as in skia-python. The line switches on OT-SVG colour font support within skia.

You might need to add a little to your libskiasharp.so process, but ask me if you encounter problems. (I am the one who put that line in skia-python).

And possibly reference this shell script for skia build options:

https://github.com/HinTak/skia-building-fun/blob/main/download-and-build-skia.sh

Describe the solution you would like

Support ot-svg colour fonts

Describe alternatives you have considered

This is an obscure and new part of skia's api (since m103 or thereabouts, I believe), it unlikely you have already bound it yet.

Additional context

No response

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

HinTak avatar Jul 12 '24 00:07 HinTak

Didn't know you are so behind compared to skia-python - you need the svg module for the functionality I mentioned. The svg module became non-experimental in m88. I.e. you might need to deal with https://github.com/mono/SkiaSharp/issues/2689 first.

HinTak avatar Jul 13 '24 03:07 HinTak

any new developments on this?

cosmix-pics avatar Oct 22 '24 22:10 cosmix-pics

Seems the logical place for adding this is in https://github.com/mono/SkiaSharp/blob/main/binding/SkiaSharp/SKGraphics.cs , plus perhaps a few other places in addition.

HinTak avatar Oct 23 '24 14:10 HinTak