gabrielelana / awesome-terminal-fonts

Tools and instructions on how to have awesome symbols in a terminal with a monospace font
MIT License
2.45k stars 230 forks source link

The font still not working for OSX #11

Closed johnWIll17 closed 8 years ago

johnWIll17 commented 9 years ago

I followed the instruction but nothing happened. I want to use an octicon git-branch. I also use the font PragmataPro as my default font in terminal as well as vim.

Here is my set up

  1. copy 3 fonts from ./build into .fonts directory
  2. run fc-cache -fv ~/.fonts
  3. copy file ./config/10-symbols.conf to ~/.config/fontconfig/conf.d

Because I use PragmataPro as my font so I leave the config file as it was. But after did all of these things, nothing happened. I still miss octicon git-branch.

Did I missed?

gabrielelana commented 9 years ago

@johnWIll17 Open a terminal anche execute echo "\uf20c" what do you see?

One problem could be that in your system freetype2 is not configured to look in the user's home directory for configuration files under ~/.config. One possibile solution would be to copy the configuration file in a global directory, probably under /etc to see if it works.

Let me know.

wladston commented 9 years ago

The title of this issue should change to convey that it doesn't work on Mac OS, but works on Linux.

I spent over 3 hours researching this, tried everything, even changing my DefaultFontFallbacks.plist file with Xcode. It seems Mac OS has its custom way to render fonts, and it looks like it ignores gliphs from private space in its failover mechanism.

DFieldFL commented 8 years ago

I am having a problem with the fallback fonts as well on Ubuntu 16.04. I have all the fonts located in ~/.fonts/. Below is my font config 10-symbols.conf.

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">

<fontconfig>
    <alias>
        <family>Source Code Pro</family>
        <prefer>
            <family>Pomodoro</family>
            <family>FontAwesome</family>
            <family>Octicons</family>
            <family>Icomoon</family>
            <family>PowerlineSymbols</family>
        </prefer>
    </alias>
</fontconfig>

I have tried the command you suggested echo "\uf20c" with this font config in either ~/.config/fontconfig/conf.d/ or /etc/fonts/conf.d/ and it returns \uf20c and not the pretty symbol. I also made sure the default terminal app in Ubuntu has Source Code Pro selected as the font. Any suggests?

gabrielelana commented 8 years ago

@DFieldFL try with echo -e "\uf20c"

If that doesn't work, can you tell me what terminal are you using? Try using gnome-terminal?

If you still have a problem please open another issue since this is more related with OSX

gabrielelana commented 8 years ago

Seems like OSX is not supporting the fallback strategy, you need to install a patched font, you can find some in here

DFieldFL commented 8 years ago

@gabrielelana The -e option displays the icon. as expected. Is there other step I missed to get this working correctly?

gabrielelana commented 8 years ago

@DFieldFL nope, AFAIK now you can use the icons in your prompt or wherever you want in your terminal

DFieldFL commented 8 years ago

Thankyou for the help. Looks like I need to update Oh-My-Git to use the correct characters.