Skip to content

Halve Red Hat Mono underline thickness (#67) - #79

Open
srijavuppala wants to merge 1 commit into
RedHatOfficial:masterfrom
srijavuppala:fix/mono-underline-thickness
Open

Halve Red Hat Mono underline thickness (#67)#79
srijavuppala wants to merge 1 commit into
RedHatOfficial:masterfrom
srijavuppala:fix/mono-underline-thickness

Conversation

@srijavuppala

Copy link
Copy Markdown

Summary

Fixes #67 — the dotted spellcheck error underline in gtksourceview renders much larger with Red Hat Mono than with comparable fonts.

Cause: Red Hat Mono sets post.underlineThickness to 100 (10% of the 1000 UPM) — twice the font's own OS/2.yStrikeoutSize (50), and about double a typical monospace value (Source Code Pro, which @chergert notes "looks fine," uses ~50). Pango draws error underlines at 3× the underline thickness (pango_renderer_draw_error_underline), so the dots come out oversized.

Fix: set underlineThickness to 50 across all masters of RedHatMono.glyphs and RedHatMono-Italic.glyphs — matching the existing strikeout weight and roughly halving the rendered error-underline size. underlinePosition is left unchanged.

Verification

Rebuilt Mono (roman + italic) with fontmake:

  • post.underlineThickness is now 50 for all styles.
  • All glyph outlines are byte-identical to the previous build (only the post metric changes).

Scoped to Red Hat Mono, the font in the report. Red Hat Text and Display carry the same value if the maintainers would like it applied there too. The exact target is of course a design call — 50 matches the strikeout weight and Source Code Pro, but feel free to tune it. Binaries should be regenerated from these sources on the next release build.

Red Hat Mono set post.underlineThickness to 100 (10% of the 1000 UPM),
twice the font's own OS/2.yStrikeoutSize (50) and about double a typical
monospace value (e.g. Source Code Pro ~50). Pango draws spellcheck error
underlines at 3x the underline thickness, so in gtksourceview the dotted
error underline renders much larger than comparable fonts (RedHatOfficial#67).

Set underlineThickness to 50 across all masters of RedHatMono.glyphs and
RedHatMono-Italic.glyphs. This matches the existing strikeout weight and
roughly halves the rendered error-underline size.

Verified with a fontmake rebuild: post.underlineThickness is 50 for all
Mono styles (roman + italic) and all glyph outlines are byte-identical to
the previous build. underlinePosition is left unchanged.

Fonts binaries should be regenerated from these sources on the next
release build.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

dotted underlining in gtksourceview is very large with Red Hat Mono

1 participant