简体   繁体   中英

CSS unicode-range for CJK characters

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

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

I feel dumb. :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM