-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Broken fonts in latest iTerm2 version #44
Comments
I have the same mac and iterm build as @damianball and am seeing this issue. |
They updated the code points recently: powerline/powerline@53fbfe1 The fonts need to be re-patched. Who can do this? |
I've repatched the fonts, only to find exactly same problem - question marks instead of symbols. Oddly enough, same font used with MacVim works fine. |
I think it's a problem with iTerm2; the right character seems to be outputed, and it displays well in MacVim with same font. 57520, Hex e0b0, Octal 160260 |
I also found that this wasn't working, but I went to Preferences and changed Non-ASCII font to be the same as the Regular font (both patched fonts in other words) and that seemed to fix it for me. |
Yeah, it works fine as long as both fonts are set and the version of iTerm2 is at least |
Changing the font on both ASCII and non-ASCII worked for me as well. |
Thanks, it works great changing the patched font for non-ASCII. |
I'm getting an |
I also get an o now.. Did you solve it? EDIT: Ok, i solved it now. I had customized my zsh agnoster theme and didnt update it from the git repo.. |
Hi folks. Is this issue outstanding, or did you determine it was the code point change and the current version of the fonts fixes it? |
Resolved here - although I forgot what I did to resolve it 😨 |
Hey all. I'm with apjanke. I am having that issue still as well. Any answers? |
Actually, it's working fine for me now: we (oh-my-zsh workers) determined that it was the "agnoster" theme in I think this issue can be closed. @iWrightCode: What specific issues are you having now? If I'm correct in my understanding of this, they can probably be cleared up by a) downloading the latest version of these powerline fonts, b) making sure your theme and terminal definitions are up to date with the current code Point values, and c) setting your "non-ASCII" font in iTerm to one of the Powerline fonts. |
Add a iTerm fix solution from powerline/fonts#44
Add a iTerm fix solution from powerline/fonts#44
Overview > For this step, it's best if you have iTerm2 on OS X or mobaXterm on > Windows. If you're using Linux, I'll leave it up to you to choose a > sensible terminal emulator. > > This step is also really long. Here's a TL;DR: 1. Change your terminal's preferences to use Solarized 2. Install a patched font 3. Make the appropriate changes to your vimrc 4. Uncomment the line with `g:airline_powerline_fonts` In addition, depending on your machine, you may want to see the Troubleshooting section at the end. ------------------------------------------------------------------------ Solarized To make Vim look good, you can install extra color schemes. For the purposes of this demo, I've chosen two: Solarized (the most widely used color scheme) and Molokai (a port of the Textmate/Sublime color scheme). Feel free to pick one by changing the colorscheme solarized line to something else. Solarized is a special kind of color scheme. For it to work properly, you need to make changes in two places: - Your ~/.vimrc - Your terminal emulator's preferences (like iTerm2, MobaXterm, etc.) For macOS, I recommend using iTerm2, and for Windows, I recommend MobaXterm. If you're using one of these terminals, you already have Solarized installed; you just need to select it from your preferences. Otherwise, install a Solarized theme for your terminal emulator: http://ethanschoonover.com/solarized If you can't figure out how to do this for your terminal, just uncomment the line that says let g:solarized_termcolors=256 Note that Solarized is one of many great colorschemes; feel free to explore and find one you love! ------------------------------------------------------------------------ Patched Fonts We're also installing a plugin called vim-airline that makes Vim look pretty awesome. It adds tons of information to your Vim and adds style too. It works best if you have what's called a "patched font". There are a number of patched fonts that you can install, but the one I recommend is https://github.com/abertsch/Menlo-for-Powerline Once you've downloaded all the .ttf files, change your default font in your terminal emulator's preferences. If you do manage to install a patched font, you can tell vim-airline to use them by uncommenting the line that reads let g:airline_powerline_fonts = 1 ------------------------------------------------------------------------ Troubleshooting If you make all the changes here and nothing seems to be working, check that you have this line in your ~/.bashrc: export TERM="xterm-256color" > Update (2016-11-12): > > Betewen when I first gave this talk and now Windows announced the > Windows Subsystem for Linux. I've heard that it is actually very good. > Unfortunately, I've never used it and so I can't attest to how well it > works or what instructions prescribed here need to be adjusted. Setting up Solarized and vim-airline is basically impossible on PuTTY. Instead, you should go download mobaXterm, which is an SSH client that lets you a) comes pre-installed with Solarized colors and b) lets you choose a patched font: http://mobaxterm.mobatek.net/ For detailed installation instructions and a sneak peak at some of it's more powerful features, see here http://blog.jez.io/2014/09/28/setting-up-mobaxterm-for-ssh-on-windows/ And while once upon a time I managed to get a patched font working with MobaXterm, I haven't managed to get it to work since. Your mileage may vary.
hi @bperucchi Im experiencing the same issue. Im also looking for an answer, lets share some notes. So far I already done adding powerline fonts but its still not working. |
Hi @bperucchi @fusionx1 I had the same issue, with the terminal exactly the same as @bperucchi. I solved it with the following configuration: Sorry for my English. |
@fusionx1 @romandoma @kamontat Thanks for your reply but I'm still get the same problem in the icons |
@bperucchi, I know its a long shot, but have you restarted your Iterm2? If you installed everything correctly, that could be the problem. Before restarting Iterm2 just open a second tab and see if the icons are showing. |
@tmikulin already did that and still got the icons problem. :/ |
Same story on my side. Having issue in iTerm2 alone and they are intermittent. Sometimes rebooting iTerm2 fixes the issue, sometimes rebooting my mac fixes it and sometimes both fail to do anything. I have triple checked all setting as well as the patched fonts and nothing suspicious there: everything looks as it's supposed to be. Even when the iTerm2 fonts are not working it still works in Vim inside that same window. EDIT:
|
I solved my problem! I I just open mac "Font Book" and repair the fonts.
|
Thanks for that point @brenoperucchi. I'll try it out the next time my fonts break. Currently after 1 or 2 more reboots they seem to have come back to their senses automatically. |
TLDR; I've been having this problem intermittently for the past few months. Some observations:
|
So I tried the "Fix fonts" proposed by @brenoperucchi but it did not work for me. I do see that I am in exactly the same case as what you describe @b-gran w.r.t vim and bash in iTerm2. And the Will need to take a closer look into Powerline's source code to see what is going wrong. Potentially a cache that gets corrupted. |
@Helcaraxan The only thing which may look like a font issue with daemon is daemon launched in non-UTF-8 environment and thus assuming that Unicode is not supported. This has nothing to do with fonts actually, just it should choose |
@ZyX-I but would that explain why the issue starts appearing randomly while running even if it works correctly initially? What you describe looks like something that should be binary on restart: either it always works or it never does. NOTE: My iTerm2 is set to UTF-8 for its terminal emulation. |
@Helcaraxan No idea actually. It should work just like this: always or never. It may replace powerline triangles with question marks if you force theme without fixing the encoding (there are ways to do this via environment variables), but it will not recheck locale. |
@Helcaraxan But daemon does not do anything with fonts, it receives text data (current working directory, arguments to the client and the whole client environment), processes it to generate a prompt and pipes generated prompt back to the client. Your screenshot is exactly what daemon should pipe back should it be non-unicode. About note: there is |
Based on some other terminal’s settings all setting |
So the only difference here is that in my case (OS X) I have the following: -> locale
LANG="en_GB.UTF-8"
LC_COLLATE="en_GB.UTF-8"
LC_CTYPE="en_GB.UTF-8"
LC_MESSAGES="en_GB.UTF-8"
LC_MONETARY="en_GB.UTF-8"
LC_NUMERIC="en_GB.UTF-8"
LC_TIME="en_GB.UTF-8"
LC_ALL= |
@Helcaraxan You need to check this at the time daemon is being run. E.g. replace |
I understand yeah and will provide the output of that action when possible. However I again do not see why this would cause the issue that this topic describes. Either the Don't get me wrong: I am not trying to contradict you per se, just that I am really wondering what the underlying issue is as, IMHO, your suggestions would not account for the exact behaviour that is being observed by @b-gran, me and others on this topic, i.e that the prompt displays correctly initially and then gets corrupted after some (potentially long, multiple day) period. |
@Helcaraxan I would also add |
Ok. Will do. It might take a while before I will be able to post the result as I'll need to wait until the display gets corrupted again but I won't miss on following up. In any case thank you very much for the attention that you are giving to the issue! |
@ZyX-I the issue just reappeared which gave me the requested log output. Unfortunately it does not look like it gives up any extra information. It happened after I opened up a new tab in iTerm2 (screenshot of the resulting aspect below). Running |
@Helcaraxan You have
right above “the issue appeared with the launch below”, in the same minute, and a bunch of the same runs (with C locale as well) throughtout the log. Do not forget that |
All these runs are implicit. I have not triggered any of them apart from the last one with The script that dumps these lines is: #!/usr/bin/env bash
LOG_FILE="/Users/duco/.powerline-start-log.txt"
echo "Starting powerline-daemon with args: " "$@" >> "${LOG_FILE}"
pstree '$$' >> "${LOG_FILE}"
date >> "${LOG_FILE}"
echo "Locale" >> "${LOG_FILE}"
locale >> "${LOG_FILE}"
echo "End of log" >> "${LOG_FILE}"
/usr/local/bin/powerline-daemon.real "$@" |
@Helcaraxan I have not said you did. I just meant that “the issue appeared with the launch below” is most likely pointing to the wrong launch because it is previous one which actually started the daemon, and it did start it with the wrong locale. By the way, your script has an error: |
@Helcaraxan In any case, normally you must have exactly zero runs with C locale. |
It appears that current discussion has absolutely nothing to do with the original post. |
Since with C locale it is not a powerline issue better move to the mailing list. |
I've tried using Inconsolata and SourceCodePro. I've also opened an issue in iTerm2 (https://code.google.com/p/iterm2/issues/detail?id=2518&thanks=2518&ts=1372092283).
What steps will reproduce the problem?
2a. Notice that powerline does not look visually pleasing (it has missing character marks all over).
3b. Notice that the new font makes the powerline in vim look visually pleasing (as in vim-powerline.png)
What is the expected output? What do you see instead?
I expect that iTerm2 will use the patched font while running powerline to display a visual interface as in the attached screenshot (vim-powerline.png).
Instead, I am seeing unknown character marks as in the attached screenshot (Screen Shot ... .png)
What version of the product are you using? On what operating system?
iTerm2 1.0.0.20130622
Mac OS X 10.8.4 Build 12E55
Please provide any additional information below.
The text was updated successfully, but these errors were encountered: