简体   繁体   English

CJK字符的CSS Unicode范围

[英]CSS unicode-range for CJK characters

My preferred font is Inconsolata, which messes up GitHub's octicon web font. 我首选的字体是Inconsolata,它弄乱了GitHub的octicon网络字体。 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. 昨天,我更新了Google Chrome浏览器的用户样式表,以在GitHub上正确显示octicon字体,因此今天,我试图使CJK字符正确显示。

My CSS: 我的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. 我捕获了完整的CJK范围,但是字符仍然无法正确显示。 Am I using the wrong local font? 我使用了错误的本地字体吗? (I'm running Debian 6.) (我正在运行Debian6。)

UPDATE: the fix was simply installing the ttf-takao package. 更新:修复只是安装ttf-takao软件包。

The working code, with instructions: 工作代码,并附有说明:

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

It was a Debian issue. 这是一个Debian问题。 I needed to install the ttf-takao package, which corrected everything. 我需要安装ttf-takao软件包,该软件包可以纠正所有问题。

I feel dumb. 我觉得很蠢 :) :)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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