{"action":"created","issue":{"url":"https://api.github.com/repos/gabrielelana/awesome-terminal-fonts/issues/20","labels_url":"https://api.github.com/repos/gabrielelana/awesome-terminal-fonts/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/gabrielelana/awesome-terminal-fonts/issues/20/comments","events_url":"https://api.github.com/repos/gabrielelana/awesome-terminal-fonts/issues/20/events","html_url":"https://github.com/gabrielelana/awesome-terminal-fonts/issues/20","id":115461269,"number":20,"title":"Fallback strategy not working","user":{"login":"algui91","id":394797,"avatar_url":"https://avatars.githubusercontent.com/u/394797?v=3","gravatar_id":"","url":"https://api.github.com/users/algui91","html_url":"https://github.com/algui91","followers_url":"https://api.github.com/users/algui91/followers","following_url":"https://api.github.com/users/algui91/following{/other_user}","gists_url":"https://api.github.com/users/algui91/gists{/gist_id}","starred_url":"https://api.github.com/users/algui91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/algui91/subscriptions","organizations_url":"https://api.github.com/users/algui91/orgs","repos_url":"https://api.github.com/users/algui91/repos","events_url":"https://api.github.com/users/algui91/events{/privacy}","received_events_url":"https://api.github.com/users/algui91/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-11-06T08:45:54Z","updated_at":"2016-01-15T06:44:12Z","closed_at":null,"body":"Hi, first of all, thank you for the great work. \r\n\r\nI am trying to install the fonts via the fallback strategy, but seems not to work and I gave up and install via patch. But I would like to install the first method. Here is what I am doing:\r\n\r\nI've followed the steps in the README, but does not work. So I tried to install the fonts in `/usr/share/fonts/truetype`, and put the `10-symbols.conf` in `/usr/share/fontconfig/conf.d/`.\r\n\r\nLater I run `fc-cache -fv /usr/share/fonts`, as root, but nothing seems to work. \r\n\r\nMy `10-symbols` is:\r\n\r\n```xml\r\n<?xml version=\"1.0\"?>\r\n<!DOCTYPE fontconfig SYSTEM \"fonts.dtd\">\r\n\r\n<!--\r\nWhen a glyph is missing in the current font freetype2 will look into\r\nother installed fonts to see if it's going to find it, but which fonts?\r\nand in which order?\r\n\r\nThe configuration below aim to declare an ordered list of fonts\r\nto be looked into when a glyph is not found in a specic font\r\n\r\n<alias>\r\n  <family>FONT_WITH_A_POSSIBLY_MISSING_GLYPH</family>\r\n  <prefer>\r\n    <family>FIRST_FONT_TO_LOOK_INTO</family>\r\n    <family>SECOND_FONT_TO_LOOK_INTO</family>\r\n    <family>...</family>\r\n  </prefer>\r\n</alias>\r\n-->\r\n\r\n<fontconfig>\r\n  <alias>\r\n    <family>Ubuntu</family>\r\n    <prefer>\r\n      <family>FontAwesome</family>\r\n      <family>Pomodoro</family>\r\n      <family>Octicons</family>\r\n    </prefer>\r\n  </alias>\r\n</fontconfig>\r\n```\r\n\r\nI've also tried with `Ubuntu Mono` and `UbuntuMono`. \r\n\r\nI am using Linux Mint Debian Edition.\r\n\r\nAny ideas?\r\n\r\nBest regards\r\n"},"comment":{"url":"https://api.github.com/repos/gabrielelana/awesome-terminal-fonts/issues/comments/171884206","html_url":"https://github.com/gabrielelana/awesome-terminal-fonts/issues/20#issuecomment-171884206","issue_url":"https://api.github.com/repos/gabrielelana/awesome-terminal-fonts/issues/20","id":171884206,"user":{"login":"gabrielelana","id":50211,"avatar_url":"https://avatars.githubusercontent.com/u/50211?v=3","gravatar_id":"","url":"https://api.github.com/users/gabrielelana","html_url":"https://github.com/gabrielelana","followers_url":"https://api.github.com/users/gabrielelana/followers","following_url":"https://api.github.com/users/gabrielelana/following{/other_user}","gists_url":"https://api.github.com/users/gabrielelana/gists{/gist_id}","starred_url":"https://api.github.com/users/gabrielelana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gabrielelana/subscriptions","organizations_url":"https://api.github.com/users/gabrielelana/orgs","repos_url":"https://api.github.com/users/gabrielelana/repos","events_url":"https://api.github.com/users/gabrielelana/events{/privacy}","received_events_url":"https://api.github.com/users/gabrielelana/received_events","type":"User","site_admin":false},"created_at":"2016-01-15T06:44:12Z","updated_at":"2016-01-15T06:44:12Z","body":"Then it works! :tada: \r\n\r\nLet me explain: all the symbols in the icon fonts don't have a standard codepoint, in the unicode there's no such thing as \"the twitter icon\" what we did here is to put all these special glyphs in the [private area](https://en.wikipedia.org/wiki/Private_Use_Areas)\r\n\r\nSo, how could I know where is the twitter icon? How can I find it's codepoint? We created a map for each font that binds a shell variable (ex `CODEPOINT_OF_AWESOME_TWITTER`) that represents a glyph to the corresponding codepoint (ex `f099`)\r\n\r\nWhat you need to do is to source all the `*.sh` files (ex. `source fontawesome-regular.sh`) in your `.bashrc` (or `.zshrc` or whatever) and then use the declared variables when you want to print a glyph (ex. `\\u$CODEPOINT_OF_AWESOME_TWITTER`)\r\n\r\nIn your screenshot glyphs don't display properly in your prompt not because the glyphs/fonts are not available but because in the prompt definition you are using the wrong codepoints"}}