Add curly-pixelated option for blocky undercurl style

Adds a new boolean option `curly-pixelated` that renders undercurls
as alternating 4px blocks instead of smooth trapezoids. This style
works better with bitmap/monospace fonts like GohuFont.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
txf 2026-01-28 18:54:11 +00:00
parent 6fbb9b7d3b
commit ba4d66e3bb
4 changed files with 28 additions and 0 deletions

View file

@ -1075,6 +1075,9 @@ parse_section_main(struct context *ctx)
else if (streq(key, "underline-thickness"))
return value_to_pt_or_px(ctx, &conf->underline_thickness);
else if (streq(key, "curly-pixelated"))
return value_to_bool(ctx, &conf->curly_pixelated);
else if (streq(key, "strikeout-thickness"))
return value_to_pt_or_px(ctx, &conf->strikeout_thickness);
@ -3475,6 +3478,7 @@ config_load(struct config *conf, const char *conf_path,
.use_custom_underline_offset = false,
.box_drawings_uses_font_glyphs = false,
.underline_thickness = {.pt = 0., .px = -1},
.curly_pixelated = false,
.strikeout_thickness = {.pt = 0., .px = -1},
.dpi_aware = false,
.gamma_correct = false,