大家一起搞比利假名

如果你沒在用 OS X 系統的話,這篇可以考慮不用看了。

如果你不喜歡用一個 CSS 管理全部網站的樣式的話,你可能會想看這篇:

  • 知乎主站冬青黑體+假名比例化補丁

首先:

  • 如果你是 Safari 用戶,請升級到 OS X 10.11.4 Beta 5,或者直接下載 Nightly Build 版本的 Webkit 瀏覽器(請自己 Google 爬文尋找下載地址)…舊版 Safari 是不支持任何與比利假名(Proportional Kana)有關的 OpenType 特性的。

  • 如果你是 Chrome / Yandex / Opera 用戶,請安裝 Stylish。但請先確保當時 Stylish 是否能在你當前版本的瀏覽器當中正常使用

其次,將下文所述 CSS 內容另存為單獨的 CSS 檔案:

* {-webkit-font-smoothing: subpixel-antialiased !important;}n nbody {n -moz-font-feature-settings: "palt" !important;n -webkit-font-feature-settings: "palt" !important;n font-feature-settings: "palt" !important;n}nn /* DEFINE KANA FONT FOR COMMON WILDCARD FONTS */n n@font-face {unicode-range: U+3040-30FF; /* Hiragana, Katakana */nfont-family: serif; src: local(Kozuka Mincho Pr6N), local(Hiragino Mincho ProN)}n n@font-face {unicode-range: U+3040-30FF; /* Hiragana, Katakana */nfont-family: sans-serif; src: local(Source Han Sans), local(Hiragino Kaku Gothic ProN), local(Kozuka Gothic Pr6N)}n n /* DEFINE KANA FONT FOR INDIVIDUAL REFERENCES */n n@font-face {unicode-range: U+3040-30FF; /* Hiragana, Katakana */nfont-family: Kanaserif; src: local(Kozuka Mincho Pr6N), local(Hiragino Mincho ProN)}n n@font-face {unicode-range: U+3040-30FF; /* Hiragana, Katakana */nfont-family: Kanasans; src: local(Source Han Sans), local(Hiragino Kaku Gothic ProN), local(Kozuka Gothic Pr6N)}n n /* DEFINE AQUA KANA FONT FOR LUCIDA GRANDE */n n@font-face {unicode-range: U+3040-30FF; /* Hiragana, Katakana */nfont-family: Lucida Grande; src: local(Aqua Kana), local(Hiragino Kaku Gothic ProN)}n n /* Let Hiragino Sans GB Inherits Kana Features from Hiragino Kaku Gothic */n n@font-face {unicode-range: U+3040-30FF; /* Hiragana, Katakana */nfont-family: "Hiragino Sans GB"; src: local(Hiragino Kaku Gothic ProN)}n n /* Let Hiragino Kaku Gothic Inherits uncovered kanji from Hiragino Sans GB since they are the same typeface in different regional standards. */n n@font-face {n font-family: Hiragino Kaku Gothic ProN;n src: local(Hiragino Kaku Gothic ProN), local(Hiragino Sans GB);n}nn /* Reclaim CJK Font Fallbacks */nn:lang(zh-cn) { font-family: Helvetica Neue, Source Han Sans SC, Kanasans, Arial, PingFang SC, Hiragino Sans GB, sans-serif;}n:lang(zh-Hans) { font-family: Helvetica Neue, Source Han Sans SC, Kanasans, Arial, PingFang SC, Hiragino Sans GB, sans-serif;}n:lang(zh-tw) { font-family: Helvetica Neue, Source Han Sans TC, Kanasans, Arial, PingFang TC, PingFang SC, Hiragino Sans GB, sans-serif;}n:lang(zh-HK) { font-family: Helvetica Neue, Source Han Sans TC, Kanasans, Arial, PingFang HK, PingFang SC, Hiragino Sans GB, sans-serif;}n:lang(zh-Hant) { font-family: Helvetica Neue, Source Han Sans TC, Kanasans, Arial, PingFang TC, PingFang SC, Hiragino Sans GB, sans-serif;}n:lang(zh-Hant-HK) { font-family: Helvetica Neue, Source Han Sans TC, Kanasans, Arial, PingFang HK, PingFang SC, Hiragino Sans GB, sans-serif;}n:lang(zh-Hant-TW) { font-family: Helvetica Neue, Source Han Sans TC, Kanasans, Arial, PingFang TC, PingFang SC, Hiragino Sans GB, sans-serif;}n:lang(ja) { font-family: Helvetica Neue, Source Han Sans, Kanasans, Arial, Hiragino Kaku Gothic ProN, sans-serif;}n:lang(kr) { font-family: Helvetica Neue, Source Han Sans K, Kanasans, Arial, Apple SD Gothic Neo, sans-serif;}nn@font-face {n font-family: Helvetica Neue;n src: local(SF UI Display), local(Helvetica Neue);n}nn@font-face {n font-family: Helvetica;n src: local(SF UI Display), local(Helvetica Neue), local(Helvetica);n}nnn@font-face {n font-family: STHeiti-SC;n src: local(Source Han Sans SC), local(PingFang SC), local(Hiragino Sans GB);n}nn@font-face {n font-family: STHeiti-TC;n src: local(Source Han Sans TC), local(PingFang TC), local(PingFang SC), local(Hiragino Sans GB);n}nn@font-face {n font-family: Heiti SC;n src: local(Source Han Sans SC), local(PingFang SC), local(Hiragino Sans GB);n}nn@font-face {n font-family: Heiti TC;n src: local(Source Han Sans TC), local(PingFang TC), local(PingFang SC), local(Hiragino Sans GB);n}nn@font-face {unicode-range: U+3040-30FF; /* Hiragana, Katakana */nfont-family: Songti SC; src: local(Kozuka Mincho Pr6N), local(Hiragino Mincho ProN)}nn@font-face {unicode-range: U+3040-30FF; /* Hiragana, Katakana */nfont-family: Songti TC; src: local(Kozuka Mincho Pr6N), local(Hiragino Mincho ProN)}nn@font-face {unicode-range: U+3040-30FF; /* Hiragana, Katakana */nfont-family: AR PL UMing TW; src: local(Kozuka Mincho Pr6N), local(Hiragino Mincho ProN)}nn@font-face {unicode-range: U+3040-30FF; /* Hiragana, Katakana */nfont-family: MingLiU; src: local(Kozuka Mincho Pr6N), local(Hiragino Mincho ProN)}nn@font-face {unicode-range: U+3040-30FF; /* Hiragana, Katakana */nfont-family: PMingLiU; src: local(Kozuka Mincho Pr6N), local(Hiragino Mincho ProN)}nn@font-face {n font-family: PingFang SC;n src: local(PingFang SC), local(Source Han Sans SC), local(Hiragino Sans GB);n}nn@font-face {n font-family: PingFang TC;n src: local(PingFang TC), local(PingFang SC), local(Source Han Sans TC), local(Hiragino Sans GB);n}nn@font-face {n font-family: LiHei Pro;n src: local(PingFang TC), local(PingFang SC), local(Source Han Sans TC), local(Hiragino Sans GB);n}nn@font-face {n font-family: Microsoft JhengHei;n src: local(Microsoft JhengHei), local(PingFang TC), local(PingFang SC), local(Source Han Sans TC), local(Hiragino Sans GB);n}nn@font-face {n font-family: Microsoft YaHei;n src: local(Microsoft YaHei), local(PingFang SC), local(Source Han Sans SC), local(Hiragino Sans GB);n}nnn /* End of File. */n

然後,Safari 用戶請藉由 Safari 偏好設定來載入該 CSS 檔案;Chrome 用戶請直接使用 Stylish。完工。

我寫的這個 CSS 腳本估計仍有疏漏,但至少可以罩住大多數中日文顯示情形了。

# EOF.


推薦閱讀:

斃掉 Mac 電腦頑固的開機和聲
最近關於 BugReport 的一些龜毛事
如果 File Radar 有效率可言的話

TAG:【辞客堂】数位杂谈版 | 知乎主站冬青黑体+假名比例化补丁 |