Color Blocks shifting when using powerline enabled fonts #4302

Closed
opened 2026-01-30 23:43:23 +00:00 by claunia · 4 comments
Owner

Originally created by @Cornelicorn on GitHub (Oct 5, 2019).

Environment

Microsoft Windows [Version 10.0.18362.388]
Windows Terminal (Preview) 0.5.2762.0

tmux zsh (bullet-train theme) on Ubuntu WSL 18.04.3 LTS

Steps to reproduce

Install tmux or zsh and install a theme with color blocks (e.g. bullet-train theme) and configure a powerline-font in Windows Terminal.

Expected behavior

Font used for startup does not matter.

Actual behavior

If you start zsh/tmux with a Powerline font, all color blocks are shifted slighty:
image

If you start with a non-powerline font (e.g. Consolas) the blocks are the correct position:
image

Applying the powerline font after startup works as it should:
image

Using WSL without the Terminal App works (excpept lacking Emoji support)
image

Originally created by @Cornelicorn on GitHub (Oct 5, 2019). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. If this is an application crash, please also provide a Feedback Hub submission link so we can find your diagnostic data on the backend. Use the category "Apps > Windows Terminal (Preview)" and choose "Share My Feedback" after submission to get the link. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment ```none Microsoft Windows [Version 10.0.18362.388] Windows Terminal (Preview) 0.5.2762.0 tmux zsh (bullet-train theme) on Ubuntu WSL 18.04.3 LTS ``` # Steps to reproduce <!-- A description of how to trigger this bug. --> Install tmux or zsh and install a theme with color blocks (e.g. [bullet-train theme](https://github.com/caiogondim/bullet-train.zsh)) and configure a powerline-font in Windows Terminal. # Expected behavior Font used for startup does not matter. <!-- A description of what you're expecting, possibly containing screenshots or reference material. --> # Actual behavior <!-- What's actually happening? --> If you start zsh/tmux with a Powerline font, all color blocks are shifted slighty: ![image](https://user-images.githubusercontent.com/40914430/66259591-fdd06a00-e7b2-11e9-8861-0eb5f4c36c58.png) If you start with a non-powerline font (e.g. Consolas) the blocks are the correct position: ![image](https://user-images.githubusercontent.com/40914430/66259619-48ea7d00-e7b3-11e9-8be9-2aa000b0effe.png) Applying the powerline font after startup works as it should: ![image](https://user-images.githubusercontent.com/40914430/66259626-61f32e00-e7b3-11e9-99d1-00ef0969515e.png) Using WSL without the Terminal App works (excpept lacking Emoji support) ![image](https://user-images.githubusercontent.com/40914430/66259710-87cd0280-e7b4-11e9-9817-47a203b7c109.png)
claunia added the Resolution-Duplicate label 2026-01-30 23:43:23 +00:00
Author
Owner

@Cornelicorn commented on GitHub (Oct 5, 2019):

Temporary fix:

save this script:

#!/bin/bash -e

# Replace the powerline font with the Consolas font
function shutdown {
sed -i '/"fontFace" : "YOUR_CUSTOM_FONT",/c\"fontFace" : "Consolas",' /mnt/YOUR_CUSTOM_PATH/profiles.json
}

trap shutdown EXIT #Execute function shutdown when terminal exits
#Start Tmux (change to bash/zsh/...)
tmux

And change the commandline option in profiles.json to start it. (e.g. "commandline" : "wsl.exe -d Ubuntu-18.04 /home/user/.zsh_startup",

Then add sed -i '/"fontFace" : "Consolas",/c\"fontFace" : "YOUR_CUSTOM_FONT",' /mnt/YOUR_CUSTOM_PATH/profiles.json at the end of the rc file of your shell (e.g. ~/.zshrc)

This way the font will be loaded after your shell is loaded and changed to the default before exit when closing Windows Terminal.

@Cornelicorn commented on GitHub (Oct 5, 2019): # Temporary fix: save this script: ```bash #!/bin/bash -e # Replace the powerline font with the Consolas font function shutdown { sed -i '/"fontFace" : "YOUR_CUSTOM_FONT",/c\"fontFace" : "Consolas",' /mnt/YOUR_CUSTOM_PATH/profiles.json } trap shutdown EXIT #Execute function shutdown when terminal exits #Start Tmux (change to bash/zsh/...) tmux ``` And change the `commandline ` option in profiles.json to start it. (e.g. `"commandline" : "wsl.exe -d Ubuntu-18.04 /home/user/.zsh_startup",` Then add ` sed -i '/"fontFace" : "Consolas",/c\"fontFace" : "YOUR_CUSTOM_FONT",' /mnt/YOUR_CUSTOM_PATH/profiles.json` at the end of the `rc` file of your shell (e.g. ~/.zshrc) This way the font will be loaded after your shell is loaded and changed to the default before exit when closing Windows Terminal.
Author
Owner

@Cornelicorn commented on GitHub (Oct 5, 2019):

This fix unfortunately requires a tmux session running in the background

@Cornelicorn commented on GitHub (Oct 5, 2019): This fix unfortunately requires a tmux session running in the background
Author
Owner

@DHowett-MSFT commented on GitHub (Oct 6, 2019):

This is another version of /dup #633, fixed with #2066, in PR #2928.

@DHowett-MSFT commented on GitHub (Oct 6, 2019): This is another version of /dup #633, fixed with #2066, in PR #2928.
Author
Owner

@ghost commented on GitHub (Oct 6, 2019):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost commented on GitHub (Oct 6, 2019): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#4302