Skip to content

Instantly share code, notes, and snippets.

@ethantw
Created September 21, 2012 06:12
Show Gist options
  • Save ethantw/3759978 to your computer and use it in GitHub Desktop.
Save ethantw/3759978 to your computer and use it in GitHub Desktop.
Yijun's personal CJK-optimised browser-font-fallback stylesheets for Safari 6 on OS X.
/* 這個檔案適用慣於閱讀「繁體康熙字典舊字形」的用戶 */
/* ==================注意!==================
* 不可將sans-serif(或serif)字體宣告(@font-face)合併為一。
* Do not combine the sans-serif (or serif) @font-faces into one.
* =======================================*/
/* 無襯線字體 sans-serif */
@font-face {
font-family: sans-serif;
src: local('Hiragino Sans GB');
unicode-range: U+4E00-U+9FFF; /* general CJK */
}
@font-face {
font-family: sans-serif;
src: local('Hiragino Kaku Gothic ProN');
unicode-range: U+4E00-U+9FFF;
}
@font-face {
font-family: sans-serif;
src: local('Helvetica Neue');
}
/* 襯線字體 serif */
@font-face {
font-family: serif;
src: local('Songti SC');
unicode-range: U+4E00-U+9FFF;
}
@font-face {
font-family: serif;
src: local('Hiragino Mincho ProN');
unicode-range: U+4E00-U+9FFF;
}
@font-face {
font-family: serif;
src: local(Georgia);
}
/* 無襯線標點符號字體 sans-serif CJK-punctuation font */
@font-face {
font-family: 'Biaodian Sans';
src: local('Hiragino Kaku Gothic ProN');
unicode-range: U+3002, U+FF0E, U+FF0C, U+3001, U+FF1B, U+FF1A, U+FF1F, U+FF01,
U+2014, U+2026,
U+300A-300B, U+3008-3009, U+FF08-FF09, /* brackets */
U+300C-300F /* quotes */;
}
@font-face {
font-family: 'Biaodian Sans';
src: local('Hiragino Sans GB');
unicode-range: U+201C-201D, U+2018-2019, /* curve quotes */
U+00B7;
}
/* 用於修正*大多數*中文網頁的標點 */
html:lang(zh), html:lang(zh) body {
font-family: 'Biaodian Sans', sans-serif !important;
}
/* 這個檔案適用慣於閱讀「簡體規範手寫化印刷體」的用戶 */
/* ==================注意!==================
* 不可將sans-serif(或serif)字體宣告(@font-face)合併為一。
* Do not combine the sans-serif (or serif) @font-faces into one.
* =======================================*/
/* 無襯線字體 sans-serif */
@font-face {
font-family: sans-serif;
src: local('Hiragino Sans GB');
unicode-range: U+4E00-U+9FFF; /* general CJK */
}
@font-face {
font-family: sans-serif;
src: local('Helvetica Neue');
}
/* 襯線字體 serif */
@font-face {
font-family: serif;
src: local('Songti SC');
unicode-range: U+4E00-U+9FFF;
}
@font-face {
font-family: serif;
src: local(Georgia);
}
/* 無襯線標點符號字體 sans-serif CJK-punctuation font */
@font-face {
font-family: 'Biaodian Sans';
src: local('Hiragino Kaku Gothic ProN');
unicode-range: U+3002, U+FF0E, U+FF0C, U+3001, U+FF1B, U+FF1A, U+FF1F, U+FF01,
U+2014, U+2026,
U+300A-300B, U+3008-3009, U+FF08-FF09, /* brackets */
U+300C-300F /* quotes */;
}
@font-face {
font-family: 'Biaodian Sans';
src: local('Hiragino Sans GB');
unicode-range: U+201C-201D, U+2018-2019, /* curve quotes */
U+00B7;
}
/* 用於修正*大多數*中文網頁的標點 */
html:lang(zh), html:lang(zh) body {
font-family: 'Biaodian Sans', sans-serif !important;
}
@ethantw
Copy link
Author

ethantw commented Sep 21, 2012

使用方式

開啓「文字編輯」或其他文字編輯軟體,複製並貼上以上代碼,將文件儲存於下列新建路徑中(或其他任何方便尋找的地方)

/~Yijun/程式/瀏覽器工具/Safari6.css

開啓「Safari 6」,以鍵盤快速鍵「⌘,」打開「偏好設定⋯」→「進階」→「樣式表:」→選擇「其他⋯」並找到上述路徑中的Safari6.css,完成。

@disinfeqt
Copy link

Chrome: /Users/USERNAME/Library/Application Support/Google/Chrome/Default/User StyleSheets/Custom.css

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment