Skip to content

fix(render): flip glyphs of mirrored text - #30

Draft
lunaynx wants to merge 1 commit into
mainfrom
fix/mirrored-text
Draft

lunaynx wants to merge 1 commit into
mainfrom
fix/mirrored-text

Conversation

@lunaynx

@lunaynx lunaynx commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

Text drawn under a negative scale (e.g. scale(-1f, 1f)) placed its glyphs at mirrored pen positions but drew each glyph unflipped, because glyphRun derived the per-axis glyph scale from abs(sx)/abs(sy).

  • kx/ky now carry the sign of the current scale, so mirrored glyphs take the scaled path and their UVs flip with them.
  • glyphQuad normalizes mirrored quads to the usual winding, since a quad mirrored on one axis winds backwards and culling pipelines drop it.

Ported from OneConfig's unmerged fix/mirrored-text branch (written when poly-compose still lived there). The new mirroredTextFlipsGlyphsInPlace test fails on main and passes with the fix.

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

Successfully merging this pull request may close these issues.

1 participant