[PR #16097] Support rendering of underline style and color #30835

Open
opened 2026-01-31 09:43:15 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/16097

State: closed
Merged: Yes


Add support for underline style and color in the renderer

Important

The PR adds underline style and color feature to AtlasEngine (WT) and GDIRenderer (Conhost) only.

After the underline style and color feature addition to Conpty, this PR takes it further and add support for rendering them to the screen!

Out of five underline styles, we already supported rendering for 3 of those types (Singly, Doubly, Dotted) in some form in our (Atlas) renderer. The PR adds the remaining types, namely, Dashed and Curly underlines support to the renderer.

  • All renderer engines now receive both gridline and underline color, and the latter is used for drawing the underlines. When no underline color is set, we use the foreground color.
  • Curly underline is rendered using sin() within the pixel shader.
  • To draw underlines for DECDWL and DECDHL, we send the line rendition scale within QuadInstance's texcoord attribute.
  • In GDI renderer, dashed and dotted underline is drawn using HPEN with a desired style. Curly line is a cubic Bezier that draws one wave per cell.

PR Checklist

  • Set the underline color to underlines only, without affecting the gridline color.
  • Port to DX renderer. (Not planned as DX renderer soon to be replaced by AtlasEngine)
  • Port underline coloring and style to GDI renderer (Conhost).
  • Wide/Tall CurlyUnderline variant for DECDWL/DECDHL.

Closes #7228

**Original Pull Request:** https://github.com/microsoft/terminal/pull/16097 **State:** closed **Merged:** Yes --- Add support for underline style and color in the renderer > [!IMPORTANT] > The PR adds underline style and color feature to AtlasEngine (WT) and GDIRenderer (Conhost) only. After the underline style and color feature addition to Conpty, this PR takes it further and add support for rendering them to the screen! Out of five underline styles, we already supported rendering for 3 of those types (Singly, Doubly, Dotted) in some form in our (Atlas) renderer. The PR adds the remaining types, namely, Dashed and Curly underlines support to the renderer. - All renderer engines now receive both gridline and underline color, and the latter is used for drawing the underlines. **When no underline color is set, we use the foreground color.** - Curly underline is rendered using `sin()` within the pixel shader. - To draw underlines for DECDWL and DECDHL, we send the line rendition scale within `QuadInstance`'s texcoord attribute. - In GDI renderer, dashed and dotted underline is drawn using `HPEN` with a desired style. Curly line is a cubic Bezier that draws one wave per cell. ## PR Checklist - ✅ Set the underline color to underlines only, without affecting the gridline color. - ❌ Port to DX renderer. (Not planned as DX renderer soon to be replaced by **AtlasEngine**) - ✅ Port underline coloring and style to GDI renderer (Conhost). - ✅ Wide/Tall `CurlyUnderline` variant for `DECDWL`/`DECDHL`. Closes #7228
claunia added the pull-request label 2026-01-31 09:43:15 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#30835