Skip to content
This repository has been archived by the owner on Apr 24, 2020. It is now read-only.

Need further instructions how to fix ? symbols when using Awesome Terminal Fonts #1381

Open
kevdogg opened this issue Nov 15, 2019 · 4 comments

Comments

@kevdogg
Copy link

kevdogg commented Nov 15, 2019

Hi - not really a bug report, but just asking for help since I couldn't find a forums page or reddit page to ask question

I'm using zsh 5.7.1 both on MacOS (iterm2) and on arch linux with Oh-my-ZSH
I'm trying to customize the fonts and used your instructions about installing awesome terminal fonts and the nerd fonts

For my arch installation I grabbed these fonts out of the AUR

In all instances I'm getting ? symbols displayed on the command line.

I noticed you had this within your troubleshooting page:

Issues with Awesome-Terminal-Fonts having ? in prompts.
One note on Awesome-Terminal-Fonts: they do not come with the powerline icons (the segment-separator triangles) included. If you do not use a base font that has them already included, you have to include them yourself. One option for doing this is to copy the original powerline font into ~/.fonts (and to configure it in your fontconfig-configuration, of course). You will need to configure them as a fallback font as you did for the rest of the fonts in these detailed instructions.

I've tried the following font config modes:
POWERLEVEL9K_MODE='awesome-fontconfig'↵
POWERLEVEL9K_MODE='nerdfont-complete'↵

I tried running your font-issues.sh script -- Not working for some reason.
Here is my $ get_icon_names: (for some reason this isn't displaying correctly. The squares you see below are actually squares with a question mark in my system.
`
↱   kevdog@arch-TM   ~   10.0.1.107   512  16:51:19 
↳ get_icon_names
POWERLEVEL9K_ANDROID_ICON: 
POWERLEVEL9K_APPLE_ICON: 
POWERLEVEL9K_AWS_EB_ICON: 
POWERLEVEL9K_AWS_ICON: 
POWERLEVEL9K_BACKGROUND_JOBS_ICON: 
POWERLEVEL9K_BATTERY_ICON: 
POWERLEVEL9K_CARRIAGE_RETURN_ICON: ↵
POWERLEVEL9K_DATE_ICON: 
POWERLEVEL9K_DISK_ICON: 
POWERLEVEL9K_DROPBOX_ICON: 
POWERLEVEL9K_ETC_ICON: 
POWERLEVEL9K_EXECUTION_TIME_ICON: 
POWERLEVEL9K_FAIL_ICON: 
POWERLEVEL9K_FOLDER_ICON: 
POWERLEVEL9K_FREEBSD_ICON: 
POWERLEVEL9K_GO_ICON: 
POWERLEVEL9K_HOME_ICON: 
POWERLEVEL9K_HOME_SUB_ICON: 
POWERLEVEL9K_JAVA_ICON: ☕
POWERLEVEL9K_KUBERNETES_ICON: ⎈
POWERLEVEL9K_LARAVEL_ICON: 
POWERLEVEL9K_LEFT_SEGMENT_END_SEPARATOR:
POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR: 
POWERLEVEL9K_LEFT_SUBSEGMENT_SEPARATOR: 
POWERLEVEL9K_LINUX_ALPINE_ICON: 
POWERLEVEL9K_LINUX_AOSC_ICON: 
POWERLEVEL9K_LINUX_ARCH_ICON: 
POWERLEVEL9K_LINUX_CENTOS_ICON: 
POWERLEVEL9K_LINUX_COREOS_ICON: 
POWERLEVEL9K_LINUX_DEBIAN_ICON: 
POWERLEVEL9K_LINUX_DEVUAN_ICON: 
POWERLEVEL9K_LINUX_ELEMENTARY_ICON: 
POWERLEVEL9K_LINUX_FEDORA_ICON: 
POWERLEVEL9K_LINUX_GENTOO_ICON: 
POWERLEVEL9K_LINUX_ICON: 
POWERLEVEL9K_LINUX_MAGEIA_ICON: 
POWERLEVEL9K_LINUX_MANJARO_ICON: 
POWERLEVEL9K_LINUX_MINT_ICON: 
POWERLEVEL9K_LINUX_NIXOS_ICON: 
POWERLEVEL9K_LINUX_OPENSUSE_ICON: 
POWERLEVEL9K_LINUX_SABAYON_ICON: 
POWERLEVEL9K_LINUX_SLACKWARE_ICON: 
POWERLEVEL9K_LINUX_UBUNTU_ICON: 
POWERLEVEL9K_LOAD_ICON: 
POWERLEVEL9K_LOCK_ICON: 
POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX: ↱
POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX: ↳
POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_PREFIX: ├─
POWERLEVEL9K_NETWORK_ICON: 
POWERLEVEL9K_NODE_ICON: 
POWERLEVEL9K_OK_ICON: 
POWERLEVEL9K_PUBLIC_IP_ICON: 
POWERLEVEL9K_PYTHON_ICON: 
POWERLEVEL9K_RAM_ICON: 
POWERLEVEL9K_RIGHT_SEGMENT_SEPARATOR: 
POWERLEVEL9K_RIGHT_SUBSEGMENT_SEPARATOR: 
POWERLEVEL9K_ROOT_ICON: 
POWERLEVEL9K_RUBY_ICON: 
POWERLEVEL9K_RUST_ICON: 
POWERLEVEL9K_SERVER_ICON: 
POWERLEVEL9K_SSH_ICON: 
POWERLEVEL9K_SUDO_ICON: 
POWERLEVEL9K_SUNOS_ICON: 
POWERLEVEL9K_SWAP_ICON: 
POWERLEVEL9K_SWIFT_ICON: 
POWERLEVEL9K_SYMFONY_ICON: 
POWERLEVEL9K_TEST_ICON: 
POWERLEVEL9K_TIME_ICON: 
POWERLEVEL9K_TODO_ICON: 
POWERLEVEL9K_VCS_BOOKMARK_ICON: 
POWERLEVEL9K_VCS_BRANCH_ICON: 
POWERLEVEL9K_VCS_COMMIT_ICON: 
POWERLEVEL9K_VCS_GIT_BITBUCKET_ICON: 
POWERLEVEL9K_VCS_GIT_GITHUB_ICON: 
POWERLEVEL9K_VCS_GIT_GITLAB_ICON: 
POWERLEVEL9K_VCS_GIT_ICON: 
POWERLEVEL9K_VCS_HG_ICON: 
POWERLEVEL9K_VCS_INCOMING_CHANGES_ICON: 
POWERLEVEL9K_VCS_OUTGOING_CHANGES_ICON: 
POWERLEVEL9K_VCS_REMOTE_BRANCH_ICON: 
POWERLEVEL9K_VCS_STAGED_ICON: 
POWERLEVEL9K_VCS_STASH_ICON: 
POWERLEVEL9K_VCS_SVN_ICON: 
POWERLEVEL9K_VCS_TAG_ICON: 
POWERLEVEL9K_VCS_UNSTAGED_ICON: 
POWERLEVEL9K_VCS_UNTRACKED_ICON: 
POWERLEVEL9K_VPN_ICON: (vpn)
POWERLEVEL9K_WINDOWS_ICON: 

`

@Jack-Barry
Copy link

@kevdogg I'm using Powerlevel10K but I think I can help some here.

Which font are you using? I had some trouble with this but got it working with nerd-fonts. Going that route, using iTerm2 and VS Code, I don't even need to have the POWERLEVEL9K_MODE line in my .zshrc 🤷🏻‍♂️

The tricky part is that if you already have something installed as a normal font, you need to be absolutely sure you are specifying the Nerd Font variant for the config for whichever terminal app you are using. Otherwise the terminal will be trying to use the regular version of the font, not the one patched with glyphs.

One other thing that tripped me up: I had configured Powerlevel10K with the glyphs broken. Then I was editing .zshrc and running source ~/.zshrc trying to get glyphs to show up but nothing was changing even though I had installed the patched font. Reconfiguring Powerlevel10K using p10k configure after installing the patched font worked for me though. Basically you'll know it's working if those first few questions render the glyphs properly.

Hope this helps!

P.S. If Nerd Fonts don't have the font you want, you can also patch a font of your choice with all the glyphs. In my case I chose Victor Mono which they already have patched.

@kevdogg
Copy link
Author

kevdogg commented Nov 22, 2019 via email

@romkatv
Copy link

romkatv commented Nov 22, 2019

Hey it would be great if you could write up exactly what you did...like
cookbook style to get your configuration to work, I'd be greatful.

@Jack-Barry Be careful. Powerlevel9k code of conduct prohibits recommending/advising/suggesting to users switching to Powerlevel10k even if it would fix their problems.

I'm interested in using nerdfonts

@kevdogg The easiest way to get a working Nerd Font is to follow these instructions. I've created this font by taking Apple's default terminal font (you can imagine it's a high quality font if Apple is enabling it by default for all its users), adding all glyphs from to it with a modified script from Nerd Fonts and then editing a few things manually in FontForge. This font looks great, has Powerline, Font Awesome and Nerd Fonts glyphs, and works with all terminals and all themes, including Powerlevel9k.

If you want to use a different font from Nerd Fonts, please refer to the documentation on https://github.com/ryanoasis/nerd-fonts.

@Jack-Barry
Copy link

@romkatv Was not aware of the code of conduct thing, but thanks for the heads up. Even with that in mind I was just making it clear that what I did might not be exactly the same given I'm using a different software, I am not recommending switching over to the dark side. 😉

@kevdogg The installation instructions for Nerd Fonts are actually pretty good, and they do cover arch Linux/AUR. I used the 3rd option on my machines (MacOS at home and Windows 10 with Subsystem Linux Ubuntu for work) and it panned out well, just takes a long time to clone the nerd-fonts repo. The 7th option might also work for you since you mentioned arch Linux.

Note that these steps are all basically just following the instructions from Nerd Fonts, so future readers who land here, refer to their docs first as they'll be the most up-to-date.

Here's what I did:

  1. Clone the nerd-fonts repo
  2. cd into the nerd-fonts repo
  3. Run ./install.sh <FontName> for whichever font you want (using the folder name it's in under nerd-fonts/patched-fonts
  4. The patched font is now installed on your system

If you're trying to patch your own font it's a little more work, but the concept is similar.

  1. Download the font you'd like to use
  2. Install fontforge
  3. Clone the nerd-fonts repo
  4. cd into the nerd-fonts repo
  5. Run ./font-patcher PATH_TO_FONT using the path to the font you'd like to use. (There are some modifier flags available in the Nerd Fonts docs, looks like -c will ensure that all glyphs are patched in)
  6. The patched font files are now available in the nerd-fonts repo, install them on your machine as you would any other font

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants