-
Notifications
You must be signed in to change notification settings - Fork 608
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
[draw] Finish and release draw API #3411
Conversation
So far what I like to change:
|
Great to hear! Guess now needs coordination with the brand new _synthetic_slant also. |
Interesting question! |
This comment was marked as resolved.
This comment was marked as resolved.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Sure, what do you need me to do. |
@khaledhosny How about this? |
@ebraminio Can I get help from you on this one? |
Only works with --font-funcs=hb-ot right now. Uses cairo-user-font backend internally, which seems to extent issues. Also, with Zapfino, the 'Z' seems to put the scaled-font into an error. For the extent issue example see: #3411 (comment)
And as I suspected, fixed in cairo main... Just not in a release yet :(. |
To summarize, what's left:
I think this can go in then, with the hb-view implementation as well, but will depend on very recent cairo. So initially I suggest we push in everything but that last bit. |
Okay, rewrote the logic to keep the cairo-ft implementation as well, but enable the hb-draw logic if cairo is recent-enough (1.17.5 version-check) AND font-funcs are NOT |
ade9833
to
0d2d8f6
Compare
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Question: Should I add back the return value of the |
I personally don't see the point of that. You are writing the code, you know what's on the other side... |
Internally creates a font at 2x and creates a sub-font from it...
To include the latest color glyph fixes
This makes it actually match freetype behaviour even though rasterizer should filter such contours specially for stroking. See #3411 (comment) for the context.
Let's have that part of the code also covered.
Also added a test for ft callback 0429921 feel free to just remove the commit from history if you don't see fit. Also any interest on having binding to coretext/gdi/directwrite #3411 (comment) somewhere somehow? Just though it could be nice for the sake of debugging and so later. |
If you are willing to implement the rest of the font-funcs callbacks for them... In 10+ years no one bothered / cared / requested. |
@ebraminio why did the linux-ci bot fail? |
As CI failure, apparently the my local freetype and CI one have different result so let's switch the case with a simpler one just to test quadratic command is emitted correctly.
My local freetype version is 24 and the CI one is 21 and that apparently means different results (or maybe because the debug bit leftover I just spotted now) I swapped the test case with a simpler one case just to test line_to/quadratic_to commands of ft callbacks are emitted correctly. |
Would be nice to add a |
Fixes another color fonts issue.
I wish it could create a SVG from input text without Cairo, say like https://harfbuzz.github.io/harfbuzzjs/ demo which creates SVG from input text, I needed accurate rendering of some text in SVG to upload to Wikipedia and shaped the tool for the purpose which creates relative SVG path also to have more optimized yet accurate result. Just to note main.cc also creates SVG for individual glyphs of a font when hb-draw is enabled and supports COLRv0/SVG/png dumping also. |
Maybe we can spec and develop that separately then. I like to merge this soon. |
@behdad Any progress since then? |
No. Can you use the hb-view SVG output and massage it through |
Okay I'm determined to finish and release draw API in the next three weeks of hacking. @ebraminio are you available to help? @khaledhosny can I get some help from you?
I know what I like done, and I'll enumerate that in the next comments. Before that, I like to know how @ebraminio was testing this. I guess with JS? UPDATE: Using src/main tool.