Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Color Blocks shifting when using powerline enabled fonts #3085

Closed
Cornelicorn opened this issue Oct 5, 2019 · 4 comments
Closed

Color Blocks shifting when using powerline enabled fonts #3085

Cornelicorn opened this issue Oct 5, 2019 · 4 comments
Labels
Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.

Comments

@Cornelicorn
Copy link

Cornelicorn commented 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

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Oct 5, 2019
@Cornelicorn
Copy link
Author

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
Copy link
Author

This fix unfortunately requires a tmux session running in the background

@DHowett-MSFT
Copy link
Contributor

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

@ghost
Copy link

ghost commented 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 ghost closed this as completed Oct 6, 2019
@ghost ghost added Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Oct 6, 2019
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.
Projects
None yet
Development

No branches or pull requests

2 participants