Skip to content

Implement bold-color support (bright and fixed)#253

Merged
dakra merged 1 commit into
dakra:mainfrom
mgeisler:bold-color-support
May 13, 2026
Merged

Implement bold-color support (bright and fixed)#253
dakra merged 1 commit into
dakra:mainfrom
mgeisler:bold-color-support

Conversation

@mgeisler
Copy link
Copy Markdown
Contributor

@mgeisler mgeisler commented May 10, 2026

Add support for Ghostty's bold-color configuration, allowing bold text to be rendered using bright colors or a specific fixed color.

Summary of changes:

  • src/terminal.zig: Add BoldConfig and bold_config field to Terminal.
  • src/module.zig: Add ghostel--set-bold-config to update bold settings.
  • src/render.zig: Implement color substitution logic in readCellProps. Bold text with palette colors 0-7 is mapped to 8-15. Bold text with default foreground uses bold_config.fixed_color if mode is fixed.
  • lisp/ghostel.el: Add ghostel-bold-color defcustom (default bright) and logic to apply it to new and existing terminals.
  • test/ghostel-test.el: Add unit tests for both 'bright and fixed-color bold modes.
  • src/emacs.zig: Add bright symbol to cached symbols.

Matches Ghostty 1.2.0 behavior.

Written by Gemini, tested by me.

Comment thread src/render.zig Outdated
Comment thread lisp/ghostel.el Outdated
@mgeisler mgeisler force-pushed the bold-color-support branch from 518367a to 30f8b8a Compare May 11, 2026 21:44
@emil-e
Copy link
Copy Markdown
Collaborator

emil-e commented May 11, 2026

I'll have another look tomorrow!

Comment thread src/module.zig Outdated
Comment thread src/module.zig Outdated
Comment thread src/Renderer.zig Outdated
@mgeisler mgeisler force-pushed the bold-color-support branch from 30f8b8a to 06b9347 Compare May 12, 2026 17:56
@mgeisler mgeisler requested a review from emil-e May 12, 2026 18:03
@emil-e
Copy link
Copy Markdown
Collaborator

emil-e commented May 12, 2026

LGTM

@dakra Any thoughts? I personally don't quite understand the point but given Ghostty proper has this, I'm guessing it's a thing that people want? :)

Add support for Ghostty's `bold-color` configuration, allowing bold
text to be rendered using bright colors or a specific fixed color.

Summary of changes:
- src/terminal.zig: Add `BoldConfig` and `bold_config` field to `Terminal`.
- src/module.zig: Add `ghostel--set-bold-config` to update bold settings.
- src/render.zig: Implement color substitution logic in `readCellProps`.
  Bold text with palette colors 0-7 is mapped to 8-15. Bold text with
  default foreground uses `bold_config.fixed_color` if mode is `fixed`.
- lisp/ghostel.el: Add `ghostel-bold-color` defcustom (default `bright`)
  and logic to apply it to new and existing terminals.
- test/ghostel-test.el: Add unit tests for both 'bright and fixed-color
  bold modes.
- src/emacs.zig: Add `bright` symbol to cached symbols.

Matches Ghostty 1.2.0 behavior.

> Written by Gemini, tested by me.
@dakra dakra force-pushed the bold-color-support branch 3 times, most recently from 22ebaaf to 0f65e93 Compare May 13, 2026 08:19
@dakra dakra merged commit 0f65e93 into dakra:main May 13, 2026
20 checks passed
@dakra
Copy link
Copy Markdown
Owner

dakra commented May 13, 2026

LGTM

lgtm. Thanks, merging.

@dakra Any thoughts? I personally don't quite understand the point but given Ghostty proper has this, I'm guessing it's a thing that people want? :)

Personally I'm also happy with just a bold face but I also don't have any aesthetic taste ;)
I asked the LLM why someone would want that option and the reasons make sense to me:

  • Legacy/theme convention. Old terminals couldn't render bold glyphs, so "bold" historically meant "switch to
    the bright palette slot." Most color schemes (Solarized, Gruvbox, Nord, etc.) were tuned assuming bold red =
    bright red — without the brightening, output from ls, grep, prompts, etc. looks duller than the theme author
    intended.
  • Visual punch. Bold-weight alone can be subtle at small sizes or with thin fonts; the color shift makes
    emphasized tokens actually pop.
  • Faux-bold avoidance. Some users disable bold-weight (eyestrain, ligature issues, fonts without a real bold
    face) but still want emphasis — bold-color = "#hex" gives them a single accent color instead of synthetic stroke
    widening.

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.

3 participants