Foreground color only applies to first cell for wide Nerd Font glyphs with any text styling in Windows Terminal #23892

Closed
opened 2026-01-31 08:55:21 +00:00 by claunia · 1 comment
Owner

Originally created by @Mioxiya on GitHub (Dec 19, 2025).

Windows Terminal version

1.23.12811.0

Windows build number

10.0.26200.7462

Other Software

No response

Steps to reproduce

Description

In Windows Terminal, when using JetBrainsMono Nerd Font, wide Nerd Font glyphs do not fully apply foreground color when any text styling is enabled.

  • When no text style is applied (foreground color only), the glyph renders correctly across both cells.
  • When any style such as bold, italic, underline, or background is applied in combination with foreground color, only the first cell of the glyph receives the foreground color, while the glyph visually spans both cells.
  • Some glyphs may render correctly at certain font sizes, suggesting that this issue is sensitive to glyph metrics and font rendering behavior.

This behavior does not occur on Termux, where all glyphs render fully correctly with any style combination.

Steps to Reproduce

  1. Set JetBrainsMono Nerd Font in Windows Terminal.
  2. Output the following glyphs with foreground color and various styles:
    bash:
glyphs=(
  ""
  ""
  ""
  "󰁁"
  "󰁔"
  ""
  "󰱎"
  ""
  "󰕈"
)

reset="\e[0m"
fg="\e[38;5;82m"
bg="\e[48;5;236m"
bold="\e[1m"
italic="\e[3m"
underline="\e[4m"
sep="   "   # 3 spaces

echo "=== fg ==="
for g in "${glyphs[@]}"; do
  printf "${fg}%s${reset}%s" "$g" "$sep"
done
echo

echo "=== bold + fg ==="
for g in "${glyphs[@]}"; do
  printf "${bold}${fg}%s${reset}%s" "$g" "$sep"
done
echo

echo "=== italic + fg ==="
for g in "${glyphs[@]}"; do
  printf "${italic}${fg}%s${reset}%s" "$g" "$sep"
done
echo

echo "=== underline + fg ==="
for g in "${glyphs[@]}"; do
  printf "${underline}${fg}%s${reset}%s" "$g" "$sep"
done
echo

echo "=== bold + bg + fg ==="
for g in "${glyphs[@]}"; do
  printf "${bold}${bg}${fg}%s${reset}%s" "$g" "$sep"
done
echo

powershell:

$glyphs = "","","","󰁁","󰁔","","󰱎","","󰕈"

$esc = [char]27
$reset = "${esc}[0m"
$fg = "${esc}[38;5;82m"
$bg = "${esc}[48;5;236m"
$bold = "${esc}[1m"
$italic = "${esc}[3m"
$underline = "${esc}[4m"
$sep = "   "

Write-Host "=== fg ==="
foreach ($g in $glyphs) {
    Write-Host "$fg$g$reset$sep" -NoNewline
}
Write-Host ""

Write-Host "=== bold + fg ==="
foreach ($g in $glyphs) {
    Write-Host "$bold$fg$g$reset$sep" -NoNewline
}
Write-Host ""

Write-Host "=== italic + fg ==="
foreach ($g in $glyphs) {
    Write-Host "$italic$fg$g$reset$sep" -NoNewline
}
Write-Host ""

Write-Host "=== underline + fg ==="
foreach ($g in $glyphs) {
    Write-Host "$underline$fg$g$reset$sep" -NoNewline
}
Write-Host ""

Write-Host "=== bold + bg + fg ==="
foreach ($g in $glyphs) {
    Write-Host "$bold$bg$fg$g$reset$sep" -NoNewline
}
Write-Host ""

Expected Behavior

in android termux
Image

Actual Behavior

In terminal with front size 18
Image
In terminal with front size 17

Image

In terminal with front size 16
Image

Originally created by @Mioxiya on GitHub (Dec 19, 2025). ### Windows Terminal version 1.23.12811.0 ### Windows build number 10.0.26200.7462 ### Other Software _No response_ ### Steps to reproduce ## Description In Windows Terminal, when using JetBrainsMono Nerd Font, wide Nerd Font glyphs do not fully apply foreground color when **any text styling** is enabled. - When **no text style** is applied (foreground color only), the glyph renders correctly across both cells. - When **any style** such as bold, italic, underline, or background is applied in combination with foreground color, only the **first cell** of the glyph receives the foreground color, while the glyph visually spans both cells. - Some glyphs may render correctly at certain font sizes, suggesting that this issue is sensitive to glyph metrics and font rendering behavior. This behavior does **not** occur on Termux, where all glyphs render fully correctly with any style combination. ## Steps to Reproduce 1. Set JetBrainsMono Nerd Font in Windows Terminal. 2. Output the following glyphs with foreground color and various styles: bash: ```bash glyphs=( "" "" "" "󰁁" "󰁔" "" "󰱎" "" "󰕈" ) reset="\e[0m" fg="\e[38;5;82m" bg="\e[48;5;236m" bold="\e[1m" italic="\e[3m" underline="\e[4m" sep=" " # 3 spaces echo "=== fg ===" for g in "${glyphs[@]}"; do printf "${fg}%s${reset}%s" "$g" "$sep" done echo echo "=== bold + fg ===" for g in "${glyphs[@]}"; do printf "${bold}${fg}%s${reset}%s" "$g" "$sep" done echo echo "=== italic + fg ===" for g in "${glyphs[@]}"; do printf "${italic}${fg}%s${reset}%s" "$g" "$sep" done echo echo "=== underline + fg ===" for g in "${glyphs[@]}"; do printf "${underline}${fg}%s${reset}%s" "$g" "$sep" done echo echo "=== bold + bg + fg ===" for g in "${glyphs[@]}"; do printf "${bold}${bg}${fg}%s${reset}%s" "$g" "$sep" done echo ``` powershell: ```powershell $glyphs = "","","","󰁁","󰁔","","󰱎","","󰕈" $esc = [char]27 $reset = "${esc}[0m" $fg = "${esc}[38;5;82m" $bg = "${esc}[48;5;236m" $bold = "${esc}[1m" $italic = "${esc}[3m" $underline = "${esc}[4m" $sep = " " Write-Host "=== fg ===" foreach ($g in $glyphs) { Write-Host "$fg$g$reset$sep" -NoNewline } Write-Host "" Write-Host "=== bold + fg ===" foreach ($g in $glyphs) { Write-Host "$bold$fg$g$reset$sep" -NoNewline } Write-Host "" Write-Host "=== italic + fg ===" foreach ($g in $glyphs) { Write-Host "$italic$fg$g$reset$sep" -NoNewline } Write-Host "" Write-Host "=== underline + fg ===" foreach ($g in $glyphs) { Write-Host "$underline$fg$g$reset$sep" -NoNewline } Write-Host "" Write-Host "=== bold + bg + fg ===" foreach ($g in $glyphs) { Write-Host "$bold$bg$fg$g$reset$sep" -NoNewline } Write-Host "" ``` ### Expected Behavior in android termux ![Image](https://github.com/user-attachments/assets/6aeafe8d-7cb7-47c9-8cf6-ba60c01ff4c7) ### Actual Behavior In terminal with front size 18 <img width="664" height="350" alt="Image" src="https://github.com/user-attachments/assets/6a87c8cf-d18e-415a-a3b5-d28a84553846" /> In terminal with front size 17 <img width="512" height="317" alt="Image" src="https://github.com/user-attachments/assets/ab22cffd-c399-415b-be02-4f10fbd6bd71" /> In terminal with front size 16 <img width="474" height="288" alt="Image" src="https://github.com/user-attachments/assets/7025d9b4-0106-4b59-8e36-3cfdcdb39839" />
claunia added the Needs-TriageIssue-Bug labels 2026-01-31 08:55:21 +00:00
Author
Owner

@DHowett commented on GitHub (Dec 19, 2025):

So, yes. This is an intentional choice, but we could easily have gone the other direction.

We're tracking this over in #16585, with an explanation in https://github.com/microsoft/terminal/issues/16585#issuecomment-1904408523.

In short: ligatures are implemented as single glyphs which take up the space of 2-4 glyphs; to support text selection (which changes the foreground color) and multiple-color ligature glyphs we choose to paint them along the cell grid rather than per-glyph or per-glyph-component.

This prevents an ugly case where selecting the first cell in a ligature or an emoji or a nerd font icon changes the other cells to black, even if they are not actively selected.

But, we make that determination based on how much of the glyph hangs out of the cell. Some written languages have much larger glyphs or a lot of overlaps. It's all heuristic.

Anyway - follow 16585 :)

@DHowett commented on GitHub (Dec 19, 2025): So, yes. This is an intentional choice, but we could easily have gone the other direction. We're tracking this over in #16585, with an explanation in https://github.com/microsoft/terminal/issues/16585#issuecomment-1904408523. In short: ligatures are implemented as single glyphs which take up the space of 2-4 glyphs; to support text selection (which changes the foreground color) and multiple-color ligature glyphs we choose to paint them along the cell grid rather than per-glyph or per-glyph-component. This prevents an ugly case where selecting the first cell in a ligature or an emoji or a nerd font icon changes the _other cells_ to black, even if they are not actively selected. But, we make that determination based on how much of the glyph hangs out of the cell. Some written languages have much larger glyphs or a lot of overlaps. It's all heuristic. Anyway - follow 16585 :)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#23892