Powerlevel9k: icons

Created on 16 Mar 2016  ยท  18Comments  ยท  Source: Powerlevel9k/powerlevel9k

so this is what i have config wise:

ZSH_THEME="powerlevel9k/powerlevel9k"
POWERLEVEL9K_MODE='awesome-fontconfig'
POWERLEVEL9K_SHORTEN_DIR_LENGTH=9
POWERLEVEL9K_SHORTEN_STRATEGY="truncate_middle"
POWERLEVEL9K_STATUS_VERBOSE=true
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(root_indicator virtualenv dir vcs status)
POWERLEVEL9K_DISABLE_RPROMPT=true
POWERLEVEL9K_SHOW_CHANGESET=true
POWERLEVEL9K_CHANGESET_HASH_LENGTH=6

https://i.imgur.com/vKIm9Ag.png

for status i have a green M instead of a tick...not sure why
root icon...seems rather strange to use a graph...

Most helpful comment

Awesome! I'll try to contribute if I'm doing something which isn't already there.

All 18 comments

Seems like your font is not installed correctly. Can you double-check the install instructions for awesome-terminal-fonts?

Are you sure, you didn't install the patched ones instead? Or Nerd-Fonts?

am at a lost...deleted everything in .fonts folder and started from scratch following the guide...still no joy (i do use font awesome, patched fonts and nerdfonts on my arch system with i3)

Hmm. Do you need all these fonts as separated ones?
I always recommend to use the pre-patched fonts, as they are easier to install. They already contain a couple of different fonts (like font-awesome, octoicons, powerline, etc.).. Is that an option for you?

Hey @ralpheeee88 - Just following up, here. Did you get the fonts working? Did you try the pre-patched fonts that @dritter linked to?

Sorry chief.....am on vacation without laptop...will close this case....and fugue it our when I get back next week...

Sounds good. Thanks, @ralpheeee88!

I have the same issue now. Status OK icon is green "M", absolutely identical to Medium.com logo.

@Pavel-Brilliant What POWERLEVEL9K_MODE do you use?

What exactly do you mean with "now"? Did it work at some point?

@dritter
POWERLEVEL9K_MODE='awesome-fontconfig'
POWERLEVEL9K_STATUS_VERBOSE='true'

"Now" means I thought this issue was resolved.
I still can't find a solution.

Also, there are other incorrect icons, not only the M instead of a tick.

  1. Green M instead of a tick. This is Medium.com logo, 100%.
  2. On wrong input, the status field in "POWERLEVEL9K_STATUS_VERBOSE=false" mode shows a strange sad face icon instead of 'X'
  3. In git directory, instead of the correct icon before the "current commit hash", a female-gender icon is displayed.

I'll try to describe how the theme prints the icons to clear that problem a little bit up:

A single-font scenario looks somewhat like this:

+-----+  prints "\uF23A"  +---------+  takes glyph from font   +--------------+
| p9k |------------------>| Your OS |------------------------->| render char  |
+-----+                   +---------+                          +--------------+

A multi-font scenario (what fontconfig is)

+-----+  prints "\uF23A"  +---------+              +--------------+
| p9k |------------------>| Your OS |------------->|  fontconfig  |
+-----+                   +---------+              +--------------+
                                                           |
                                                           | gets first configured font
                                                           | that provides a glyph for
                                                           | that codepoint
                                                           |
                                                           v
                                                    +--------------+
                                                    |  render char |
                                                    +--------------+

To make things worse, the awesome icons are in a so called private use area, which are not in the standard and so every font can define own glyphs for that codepoints (and they do). This problem applies to both strategies.
Speaking in powerlevelk9k-modes:

  • The non-awesome mode uses mostly standardized codepoints (exept for the famous powerline-icons) and is less likely to break.
  • The awesome-patched mode uses a newly assembled font where the conflicting codepoints already got resolved. So this is one font that was merged from other fonts and contains the glyphs of theses fonts. This is a pretty stable way to get the awesome icons to work (as long as this font uses the same glyphs for our requested codepoints.
  • The awesome-fontconfig mode makes use of a program called fontconfig that tries to find a glyph out of a defined set of installed fonts.

I don't know exactly how fontconfig works, but I think it is a problem either with your installed fonts (e.g. the codepoints differ) or with your configuration of fontconfig (it may find a font in advance of another one which provides the correct glyphs).

Here's a working config with "awesome-fontconfig" : https://github.com/V1rgul/dotfiles/blob/master/files/.config/fontconfig/conf.d/10-symbols.conf . Choose Ubuntu or Monospace as your terminal font.
All the needed fonts : https://github.com/V1rgul/dotfiles/tree/master/files/.fonts (put them in ~/.fonts)

Hope that helps

@dritter @V1rgul thank you very much for your help and assistance.
tried this config, replaced the fonts' files, but nothing has changed, unfortunately.

....so to bring this full circle....I decided to switch to vanilla zsh....after I uninstalled oh my zsh and set up my vanilla zsh.....no more glyph issues..... So anyone using oh my zsh....have a go at a vanilla zsh and let us know how it worked out....finally...:)

@ralpheeee88 - Thanks for the resolution! I really appreciate you coming back to update this bug report =)

I had a similar issue after updating my OS to Sierra, my previously installed awesome-terminal-fonts were not displaying the icons anymore:

  • [ ] I removed awesome-terminal-fonts and installed a patched nerd-font (Sauce Code Pro Nerd Font Complete), everything seemed fine but the status icon was indeed a green 'M'.
  • [ ] Then I added this override to my .zsh with the right icon: POWERLEVEL9K_OK_ICON='๏ฎ'

No issues anymore ...

Hi,
I'm also facing the exact same issue. I tried both awesome-fontconfig as well as the awesome-patched but both give me the same issues, Medium logo in awesome-fontconfig and weird greek symbol for awesome-patched where the Octocat logo should be.

Anybody has any clues as to what is going on? Below are my installation steps, please point out errors if any:

  • Install Oh-My-ZSH and the powerlvl9k theme.
  • Create directory ~/.fonts.
  • Clone the awesome-fontconfig directory.
  • Copy all the fonts in build/ to .fonts created above.
  • Run sudo fc-cache -fv ~/.fonts.
  • Copy the config from awesome-terminal-fonts as is to the required directory (I am not certain about this step since the README is vague, I later tried changing PragmataPro to Source Code Pro to no avail).
  • Since the Powerline stuff is still messed up, I also install PowerlineSymbols.otf font and rebuild the font cache using fc-cache as above.

@varunagrawal We are on it! Have a look at #382
There are already some commits on next branch regarding this issue. Try that one! ;)

Awesome! I'll try to contribute if I'm doing something which isn't already there.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yoyoys picture yoyoys  ยท  3Comments

DanielChabrowski picture DanielChabrowski  ยท  3Comments

gipert picture gipert  ยท  5Comments

dritter picture dritter  ยท  5Comments

controversial picture controversial  ยท  4Comments