agnoster / agnoster-zsh-theme

A ZSH theme designed to disclose information contextually, with a powerline aesthetic
3.95k stars 583 forks source link

The icon of 'git branch' is broken #130

Closed HelloIK closed 4 years ago

HelloIK commented 4 years ago

I have installed the Powerline-patched font. But when I use echo "\ue0b0 \u00b1 \ue0a0 \u27a6 \u2718 \u26a1 \u2699", it doesn't show correctly👇👇👇. test0

Only the icon of 'git branch'(\ue0a0 \u27a6) is broken. I'm using Gnome Terminal 3.28.2 on Ubuntu 18.04 LTS and the version of fonts-powerline is 2.6-1

XiongKezhi commented 4 years ago

Same issue! I'm using ubuntu 18.04, and I have already installed powerline-fonts. Any suggestions to solve this?

apjanke commented 4 years ago

Looks like you've got a CJK character squatting on the PUA code point that the normal Powerline font uses. That's a little surprising.

Which particular Powerline font do you have your terminal configured to use? (E.g. "Meslo LG M DZ Powerline" etc) And what's your locale settings?

apjanke commented 4 years ago

And how exactly did you install powerline-fonts? Maybe that matters.

XiongKezhi commented 4 years ago

Yeah! I think it's the way that I install powerline-fonts caused the problem. Last time I used apt-get, but this time git clone https://github.com/powerline/fonts.git --depth=1 fonts and ./fonts/install.sh solved my problem. Also, remember to choose the powerline fonts in the terminal's preference settings.

apjanke commented 4 years ago

Oh! Yeah, that's probably it. Don't install Powerline Fonts through apt-get for use with Agnoster. There is a fonts-powerline package in the Debian repo, but that isn't what you want! It includes some small fonts with only the Powerline icons in them, useful in applications that support "fallback fonts" or with tools that construct patched fonts. Most terminals, including Gnome Terminal, do not support fallback fonts. The fonts in the Debian fonts-powerline package are not the kind of "Powerline-patched fonts" that the Agnoster documentation is referring to and that you need.

HelloIK commented 4 years ago

I have removed the fonts-powline installed from the Ubuntu repo, and turned to run the install.sh. Thanks to your help, now it work correctly. 🍺