renderer: apply font-thicken to IME preedit text (#14230)

Fixes #13758

### Problem

With `font-thicken = true` on macOS, IME preedit (composing) text
renders noticeably thinner than committed text.

### Cause & Fix
Committed and preedit text diverge in `src/renderer/generic.zig`:

```text
Committed: Shaper -> addGlyph -> renderGlyph(..., { .thicken = config.font_thicken, ... })
Preedit: State -> addPreeditCell -> renderCodepoint(..., { .grid_metrics })
```

Fix: Pass `self.config.font_thicken` and
`self.config.font_thicken_strength` in `addPreeditCell`.

### Testing

- Verified on macOS with `font-thicken = true`.
- Verified with `zig fmt --check`.

### AI Disclosure

AI (gemini-3.8-flash) assisted in tracing the call path; manually
verified and tested.
This commit is contained in:
Mitchell Hashimoto
2026-09-14 12:48:34 -07:00
committed by GitHub

View File

@@ -3576,7 +3576,11 @@ pub fn Renderer(comptime GraphicsAPI: type) type {
@intCast(cp.codepoint),
.regular,
.text,
.{ .grid_metrics = self.grid_metrics },
.{
.grid_metrics = self.grid_metrics,
.thicken = self.config.font_thicken,
.thicken_strength = self.config.font_thicken_strength,
},
) catch |err| {
log.warn("error rendering preedit glyph err={}", .{err});
return;