Fix bitmap glyph skew origin#1307
Conversation
|
I think it would probably be easier to review if you merged this and #1306 into a single PR, as they're touching very similar code. Would you be willing to add some tests here? I believe that the existing test in vello/vello_tests/tests/emoji.rs Lines 160 to 173 in a04070a My gut reaction here is that a much simpler solution is possible, possibly to both issues. But for awareness, I haven't looked too closely. Essentially, the issue in both cases is that the This is related to #1273, but there's nothing actionable to be taken from that PR here. |
Bitmap glyphs use Y-down coordinate system (top at y=0), while outline/COLR fonts use Y-up (baseline at y=0). When
glyph_transform(skew for synthetic italic) is applied to bitmap glyphs, the skew origin is at the top-left corner instead of the baseline, causing the italic effect to lean in the wrong direction.Fix
Screenshots