Skip to content

fix(paint): bundle the bold, italic and bold-italic faces of Go Mono - #409

Merged
tannevaled merged 1 commit into
mainfrom
fix/bundled-mono-styles
Nov 9, 2026
Merged

tannevaled merged 1 commit into
mainfrom
fix/bundled-mono-styles

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor

What

The bundled monospace face (Go Mono) was registered with a regular style only, so font-weight: bold and font-style: italic on generic monospace text were lost, in the raster, in PDF text and in the faces an editable PPTX/ODP records (#403).

  • Fills the three missing slots with gomono.BoldTTF, ItalicTTF and BoldItalicTTF from go-opentype/fonts v0.14.0, the same family. Licence checked in that module's README table: Go Mono is BSD-3-Clause (Bigelow & Holmes, 2016), the same as the regular already bundled (it is not OFL; the family is not variable, so the weight axis of fix(paint): draw a variable font at the CSS font-weight #405 does not apply and the static files are used).
  • Loaded on demand like the other faces. BundledFontNames and paint/bundledfonts list three more files, so webengine_fontsext hosts must serve them (13 -> 16 files).
  • font() loses its now unreachable "bundled slot missing, use the regular" branch (paint stays at 100 percent).
  • README: the fonts paragraph and the webengine_fontsext row.

Evidence

  • paint.TestBundledMonospaceStyles (fails on main: the four styles share one font): the four fonts are distinct, share Go Mono's fixed advance (layout does not move), a bold glyph carries clearly more ink than the regular, and the italic is not the upright shape. TestBundledFacesOnDemand now asks for the bold italic face.
  • All goldens unchanged; go test ./... and the webengine_fontsext build pass.
  • Binary size: three more embedded files in the default build; timings and allocations of rendering are unaffected for pages without monospace bold/italic.

Closes #403

Co-Authored-By: Claude Sonnet 5.5 noreply@anthropic.com

🤖 Generated with Claude Code

The generic monospace had a regular style only, so bold and italic were lost
on monospace text (go-slides terminal recordings, editable decks). The four
styles of go-opentype/fonts gomono (BSD-3-Clause, Bigelow & Holmes, the same
licence as the regular) now fill the four slots, loaded on demand like the
others; webengine_fontsext lists three more files.

Closes #403

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@tannevaled
tannevaled merged commit 1cc758c into main Nov 9, 2026
13 checks passed
@tannevaled
tannevaled deleted the fix/bundled-mono-styles branch November 9, 2026 12:57
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.

The bundled monospace face has a regular style only: bold and italic are lost on generic monospace text

1 participant