mirror of
https://github.com/curioustorvald/Terrarum-sans-bitmap.git
synced 2026-03-07 11:51:50 +09:00
OTF diacritics positioning with nudging
This commit is contained in:
@@ -1377,10 +1377,10 @@ def _generate_mark(glyphs, has):
|
|||||||
x_offset -= g.props.nudge_x * SC.SCALE
|
x_offset -= g.props.nudge_x * SC.SCALE
|
||||||
mark_x = x_offset + half * SC.SCALE
|
mark_x = x_offset + half * SC.SCALE
|
||||||
elif align == SC.ALIGN_RIGHT:
|
elif align == SC.ALIGN_RIGHT:
|
||||||
# Match Kotlin: mark at base anchor - W_VAR_INIT.
|
# nudge_x is already baked into the CFF contour x_offset
|
||||||
# The contour x_offset already includes (width - W_VAR_INIT),
|
# (font_builder.py line 286). Setting mark_x = 0 means
|
||||||
# so mark_x just needs the nudge_x component.
|
# the nudge is applied once (via the contour), not twice.
|
||||||
mark_x = g.props.nudge_x * SC.SCALE
|
mark_x = 0
|
||||||
else:
|
else:
|
||||||
# ALIGN_LEFT / ALIGN_BEFORE: mark sits at base origin.
|
# ALIGN_LEFT / ALIGN_BEFORE: mark sits at base origin.
|
||||||
mark_x = 0
|
mark_x = 0
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user