Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upFix DirectWrite raster_bounds arithmetic #92
Conversation
|
I've tested it with |
|
Sure Similar to the rasterization tests (i.e. |
|
Yes, I think this will work well. |
|
I have added a "best-effort" test for verifying the rasterization of any top-down symmetrical letters. Currently, it's only testing |
|
I think this is good enough. Thanks again! |
Only testing '{' character at the moment
31d59c6
to
4b84d5e
|
Changed to target only Windows. Apparently, macos glyph is not as symmetrical. |
|
Thanks! |
idursun commentedJul 25, 2019
Fixes #85
raster_boundswas returning a rectangle at origin (0,0) whereas the origin of the bounds rectangle returned byget_alpha_texture_boundsis not (0,0). This caused offsetting origin calculation to be off when passed torasterize_glyphwhich caused the clipping.Offsetting origin calculation that I am referring to is:
https://github.com/pcwalton/font-kit/blob/6801dce15cbc75448d99420eeebbe8c867585f36/examples/render-glyph.rs#L133-L136
This change sets the origin of the
raster_boundsrectangle so that the origin offset arithmetic actually holds for directwrite.