0

My preferred font is Inconsolata, which messes up GitHub's octicon web font. Yesterday I updated my user stylesheet for Google Chrome to properly display the octicon font on GitHub, so today I'm trying to get the CJK characters to display correctly.

My CSS:

@font-face {
  font-family: 'cjk';
  src: local('monospace');
  unicode-range: U+3000-30FF, U+FF00-FFEF, U+4E00-9FAF;
}

* { font-family: cjk, inconsolata !important; }
*[class*="octicon"]  { font-family: octicons !important; }

I capture the complete CJK range, but the characters still don't show correctly. Am I using the wrong local font? (I'm running Debian 6.)

UPDATE: the fix was simply installing the ttf-takao package.

The working code, with instructions:

https://github.com/cureadvocate/chrome-user-stylesheet

James A Mohler
  • 11,060
  • 15
  • 46
  • 72
  • What does that “messes up” mean? Do you actually have `inconslata` in the CSS code? What are you trying to accomplish, and exactly how does it fail? Why are you using the generic name `monospace`, if this is about a user style sheet? – Jukka K. Korpela Oct 28 '13 at 17:10
  • Messes up meaning the icons don't show, but the `*[class*=]` rule fixes that. The Inconsolata font lacks a lot of the unicode characters, so visiting a Japanese site (e.g.,gizmodo.jp) shows a lot of empty boxes instead of the kana and kanji. A non-customized Chrome displays the kana and kanji fine with `font-family: monospace`, so I tried that in `src`. – Steven Edwards Oct 28 '13 at 18:49
  • @StevenEdwards What Jukka tried to say was you have Inconsolata misspelled in your CSS. Also, you misspelled Octicons in your prose. – Mr Lister Oct 28 '13 at 20:19
  • @MrLister thank you for pointing out the typos. :) That said, the css still doesn't show CJK characters like Hiragana and Katakana. – Steven Edwards Oct 28 '13 at 20:54

1 Answers1

0

It was a Debian issue. I needed to install the ttf-takao package, which corrected everything.

I feel dumb. :)