nudge-y fixed

This commit is contained in:
minjaesong
2026-02-26 05:25:32 +09:00
parent 488304b7b4
commit a2a73128e0
2 changed files with 3 additions and 1 deletions

Binary file not shown.

View File

@@ -281,11 +281,13 @@ def build_font(assets_dir, output_path, no_bitmap=False, no_features=False):
if advance == 0:
x_offset -= g.props.nudge_x * SCALE
y_offset = -g.props.nudge_y * SCALE
contours = trace_bitmap(g.bitmap, g.props.width)
pen = T2CharStringPen(advance, None)
if contours:
draw_glyph_to_pen(contours, pen, x_offset=x_offset)
draw_glyph_to_pen(contours, pen, x_offset=x_offset, y_offset=y_offset)
traced_count += 1
charstrings[name] = pen.getCharString()