diff --git a/ajax/libs/Han/2.3.0/fonts/zhuyin.eot b/ajax/libs/Han/2.3.0/fonts/zhuyin.eot new file mode 100644 index 000000000..fbd08057a Binary files /dev/null and b/ajax/libs/Han/2.3.0/fonts/zhuyin.eot differ diff --git a/ajax/libs/Han/2.3.0/fonts/zhuyin.otf b/ajax/libs/Han/2.3.0/fonts/zhuyin.otf new file mode 100644 index 000000000..754d0ae9a Binary files /dev/null and b/ajax/libs/Han/2.3.0/fonts/zhuyin.otf differ diff --git a/ajax/libs/Han/2.3.0/fonts/zhuyin.ttf b/ajax/libs/Han/2.3.0/fonts/zhuyin.ttf new file mode 100644 index 000000000..e784f15f8 Binary files /dev/null and b/ajax/libs/Han/2.3.0/fonts/zhuyin.ttf differ diff --git a/ajax/libs/Han/2.3.0/han.css b/ajax/libs/Han/2.3.0/han.css new file mode 100644 index 000000000..0b645eb5b --- /dev/null +++ b/ajax/libs/Han/2.3.0/han.css @@ -0,0 +1,1987 @@ +@charset "UTF-8"; +/*! + * 漢字標準格式 v2.3 + * Hanzi-optimised CSS Mode + * + * Lisence: MIT Lisence + * Last-Modified: 2014/2/12 + */ +/*! normalize.css v3.0.0 | MIT License | git.io/normalize */ +/** + * 1. Set default font family to sans-serif. + * 2. Prevent iOS text size adjust after orientation change, without disabling + * user zoom. + */ +html { + font-family: sans-serif; + /* 1 */ + -ms-text-size-adjust: 100%; + /* 2 */ + -webkit-text-size-adjust: 100%; + /* 2 */ } + +/** + * Remove default margin. + */ +body { + margin: 0; } + +/* HTML5 display definitions + ========================================================================== */ +/** + * Correct `block` display not defined in IE 8/9. + */ +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +main, +nav, +section, +summary { + display: block; } + +/** + * 1. Correct `inline-block` display not defined in IE 8/9. + * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. + */ +audio, +canvas, +progress, +video { + display: inline-block; + /* 1 */ + vertical-align: baseline; + /* 2 */ } + +/** + * Prevent modern browsers from displaying `audio` without controls. + * Remove excess height in iOS 5 devices. + */ +audio:not([controls]) { + display: none; + height: 0; } + +/** + * Address `[hidden]` styling not present in IE 8/9. + * Hide the `template` element in IE, Safari, and Firefox < 22. + */ +[hidden], +template { + display: none; } + +/* Links + ========================================================================== */ +/** + * Remove the gray background color from active links in IE 10. + */ +a { + background: transparent; } + +/** + * Improve readability when focused and also mouse hovered in all browsers. + */ +a:active, +a:hover { + outline: 0; } + +/* Text-level semantics + ========================================================================== */ +/** + * Address styling not present in IE 8/9, Safari 5, and Chrome. + */ +abbr[title] { + border-bottom: 1px dotted; } + +/** + * Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome. + */ +b, +strong { + font-weight: bold; } + +/** + * Address styling not present in Safari 5 and Chrome. + */ +dfn { + font-style: italic; } + +/** + * Address variable `h1` font-size and margin within `section` and `article` + * contexts in Firefox 4+, Safari 5, and Chrome. + */ +h1 { + font-size: 2em; + margin: 0.67em 0; } + +/** + * Address styling not present in IE 8/9. + */ +mark { + background: #ff0; + color: #000; } + +/** + * Address inconsistent and variable font size in all browsers. + */ +small { + font-size: 80%; } + +/** + * Prevent `sub` and `sup` affecting `line-height` in all browsers. + */ +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; } + +sup { + top: -0.5em; } + +sub { + bottom: -0.25em; } + +/* Embedded content + ========================================================================== */ +/** + * Remove border when inside `a` element in IE 8/9. + */ +img { + border: 0; } + +/** + * Correct overflow displayed oddly in IE 9. + */ +svg:not(:root) { + overflow: hidden; } + +/* Grouping content + ========================================================================== */ +/** + * Address margin not present in IE 8/9 and Safari 5. + */ +figure { + margin: 1em 40px; } + +/** + * Address differences between Firefox and other browsers. + */ +hr { + -moz-box-sizing: content-box; + box-sizing: content-box; + height: 0; } + +/** + * Contain overflow in all browsers. + */ +pre { + overflow: auto; } + +/** + * Address odd `em`-unit font size rendering in all browsers. + */ +code, +kbd, +pre, +samp { + font-family: monospace, monospace; + font-size: 1em; } + +/* Forms + ========================================================================== */ +/** + * Known limitation: by default, Chrome and Safari on OS X allow very limited + * styling of `select`, unless a `border` property is set. + */ +/** + * 1. Correct color not being inherited. + * Known issue: affects color of disabled elements. + * 2. Correct font properties not being inherited. + * 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome. + */ +button, +input, +optgroup, +select, +textarea { + color: inherit; + /* 1 */ + font: inherit; + /* 2 */ + margin: 0; + /* 3 */ } + +/** + * Address `overflow` set to `hidden` in IE 8/9/10. + */ +button { + overflow: visible; } + +/** + * Address inconsistent `text-transform` inheritance for `button` and `select`. + * All other form control elements do not inherit `text-transform` values. + * Correct `button` style inheritance in Firefox, IE 8+, and Opera + * Correct `select` style inheritance in Firefox. + */ +button, +select { + text-transform: none; } + +/** + * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` + * and `video` controls. + * 2. Correct inability to style clickable `input` types in iOS. + * 3. Improve usability and consistency of cursor style between image-type + * `input` and others. + */ +button, +html input[type="button"], +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; + /* 2 */ + cursor: pointer; + /* 3 */ } + +/** + * Re-set default cursor for disabled elements. + */ +button[disabled], +html input[disabled] { + cursor: default; } + +/** + * Remove inner padding and border in Firefox 4+. + */ +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0; } + +/** + * Address Firefox 4+ setting `line-height` on `input` using `!important` in + * the UA stylesheet. + */ +input { + line-height: normal; } + +/** + * It's recommended that you don't attempt to style these elements. + * Firefox's implementation doesn't respect box-sizing, padding, or width. + * + * 1. Address box sizing set to `content-box` in IE 8/9/10. + * 2. Remove excess padding in IE 8/9/10. + */ +input[type="checkbox"], +input[type="radio"] { + box-sizing: border-box; + /* 1 */ + padding: 0; + /* 2 */ } + +/** + * Fix the cursor style for Chrome's increment/decrement buttons. For certain + * `font-size` values of the `input`, it causes the cursor style of the + * decrement button to change from `default` to `text`. + */ +input[type="number"]::-webkit-inner-spin-button, +input[type="number"]::-webkit-outer-spin-button { + height: auto; } + +/** + * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome. + * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome + * (include `-moz` to future-proof). + */ +input[type="search"] { + -webkit-appearance: textfield; + /* 1 */ + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; + /* 2 */ + box-sizing: content-box; } + +/** + * Remove inner padding and search cancel button in Safari and Chrome on OS X. + * Safari (but not Chrome) clips the cancel button when the search input has + * padding (and `textfield` appearance). + */ +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; } + +/** + * Define consistent border, margin, and padding. + */ +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; } + +/** + * 1. Correct `color` not being inherited in IE 8/9. + * 2. Remove padding so people aren't caught out if they zero out fieldsets. + */ +legend { + border: 0; + /* 1 */ + padding: 0; + /* 2 */ } + +/** + * Remove default vertical scrollbar in IE 8/9. + */ +textarea { + overflow: auto; } + +/** + * Don't inherit the `font-weight` (applied by a rule above). + * NOTE: the default cannot safely be changed in Chrome and Safari on OS X. + */ +optgroup { + font-weight: bold; } + +/* Tables + ========================================================================== */ +/** + * Remove most spacing between table cells. + */ +table { + border-collapse: collapse; + border-spacing: 0; } + +td, +th { + padding: 0; } + +/** + * 四大字體集・黑體 + * The Four Typefaces: Heiti + */ +@font-face { + font-family: 'Han Heiti'; + src: local("Hiragino Sans GB"), local("Lantinghei TC"), local("Lantinghei SC"), local("Heiti SC"), local("Heiti TC"), local("Microsoft Yahei"), local("Microsoft Jhenghei"), local("Droid Sans Fallback"); } + +@font-face { + unicode-range: U+4E00-9FFF, U+FA0E-FA0F, U+FA11, U+FA13-FA14, U+FA1F, U+FA21, U+FA23, U+FA24, U+FA27-FA29, U+3400-4DB5, U+9FBC-9FC2, U+9FC4-9FC5, U+20000-2A6D6, U+2A700-2B734, U+2B740-2B81D, U+3040-309E, U+30A1-30FE, U+3007; + font-family: 'Han Heiti'; + src: local(YuGothic), local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"); } + +@font-face { + font-family: 'Han Heiti CNS'; + src: local("Hiragino Sans GB"), local("Lantinghei TC"), local("Heiti TC"), local("Microsoft Jhenghei"), local("Heiti SC"), local("Lantinghei SC"), local("Microsoft Yahei"), local("Droid Sans Fallback"); } + +@font-face { + unicode-range: U+4E00-9FFF, U+FA0E-FA0F, U+FA11, U+FA13-FA14, U+FA1F, U+FA21, U+FA23, U+FA24, U+FA27-FA29, U+3400-4DB5, U+9FBC-9FC2, U+9FC4-9FC5, U+20000-2A6D6, U+2A700-2B734, U+2B740-2B81D, U+3040-309E, U+30A1-30FE, U+3007; + font-family: 'Han Heiti CNS'; + src: local(YuGothic), local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"); } + +@font-face { + font-family: 'Han Heiti GB'; + src: local("Hiragino Sans GB"), local("Lantinghei SC"), local("Heiti SC"), local("Microsoft Yahei"), local("Droid Sans Fallback"); } + +/* + * 粗體 + */ +@font-face { + font-family: 'Han Heiti'; + font-weight: 600; + src: local("Hiragino Sans GB W6"), local(HiraginoSansGB-W6), local("Lantinghei TC Demibold"), local("Lantinghei SC Demibold"), local(FZLTXHB--B51-0), local(FZLTZHK--GBK1-0), local("Heiti SC Medium"), local("Heiti TC Medium"), local(STHeitiSC-Medium), local(STHeitiTC-Medium), local("Microsoft YaHei Bold"), local("Microsoft Jhenghei Bold"), local(MicrosoftYaHei-Bold), local(MicrosoftJhengHeiBold); } + +@font-face { + unicode-range: U+4E00-9FFF, U+FA0E-FA0F, U+FA11, U+FA13-FA14, U+FA1F, U+FA21, U+FA23, U+FA24, U+FA27-FA29, U+3400-4DB5, U+9FBC-9FC2, U+9FC4-9FC5, U+20000-2A6D6, U+2A700-2B734, U+2B740-2B81D, U+3040-309E, U+30A1-30FE, U+3007; + font-family: 'Han Heiti'; + font-weight: 600; + src: local("YuGothic Bold"), local("Hiragino Kaku Gothic ProN W6"), local("Hiragino Kaku Gothic Pro W6"), local(YuGo-Bold), local(HiraKakuProN-W6), local(HiraKakuPro-W6); } + +@font-face { + font-family: 'Han Heiti CNS'; + font-weight: 600; + src: local("Hiragino Sans GB W6"), local(HiraginoSansGB-W6), local("Lantinghei TC Demibold"), local("Heiti TC Medium"), local("Microsoft Jhenghei Bold"), local(FZLTXHB--B51-0), local(STHeitiTC-Medium), local(MicrosoftJhengHeiBold), local("Lantinghei SC Demibold"), local("Microsoft YaHei Bold"), local("Heiti SC Medium"), local(FZLTZHK--GBK1-0), local(STHeitiSC-Medium), local(MicrosoftYaHei-Bold); } + +@font-face { + unicode-range: U+4E00-9FFF, U+FA0E-FA0F, U+FA11, U+FA13-FA14, U+FA1F, U+FA21, U+FA23, U+FA24, U+FA27-FA29, U+3400-4DB5, U+9FBC-9FC2, U+9FC4-9FC5, U+20000-2A6D6, U+2A700-2B734, U+2B740-2B81D, U+3040-309E, U+30A1-30FE, U+3007; + font-family: 'Han Heiti CNS'; + font-weight: 600; + src: local("YuGothic Bold"), local(YuGo-Bold), local("Hiragino Kaku Gothic ProN W6"), local("Hiragino Kaku Gothic Pro W6"), local(HiraKakuProN-W6), local(HiraKakuPro-W6); } + +@font-face { + font-family: 'Han Heiti GB'; + font-weight: 600; + src: local("Hiragino Sans GB W6"), local(HiraginoSansGB-W6), local("Lantinghei SC Demibold"), local("Microsoft YaHei Bold"), local("Heiti SC Medium"), local(FZLTZHK--GBK1-0), local(STHeitiSC-Medium), local(MicrosoftYaHei-Bold); } + +@font-face { + font-family: 'Han Heiti'; + src: local("Hiragino Sans GB"), local("Lantinghei TC"), local("Lantinghei SC"), local("Heiti SC"), local("Heiti TC"), local("Microsoft Yahei"), local("Microsoft Jhenghei"), local("Droid Sans Fallback"); + unicode-range: U+270C; } + +@font-face { + font-family: 'Han Heiti'; + font-weight: 600; + src: local("Hiragino Sans GB W6"), local(HiraginoSansGB-W6), local("Lantinghei TC Demibold"), local("Lantinghei SC Demibold"), local(FZLTXHB--B51-0), local(FZLTZHK--GBK1-0), local("Heiti SC Medium"), local("Heiti TC Medium"), local(STHeitiSC-Medium), local(STHeitiTC-Medium), local("Microsoft YaHei Bold"), local("Microsoft Jhenghei Bold"), local(MicrosoftYaHei-Bold), local(MicrosoftJhengHeiBold); + unicode-range: U+270C; } + +@font-face { + font-family: 'Han Heiti CNS'; + src: local("Hiragino Sans GB"), local("Lantinghei TC"), local("Heiti TC"), local("Microsoft Jhenghei"), local("Heiti SC"), local("Lantinghei SC"), local("Microsoft Yahei"), local("Droid Sans Fallback"); + unicode-range: U+270C; } + +@font-face { + font-family: 'Han Heiti CNS'; + font-weight: 600; + src: local("Hiragino Sans GB W6"), local(HiraginoSansGB-W6), local("Lantinghei TC Demibold"), local("Heiti TC Medium"), local("Microsoft Jhenghei Bold"), local(FZLTXHB--B51-0), local(STHeitiTC-Medium), local(MicrosoftJhengHeiBold), local("Lantinghei SC Demibold"), local("Heiti SC Medium"), local("Microsoft YaHei Bold"), local(FZLTZHK--GBK1-0), local(STHeitiSC-Medium), local(MicrosoftYaHei-Bold); + unicode-range: U+270C; } + +@font-face { + font-family: 'Han Heiti GB'; + src: local("Hiragino Sans GB"), local("Lantinghei SC"), local("Heiti SC"), local("Microsoft Yahei"), local("Droid Sans Fallback"); + unicode-range: U+270C; } + +/** + * 四大字體集・宋體(明朝體) + * The Four Typefaces: Songti (Mincho) + */ +@font-face { + font-family: 'Han Songti'; + src: local("Songti SC"), local("Songti TC"), local(STSong), local("Lisong Pro"), local(SimSun), local(PMingLiU); } + +@font-face { + unicode-range: U+4E00-9FFF, U+FA0E-FA0F, U+FA11, U+FA13-FA14, U+FA1F, U+FA21, U+FA23, U+FA24, U+FA27-FA29, U+3400-4DB5, U+9FBC-9FC2, U+9FC4-9FC5, U+20000-2A6D6, U+2A700-2B734, U+2B740-2B81D, U+3040-309E, U+30A1-30FE, U+3007; + font-family: 'Han Songti'; + src: local(YuMincho), local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("MS Mincho"); } + +@font-face { + font-family: 'Han Songti CNS'; + src: local("Songti TC"), local("Lisong Pro"), local("Songti SC"), local(STSong), local(PMingLiU), local(SimSun); } + +@font-face { + unicode-range: U+4E00-9FFF, U+FA0E-FA0F, U+FA11, U+FA13-FA14, U+FA1F, U+FA21, U+FA23, U+FA24, U+FA27-FA29, U+3400-4DB5, U+9FBC-9FC2, U+9FC4-9FC5, U+20000-2A6D6, U+2A700-2B734, U+2B740-2B81D, U+3040-309E, U+30A1-30FE, U+3007; + font-family: 'Han Songti CNS'; + src: local(YuMincho), local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"); } + +@font-face { + font-family: 'Han Songti GB'; + src: local("Songti SC"), local(STSong), local(SimSun), local(PMingLiU); } + +/** + * 粗體 + * Bold + */ +@font-face { + font-family: 'Han Songti'; + font-weight: 600; + src: local("STSongti SC Bold"), local("STSongti TC Bold"), local(STSongti-SC-Bold), local(STSongti-TC-Bold); } + +@font-face { + unicode-range: U+4E00-9FFF, U+FA0E-FA0F, U+FA11, U+FA13-FA14, U+FA1F, U+FA21, U+FA23, U+FA24, U+FA27-FA29, U+3400-4DB5, U+9FBC-9FC2, U+9FC4-9FC5, U+20000-2A6D6, U+2A700-2B734, U+2B740-2B81D, U+3040-309E, U+30A1-30FE, U+3007; + font-family: 'Han Songti'; + font-weight: 600; + src: local("YuMincho Demibold"), local("Hiragino Mincho ProN W6"), local("Hiragino Mincho Pro W6"), local(YuMin-Demibold), local(HiraMinProN-W6), local(HiraMinPro-W6); } + +@font-face { + font-family: 'Han Songti CNS'; + font-weight: 600; + src: local("STSongti TC Bold"), local("STSongti SC Bold"), local(STSongti-TC-Bold), local(STSongti-SC-Bold); } + +@font-face { + unicode-range: U+4E00-9FFF, U+FA0E-FA0F, U+FA11, U+FA13-FA14, U+FA1F, U+FA21, U+FA23, U+FA24, U+FA27-FA29, U+3400-4DB5, U+9FBC-9FC2, U+9FC4-9FC5, U+20000-2A6D6, U+2A700-2B734, U+2B740-2B81D, U+3040-309E, U+30A1-30FE, U+3007; + font-family: 'Han Songti CNS'; + font-weight: 600; + src: local("YuMincho Demibold"), local("Hiragino Mincho ProN W6"), local("Hiragino Mincho Pro W6"), local(YuMin-Demibold), local(HiraMinProN-W6), local(HiraMinPro-W6); } + +@font-face { + font-family: 'Han Songti GB'; + font-weight: 600; + src: local("STSongti SC Bold"), local(STSongti-SC-Bold); } + +@font-face { + font-family: 'Han Songti'; + src: local("Songti SC"), local("Songti TC"), local(STSongti), local("Lisong Pro"), local("MS Mincho"), local(SimSun), local(PMingLiU); + unicode-range: U+270C; } + +@font-face { + font-family: 'Han Songti'; + font-weight: 600; + src: local("STSongti TC Bold"), local("STSongti SC Bold"), local(STSongti-TC-Bold), local(STSongti-SC-Bold); + unicode-range: U+270C; } + +@font-face { + font-family: 'Han Songti CNS'; + src: local("Songti TC"), local("Lisong Pro"), local("Songti SC"), local(STSong), local("MS Mincho"), local(PMingLiU), local(SimSun); + unicode-range: U+270C; } + +@font-face { + font-family: 'Han Songti CNS'; + font-weight: 600; + src: local("STSongti TC Bold"), local("STSongti SC Bold"), local(STSongti-TC-Bold), local(STSongti-SC-Bold); + unicode-range: U+270C; } + +@font-face { + font-family: 'Han Songti GB'; + src: local("Songti SC"), local(STSong), local(SimSun); + unicode-range: U+270C; } + +/** + * 四大字體集・楷體 + * The Four Typefaces: Kaiti (Cursive) + */ +@font-face { + font-family: cursive; + src: local("Kaiti SC"), local(STKaiti), local(BiauKai), local("標楷體"), local(DFKaiShu-SB-Estd-BF), local(Kaiti), local(DFKai-SB); } + +@font-face { + unicode-range: U+4E00-9FFF, U+FA0E-FA0F, U+FA11, U+FA13-FA14, U+FA1F, U+FA21, U+FA23, U+FA24, U+FA27-FA29, U+3400-4DB5, U+9FBC-9FC2, U+9FC4-9FC5, U+20000-2A6D6, U+2A700-2B734, U+2B740-2B81D, U+3040-309E, U+30A1-30FE, U+3007; + font-family: 'Han Kaiti'; + src: local("Kaiti SC"), local(STKaiti), local(BiauKai), local("標楷體"), local(DFKaiShu-SB-Estd-BF), local(Kaiti), local(DFKai-SB); } + +@font-face { + unicode-range: U+4E00-9FFF, U+FA0E-FA0F, U+FA11, U+FA13-FA14, U+FA1F, U+FA21, U+FA23, U+FA24, U+FA27-FA29, U+3400-4DB5, U+9FBC-9FC2, U+9FC4-9FC5, U+20000-2A6D6, U+2A700-2B734, U+2B740-2B81D, U+3040-309E, U+30A1-30FE, U+3007; + font-family: 'Han Kaiti CNS'; + src: local(BiauKai), local("標楷體"), local(DFKaiShu-SB-Estd-BF); } + +@font-face { + unicode-range: U+4E00-9FFF, U+FA0E-FA0F, U+FA11, U+FA13-FA14, U+FA1F, U+FA21, U+FA23, U+FA24, U+FA27-FA29, U+3400-4DB5, U+9FBC-9FC2, U+9FC4-9FC5, U+20000-2A6D6, U+2A700-2B734, U+2B740-2B81D, U+3040-309E, U+30A1-30FE, U+3007; + font-family: 'Han Kaiti GB'; + src: local("Kaiti SC"), local(STKaiti), local(Kai), local(Kaiti), local(DFKai-SB); } + +/** + * 粗體 + * Bold + */ +@font-face { + font-family: cursive; + font-weight: 600; + src: local("Kaiti SC Bold"), local(STKaiti-SC-Bold); } + +@font-face { + font-family: 'Han Kaiti'; + font-weight: 600; + src: local("Kaiti SC Bold"), local(STKaiti-SC-Bold); } + +@font-face { + font-family: 'Han Kaiti GB'; + font-weight: 600; + src: local("Kaiti SC Bold"), local(STKaiti-SC-Bold); } + +/** + * 四大字體集・仿宋體 + * The Four Typefaces: Fangsong + */ +@font-face { + unicode-range: U+4E00-9FFF, U+FA0E-FA0F, U+FA11, U+FA13-FA14, U+FA1F, U+FA21, U+FA23, U+FA24, U+FA27-FA29, U+3400-4DB5, U+9FBC-9FC2, U+9FC4-9FC5, U+20000-2A6D6, U+2A700-2B734, U+2B740-2B81D, U+3040-309E, U+30A1-30FE, U+3007; + font-family: 'Han Fangsong'; + src: local(STFangsong), local(FangSong); } + +@font-face { + unicode-range: U+4E00-9FFF, U+FA0E-FA0F, U+FA11, U+FA13-FA14, U+FA1F, U+FA21, U+FA23, U+FA24, U+FA27-FA29, U+3400-4DB5, U+9FBC-9FC2, U+9FC4-9FC5, U+20000-2A6D6, U+2A700-2B734, U+2B740-2B81D, U+3040-309E, U+30A1-30FE, U+3007; + font-family: 'Han Fangsong CNS'; + src: local(STFangsong), local(FangSong); } + +@font-face { + unicode-range: U+4E00-9FFF, U+FA0E-FA0F, U+FA11, U+FA13-FA14, U+FA1F, U+FA21, U+FA23, U+FA24, U+FA27-FA29, U+3400-4DB5, U+9FBC-9FC2, U+9FC4-9FC5, U+20000-2A6D6, U+2A700-2B734, U+2B740-2B81D, U+3040-309E, U+30A1-30FE, U+3007; + font-family: 'Han Fangsong GB'; + src: local(STFangsong), local(FangSong); } + +/* 簡易版漢字標點樣式修正 + Hanzi puncuation, ‘Biaodian’(zh) and ‘Yakumono’(ja) + ========================================================================== */ +/** + * 單點全形句號(.) + * Fullwidth full stop + */ +@font-face { + font-family: 'Biaodian Sans'; + src: local("Hiragino Sans GB"), local("Heiti SC"), local(STHeiti), local("MS Gothic"), local(SimSun); + unicode-range: U+FF0E; } + +@font-face { + font-family: 'Biaodian Serif'; + src: local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("Songti SC"), local(STSong), local(SimSun); + unicode-range: U+FF0E; } + +@font-face { + font-family: 'Biaodian Pro Sans'; + src: local("Hiragino Sans GB"), local("Heiti SC"), local(STHeiti), local("MS Gothic"), local(SimSun); + unicode-range: U+FF0E; } + +@font-face { + font-family: 'Biaodian Pro Serif'; + src: local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("Songti SC"), local(STSong), local(SimSun); + unicode-range: U+FF0E; } + +@font-face { + font-family: 'Biaodian Pro Sans CNS'; + src: local("Hiragino Sans GB"), local("Heiti SC"), local(STHeiti), local("MS Gothic"), local(SimSun); + unicode-range: U+FF0E; } + +@font-face { + font-family: 'Biaodian Pro Serif CNS'; + src: local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("Songti SC"), local(STSong), local(SimSun); + unicode-range: U+FF0E; } + +@font-face { + font-family: 'Biaodian Pro Sans GB'; + src: local("Hiragino Sans GB"), local("Heiti SC"), local(STHeiti), local("MS Gothic"), local(SimSun); + unicode-range: U+FF0E; } + +@font-face { + font-family: 'Biaodian Pro Serif GB'; + src: local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("Songti SC"), local(STSong), local(SimSun); + unicode-range: U+FF0E; } + +/** + * 間隔號(·) + * Middle dot + */ +@font-face { + font-family: 'Biaodian Sans'; + src: local("Hiragino Sans GB"), local("Heiti SC"), local(STHeiti), local(SimSun); + unicode-range: U+00B7; } + +@font-face { + font-family: 'Biaodian Serif'; + src: local("Songti SC"), local(STSong), local("Heiti SC"), local(SimSun); + unicode-range: U+00B7; } + +@font-face { + font-family: 'Biaodian Pro Sans'; + src: local("Hiragino Sans GB"), local("Heiti SC"), local(STHeiti), local(SimSun); + unicode-range: U+00B7; } + +@font-face { + font-family: 'Biaodian Pro Serif'; + src: local("Songti SC"), local(STSong), local("Heiti SC"), local(SimSun); + unicode-range: U+00B7; } + +@font-face { + font-family: 'Biaodian Pro Sans CNS'; + src: local("Hiragino Sans GB"), local("Heiti SC"), local(STHeiti), local(SimSun); + unicode-range: U+00B7; } + +@font-face { + font-family: 'Biaodian Pro Serif CNS'; + src: local("Songti SC"), local(STSong), local("Heiti SC"), local(SimSun); + unicode-range: U+00B7; } + +@font-face { + font-family: 'Biaodian Pro Sans GB'; + src: local("Hiragino Sans GB"), local("Heiti SC"), local(STHeiti), local(SimSun); + unicode-range: U+00B7; } + +@font-face { + font-family: 'Biaodian Pro Serif GB'; + src: local("Songti SC"), local(STSong), local("Heiti SC"), local(SimSun); + unicode-range: U+00B7; } + +/** + * 破折號(——) + * Em dash + */ +@font-face { + font-family: 'Biaodian Sans'; + src: local("Hiragino Sans GB"), local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local("Microsoft Yahei"), local(SimSun); + unicode-range: U+2014; } + +@font-face { + font-family: 'Biaodian Serif'; + src: local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("Songti SC"), local(STSong), local("Microsoft Yahei"), local(SimSun); + unicode-range: U+2014; } + +@font-face { + font-family: 'Yakumono Sans'; + src: local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local("Arial Unicode MS"), local("MS Gothic"); + unicode-range: U+2014; } + +@font-face { + font-family: 'Yakumono Serif'; + src: local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("MS Mincho"), local("Microsoft Yahei"); + unicode-range: U+2014; } + +@font-face { + font-family: 'Biaodian Pro Sans'; + src: local("Hiragino Sans GB"), local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local("Microsoft Yahei"), local(SimSun); + unicode-range: U+2014; } + +@font-face { + font-family: 'Biaodian Pro Serif'; + src: local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("Songti SC"), local(STSong), local("Microsoft Yahei"), local(SimSun); + unicode-range: U+2014; } + +@font-face { + font-family: 'Biaodian Pro Sans CNS'; + src: local("Hiragino Sans GB"), local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local("Microsoft Yahei"), local(SimSun); + unicode-range: U+2014; } + +@font-face { + font-family: 'Biaodian Pro Serif CNS'; + src: local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("Songti SC"), local(STSong), local("Microsoft Yahei"), local(SimSun); + unicode-range: U+2014; } + +@font-face { + font-family: 'Biaodian Pro Sans GB'; + src: local("Hiragino Sans GB"), local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local("Microsoft Yahei"), local(SimSun); + unicode-range: U+2014; } + +@font-face { + font-family: 'Biaodian Pro Serif GB'; + src: local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("Songti SC"), local(STSong), local("Microsoft Yahei"), local(SimSun); + unicode-range: U+2014; } + +/** + * 省略號(……) + * Ellipsis + */ +@font-face { + font-family: 'Biaodian Sans'; + src: local("Hiragino Sans GB"), local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local(Meiryo), local("MS Gothic"), local(SimSun), local(PMingLiU); + unicode-range: U+2026; } + +@font-face { + font-family: 'Biaodian Serif'; + src: local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("Songti SC"), local("MS Mincho"), local(SimSun), local(PMingLiU); + unicode-range: U+2026; } + +@font-face { + font-family: 'Yakumono Sans'; + src: local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local(Meiryo), local("MS Gothic"); + unicode-range: U+2026; } + +@font-face { + font-family: 'Yakumono Serif'; + src: local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("MS Mincho"); + unicode-range: U+2026; } + +@font-face { + font-family: 'Biaodian Pro Sans'; + src: local("Hiragino Sans GB"), local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local(SimSun), local(PMingLiU); + unicode-range: U+2026; } + +@font-face { + font-family: 'Biaodian Pro Serif'; + src: local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("Songti SC"), local(SimSun), local(PMingLiU); + unicode-range: U+2026; } + +@font-face { + font-family: 'Biaodian Pro Sans CNS'; + src: local("Hiragino Sans GB"), local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local(SimSun), local(PMingLiU); + unicode-range: U+2026; } + +@font-face { + font-family: 'Biaodian Pro Serif CNS'; + src: local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("Songti SC"), local(STSongti), local(SimSun), local(PMingLiU); + unicode-range: U+2026; } + +@font-face { + font-family: 'Biaodian Pro Sans GB'; + src: local("Hiragino Sans GB"), local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local(SimSun), local(PMingLiU); + unicode-range: U+2026; } + +@font-face { + font-family: 'Biaodian Pro Serif GB'; + src: local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("Songti SC"), local(STSongti), local(SimSun), local(PMingLiU); + unicode-range: U+2026; } + +/** + * 彎引號(“‘’”) + * Curve quotes + */ +@font-face { + font-family: 'Biaodian Sans'; + src: local("Hiragino Sans GB"), local("Heiti SC"), local(STHeiti), local(SimSun), local(PMingLiU); + unicode-range: U+201C-201D, U+2018-2019; } + +@font-face { + font-family: 'Biaodian Serif'; + src: local("Lisong Pro"), local("Heiti SC"), local(STHeiti), local(SimSun), local(PMingLiU); + unicode-range: U+201C-201D, U+2018-2019; } + +@font-face { + font-family: 'Biaodian Pro Sans'; + src: local("Hiragino Sans GB"), local("Heiti SC"), local(STHeiti), local(SimSun), local(PMingLiU); + unicode-range: U+201C-201D, U+2018-2019; } + +@font-face { + font-family: 'Biaodian Pro Serif'; + src: local("Lisong Pro"), local("Heiti SC"), local(STHeiti), local(SimSun), local(PMingLiU); + unicode-range: U+201C-201D, U+2018-2019; } + +@font-face { + font-family: 'Biaodian Pro Sans CNS'; + src: local("Hiragino Sans GB"), local("Heiti SC"), local(STHeiti), local(SimSun), local(PMingLiU); + unicode-range: U+201C-201D, U+2018-2019; } + +@font-face { + font-family: 'Biaodian Pro Serif CNS'; + src: local("Lisong Pro"), local("Heiti SC"), local(STHeiti), local(SimSun), local(PMingLiU); + unicode-range: U+201C-201D, U+2018-2019; } + +@font-face { + font-family: 'Biaodian Pro Sans GB'; + src: local("Hiragino Sans GB"), local("Heiti SC"), local(STHeiti), local(SimSun), local(PMingLiU); + unicode-range: U+201C-201D, U+2018-2019; } + +@font-face { + font-family: 'Biaodian Pro Serif GB'; + src: local("Lisong Pro"), local("Heiti SC"), local(STHeiti), local(SimSun), local(PMingLiU); + unicode-range: U+201C-201D, U+2018-2019; } + +/** + * 着重號(●) + * Emphasis dots + */ +@font-face { + font-family: 'Biaodian Sans'; + src: local(Georgia), local("Times New Roman"), local("Droid Sans Fallback"); + unicode-range: U+25CF; } + +@font-face { + font-family: 'Biaodian Serif'; + src: local(Georgia), local("Times New Roman"), local("Droid Sans Fallback"); + unicode-range: U+25CF; } + +@font-face { + font-family: 'Biaodian Pro Sans'; + src: local(Georgia), local("Times New Roman"), local("Droid Sans Fallback"); + unicode-range: U+25CF; } + +@font-face { + font-family: 'Biaodian Pro Serif'; + src: local(Georgia), local("Times New Roman"), local("Droid Sans Fallback"); + unicode-range: U+25CF; } + +@font-face { + font-family: 'Biaodian Pro Sans CNS'; + src: local(Georgia), local("Times New Roman"), local("Droid Sans Fallback"); + unicode-range: U+25CF; } + +@font-face { + font-family: 'Biaodian Pro Serif CNS'; + src: local(Georgia), local("Times New Roman"), local("Droid Sans Fallback"); + unicode-range: U+25CF; } + +@font-face { + font-family: 'Biaodian Pro Sans GB'; + src: local(Georgia), local("Times New Roman"), local("Droid Sans Fallback"); + unicode-range: U+25CF; } + +@font-face { + font-family: 'Biaodian Pro Serif GB'; + src: local(Georgia), local("Times New Roman"), local("Droid Sans Fallback"); + unicode-range: U+25CF; } + +/* 進階版標點樣式修正 + Advanced Correction to Hanzi Punctuation + ========================================================================== */ +/** + * a. 句、逗、頓號(。,、) + * Period, comma, paused comma + * b. 分、冒、問、嘆號(;:?!) + * Colon, semicolon, question, exclam- + * ation marks + * c. 連接號、正、反斜線(-/\) + * En dash (fullwidth hyphen-minus), + * division slash, back slash + */ +@font-face { + font-family: 'Biaodian Pro Sans'; + src: local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local("MS Gothic"); + unicode-range: U+3002, U+FF0C, U+3001, U+FF1B, U+FF1A, U+FF1F, U+FF01, U+FF0D, U+FF0F, U+FF3C; } + +@font-face { + font-family: 'Biaodian Pro Serif'; + src: local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("MS Mincho"); + unicode-range: U+3002, U+FF0C, U+3001, U+FF1B, U+FF1A, U+FF1F, U+FF01, U+FF0D, U+FF0F, U+FF3C; } + +@font-face { + font-family: 'Biaodian Pro Sans CNS'; + src: local("Heiti TC"), local("Lihei Pro"), local("Microsoft Jhenghei"), local(PMingLiU); + unicode-range: U+3002, U+FF0C, U+3001; } + +@font-face { + font-family: 'Biaodian Pro Sans CNS'; + src: local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local("Heiti TC"), local("Lihei Pro"), local("Microsoft Jhenghei"), local(PMingLiU), local("MS Gothic"); + unicode-range: U+FF1B, U+FF1A, U+FF1F, U+FF01; } + +@font-face { + font-family: 'Biaodian Pro Sans CNS'; + src: local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("MS Mincho"); + unicode-range: U+FF0D, U+FF0F, U+FF3C; } + +@font-face { + font-family: 'Biaodian Pro Serif CNS'; + src: local(STSongti-TC-Regular), local("Lisong Pro"), local("Heiti TC"), local(PMingLiU); + unicode-range: U+3002, U+FF0C, U+3001; } + +@font-face { + font-family: 'Biaodian Pro Serif CNS'; + src: local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local(PMingLiU), local("MS Mincho"); + unicode-range: U+FF1B, U+FF1A, U+FF1F, U+FF01, U+FF0D, U+FF0F, U+FF3C; } + +@font-face { + font-family: 'Biaodian Pro Sans GB'; + src: local("Hiragino Sans GB"), local("Heiti SC"), local(STHeiti), local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local(SimSun), local("MS Gothic"); + unicode-range: U+3002, U+FF0C, U+3001, U+FF1B, U+FF1A, U+FF1F, U+FF01, U+FF0D, U+FF0F, U+FF3C; } + +@font-face { + font-family: 'Biaodian Pro Serif GB'; + src: local("Songti SC"), local(STSongti), local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local("Hiragino Sans GB"), local("Heiti SC"), local(STHeiti), local(SimSun), local("MS Mincho"); + unicode-range: U+3002, U+FF0C, U+3001, U+FF1B, U+FF1A, U+FF1F, U+FF01; } + +@font-face { + font-family: 'Biaodian Pro Serif GB'; + src: local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local(PMingLiU), local("MS Mincho"); + unicode-range: U+FF0D, U+FF0F, U+FF3C; } + +/** + * a. 引號(「『』」) + * Quotes + * b. 括號、書名號(()《》〈〉〔〕) + * Brackets + */ +@font-face { + font-family: 'Biaodian Pro Sans'; + src: local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local(SimSun), local(PMingLiU); + unicode-range: U+300C-300F, U+300A-300B, U+3008-3009, U+FF08-FF09, U+3014-3015; } + +@font-face { + font-family: 'Biaodian Pro Serif'; + src: local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local(SimSun); + unicode-range: U+300C-300F, U+300A-300B, U+3008-3009, U+FF08-FF09, U+3014-3015; } + +@font-face { + font-family: 'Biaodian Pro Sans CNS'; + src: local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local(SimSun), local(PMingLiU); + unicode-range: U+300C-300F, U+300A-300B, U+3008-3009, U+FF08-FF09, U+3014-3015; } + +@font-face { + font-family: 'Biaodian Pro Serif CNS'; + src: local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local(SimSun); + unicode-range: U+300C-300F, U+300A-300B, U+3008-3009, U+FF08-FF09, U+3014-3015; } + +@font-face { + font-family: 'Biaodian Pro Sans GB'; + src: local("Hiragino Kaku Gothic ProN"), local("Hiragino Kaku Gothic Pro"), local(SimSun), local(PMingLiU); + unicode-range: U+300C-300F, U+300A-300B, U+3008-3009, U+FF08-FF09, U+3014-3015; } + +@font-face { + font-family: 'Biaodian Pro Serif GB'; + src: local("Hiragino Mincho ProN"), local("Hiragino Mincho Pro"), local(SimSun); + unicode-range: U+300C-300F, U+300A-300B, U+3008-3009, U+FF08-FF09, U+3014-3015; } + +@font-face { + font-family: 'Biaodian Sans'; + src: local("Lying to Firefox"); + unicode-range: U+270C; } + +@font-face { + font-family: 'Biaodian Serif'; + src: local("Lying to Firefox"); + unicode-range: U+270C; } + +@font-face { + font-family: 'Biaodian Pro Sans'; + src: local("Lying to Firefox"); + unicode-range: U+270C; } + +@font-face { + font-family: 'Biaodian Pro Serif'; + src: local("Lying to Firefox"); + unicode-range: U+270C; } + +@font-face { + font-family: 'Biaodian Pro Sans CNS'; + src: local("Lying to Firefox"); + unicode-range: U+270C; } + +@font-face { + font-family: 'Biaodian Pro Serif CNS'; + src: local("Lying to Firefox"); + unicode-range: U+270C; } + +@font-face { + font-family: 'Biaodian Pro Sans GB'; + src: local("Lying to Firefox"); + unicode-range: U+270C; } + +@font-face { + font-family: 'Biaodian Pro Serif GB'; + src: local("Lying to Firefox"); + unicode-range: U+270C; } + +/** + * 襯線西文斜體 + * Latin italic serif + */ +@font-face { + font-family: 'Latin Italic Serif'; + src: local("Georgia Italic"), local("Times New Roman Italic"), local(Georgia-Italic), local(TimesNewRomanPS-ItalicMT), local(Times-Italic); } + +@font-face { + font-family: 'Latin Italic Serif'; + font-weight: 700; + src: local("Georgia Bold Italic"), local("Times New Roman Bold Italic"), local(Georgia-BoldItalic), local(TimesNewRomanPS-BoldItalicMT), local(Times-Italic); } + +/** + * 無襯線西文斜體 + * Latin italic sans-serif + */ +@font-face { + font-family: 'Latin Italic Sans'; + src: local("Helvetica Neue Italic"), local("Helvetica Oblique"), local("Arial Italic"), local(HelveticaNeue-Italic), local(Helvetica-LightOblique), local(Arial-ItalicMT); } + +@font-face { + font-family: 'Latin Italic Sans'; + font-weight: 700; + src: local("Helvetica Neue Bold Italic"), local("Helvetica Bold Oblique"), local("Arial Bold Italic"), local(HelveticaNeue-BoldItalic), local(Helvetica-BoldOblique), local(Arial-BoldItalicMT); } + +/** + * 文本數字 + * Text figures + */ +@font-face { + unicode-range: U+0030-0039; + font-family: 'Numeral TF Sans'; + src: local(Skia), local("Neutraface 2 Text"), local(Candara), local(Corbel); } + +@font-face { + unicode-range: U+0030-0039; + font-family: 'Numeral TF Serif'; + src: local(Georgia), local("Hoefler Text"), local("Big Caslon"); } + +/** + * 等高數字 + * Lining figures + */ +@font-face { + unicode-range: U+0030-0039; + font-family: 'Numeral LF Sans'; + src: local("Helvetica Neue"), local(Helvetica), local(Arial); } + +@font-face { + unicode-range: U+0030-0039; + font-family: 'Numeral LF Serif'; + src: local(Palatino), local("Palatino Linotype"), local("Times New Roman"); } + +@font-face { + font-family: 'Numeral TF Sans'; + src: local("Lying to Firefox"); + unicode-range: U+270C; } + +@font-face { + font-family: 'Numeral TF Serif'; + src: local("Lying to Firefox"); + unicode-range: U+270C; } + +@font-face { + font-family: 'Numeral LF Sans'; + src: local("Lying to Firefox"); + unicode-range: U+270C; } + +@font-face { + font-family: 'Numeral LF Serif'; + src: local("Lying to Firefox"); + unicode-range: U+270C; } + +/** + * 注音符號 + * Zhuyin + */ +@font-face { + unicode-range: U+3105-312D, U+31A0-31BA, U+02D9, U+02CA, U+02C5, U+02C7, U+02CB, U+02EA-02EB, U+030D, U+0358, U+F31B4-F31B7, U+F0061, U+F0065, U+F0069, U+F006F, U+F0075; + font-family: 'Zhuyin Kaiti'; + src: url("fonts/zhuyin.eot") format("embedded-opentype"), url("fonts/zhuyin.otf") format("opentype"), url("fonts/zhuyin.ttf") format("truetype"), local(BiauKai), local("標楷體"), local(DFKaiShu-SB-Estd-BF), local(PMingLiU); } + +@font-face { + unicode-range: U+3105-312D, U+31A0-31BA, U+02D9, U+02CA, U+02C5, U+02C7, U+02CB, U+02EA-02EB, U+030D, U+0358, U+F31B4-F31B7, U+F0061, U+F0065, U+F0069, U+F006F, U+F0075; + font-family: 'Zhuyin Heiti'; + src: local("Hiragino Sans GB"), local("Microsoft Jhenghei"), url("fonts/zhuyin.eot") format("embedded-opentype"), url("fonts/zhuyin.otf") format("opentype"), url("fonts/zhuyin.ttf") format("truetype"), local(PMingLiU), local(SimSun), local(BiauKai), local("標楷體"), local(DFKaiShu-SB-Estd-BF); } + +@font-face { + font-family: 'Zhuyin Heiti'; + src: local("Heiti TC"), local("Microsoft Jhenghei"), url("fonts/zhuyin.eot") format("embedded-opentype"), url("fonts/zhuyin.otf") format("opentype"), url("fonts/zhuyin.ttf") format("truetype"), local(PMingLiU), local(SimSun), local(BiauKai), local("標楷體"), local(DFKaiShu-SB-Estd-BF); + unicode-range: U+3127, U+02C7, U+02CA-B, U+02D9; } + +/* 基礎頁面設定 + * Base + * ========================================================================== */ +html { + line-height: 1.3; + -webkit-font-smoothing: subpixel-antialiased; } + +/* 章節元素及內容群組元素 + * Sections & grouping content + * ========================================================================== */ +/* + * 段落、清單、圖表、引用區塊 + * Paragraphs, lists, figures and blockquotes + */ +html:lang(zh) .poem-like p, +html:lang(zh) p.poem-like, +html:lang(jp) .poem-like p, +html:lang(jp) p.poem-like { + margin-left: 2em; } +html:lang(zh) ol, +html:lang(zh) ul, +html:lang(jp) ol, +html:lang(jp) ul { + padding-left: 2em; } +html:lang(zh) article p, +html:lang(zh) article li, +html:lang(jp) article p, +html:lang(jp) article li { + line-height: 2; } +html:lang(zh) figure, +html:lang(zh) blockquote, +html:lang(jp) figure, +html:lang(jp) blockquote { + margin-left: 2em; + margin-right: 2em; + width: auto; } + html:lang(zh) figure blockquote, + html:lang(zh) blockquote blockquote, + html:lang(jp) figure blockquote, + html:lang(jp) blockquote blockquote { + margin-left: 1em; + margin-right: 1em; } +html:lang(zh) article blockquote, +html:lang(jp) article blockquote { + margin-right: 0; } +html:lang(zh) figure blockquote, +html:lang(jp) figure blockquote { + margin: 0; } +@media only screen and (max-width: 480px) { + html:lang(zh) .poem-like p, + html:lang(zh) p.poem-like, + html:lang(zh) blockquote, + html:lang(jp) .poem-like p, + html:lang(jp) p.poem-like, + html:lang(jp) blockquote { + margin-left: 1em; + margin-right: 1em; } } + +html:lang(jp).poem-like p, +html:lang(jp) .poem-like p, +html:lang(jp) p.poem-like, +html:lang(jp) blockquote { + margin-left: 1em; } + +/* + * 聯絡資訊 + * Contact information + */ +address:lang(zh), address:lang(ja) { + font-style: inherit; } + +/* + * 增進代碼區塊的易讀性 + * Enhance the readability of code blocks + */ +pre code { + display: block; + overflow: auto; + white-space: pre; + word-wrap: normal; } + +/* 字級語意元素及修訂元素 + * Text-level semantics & edits + * ========================================================================== */ +/* + * 連結、增訂 + * Hyperlinks and insertion + */ +html:lang(zh) a, +html:lang(zh) ins { + text-decoration: inherit; } +html:lang(zh) ins { + border-bottom: 3px double lightgrey; + padding-bottom: 0.05em; } + +/* + * 強調 + * Emphases + */ +em:lang(zh), +em:lang(ja) { + font-style: inherit; + border-bottom-style: dotted; + border-bottom-width: 2px; + padding-bottom: 0.05em; + -moz-text-emphasis: circle; + -webkit-text-emphasis: circle; + text-emphasis: circle; + -moz-text-emphasis-position: under; + -webkit-text-emphasis-position: under; + text-emphasis-position: under; + border-bottom-width: -webkit-calc(0px ); } + +em:lang(ja) { + -moz-text-emphasis: sesame; + -webkit-text-emphasis: sesame; + text-emphasis: sesame; + -moz-text-emphasis-position: over; + -webkit-text-emphasis-position: over; + text-emphasis-position: over; } + +/* + * 文章內重點 + * Importance in article + */ +article strong *:lang(zh), +article strong *:lang(ja) { + font-family: sans-serif; } + +/* + * 來源 + * Cites + */ +cite:lang(zh), cite:lang(ja), cite:lang(en).piece { + font-style: inherit; } +cite:lang(zh):before, cite:lang(zh):after { + content: "\300a"; + font-family: inherit; + line-height: inherit; } +cite:lang(zh):after { + content: "\300b"; } +cite:lang(zh).piece:before { + content: "\3008"; } +cite:lang(zh).piece:after { + content: "\3009"; } +cite:lang(ja):before { + content: "\300e"; } +cite:lang(ja):after { + content: "\300f"; } +cite:lang(ja).piece:before { + content: "\300c"; } +cite:lang(ja).piece:after { + content: "\300d"; } +cite:lang(en).piece:before, cite:lang(en).piece:after { + content: "\201c"; + font-family: inherit; } +cite:lang(en).piece:after { + content: "\201d"; } +cite:lang(en-GB).piece:before { + content: "\2018"; } +cite:lang(en-GB).piece:after { + content: "\2019"; } + +.no-cite-mark cite:before, .no-cite-mark cite:after, +cite.no-cite-mark:before, +cite.no-cite-mark:after { + content: "" !important; } + +/* + * 引用 + * Quotes + */ +q { + quotes: "\201c" "\201d" "\2018" "\2019" "\201c" "\201d" "\2018" "\2019" "\201c" "\201d" "\2018" "\2019"; } + q:lang(zh) { + quotes: "\300c" "\300d" "\300e" "\300f" "\300c" "\300d" "\300e" "\300f" "\300c" "\300d" "\300e" "\300f"; } + q:lang(zh-CN), q:lang(zh-Hans), q:lang(en) { + quotes: "\201c" "\201d" "\2018" "\2019" "\201c" "\201d" "\2018" "\2019" "\201c" "\201d" "\2018" "\2019"; } + q:lang(en-GB) { + quotes: "\2018" "\2019" "\201c" "\201d" "\2018" "\2019" "\201c" "\201d" "\2018" "\2019" "\201c" "\201d"; } + q:before { + content: open-quote; } + q:after { + content: close-quote; } + q:lang(ja):before, q:lang(ja):after { + content: none; } + +/* + * 術語 + * Definitions + */ +dfn:lang(zh), dfn:lang(ja) { + font-style: inherit; + font-weight: bold; } + +/* + * 代碼、輸入鍵、計算機輸出示例、格式預處理文字 + * Code, user input, computer output, preformatted text + */ +code, +kbd, +samp, +pre { + font-family: monospace, sans-serif; } + +/* + * 變音文字及變數 + * Alternative voices & Variables + */ +i, +var { + font-family: cursive, serif; + font-style: inherit; } + +/* + * 註記及增訂 + * Annotations & insertion + */ +*:lang(zh) u, +*:lang(zh) ins, +*:lang(ja) u, +*:lang(ja) ins { + border-bottom: 1px solid; + padding-bottom: 0.05em; + text-decoration: none; } + *:lang(zh) u + u, + *:lang(zh) u + ins, + *:lang(zh) ins + u, + *:lang(zh) ins + ins, + *:lang(ja) u + u, + *:lang(ja) u + ins, + *:lang(ja) ins + u, + *:lang(ja) ins + ins { + margin-left: 0.125em; } + +/* + * 小字標注 + * Ruby annotations + */ +ruby > rt:before { + content: "\ff08"; } +ruby > rt:after { + content: "\ff09"; } +ruby > rbc + rtc:before { + content: "\ff08"; } +ruby > rtc:after { + content: "\ff0c"; } +ruby > rtc:last-of-type:after { + content: "\ff09"; } +ruby > rt:before, ruby > rt:after { + display: inline-block; + overflow: hidden; + vertical-align: middle; + height: 0; + width: 0; + height: -moz-calc(1.3em ); + width: -moz-calc(1em ); } + +/* 功能支援偵測 + * Feature detection of browsers + * ========================================================================== */ +@font-face { + font-family: han-unicode-range; + src: local(Arial), local("Droid Sans"); } + +@font-face { + font-family: han-unicode-range; + src: local("Times New Roman"), local(Times), local("Droid Serif"); + unicode-range: U+270C; } + +/* 元素樣式修正 + * Style correction for elements + * ========================================================================== */ +/* + * 着重號 + * Text emphases + */ +html.han-js-rendered em:lang(zh) { + border-bottom-width: 0; + padding-bottom: 0; } + html.han-js-rendered em:lang(zh) span.biaodian, + html.han-js-rendered em:lang(zh) span.punct { + -moz-text-emphasis: none; + -webkit-text-emphasis: none; + text-emphasis: none; + -moz-text-emphasis-position: under; + -webkit-text-emphasis-position: under; + text-emphasis-position: under; } +.no-textemphasis em:lang(zh) { + line-height: 2; } + .no-textemphasis em:lang(zh) span.jinze, + .no-textemphasis em:lang(zh) span.latin.word { + display: inline-block; } + .no-textemphasis em:lang(zh) span.char { + font-style: inherit; + position: relative; } + .no-textemphasis em:lang(zh) span.char:after { + display: inline-block; + left: 0; + margin: .4em 0 0 0; + overflow: hidden; + position: absolute; + text-indent: 0; + top: 0; + height: 1.9em; + -moz-text-emphasis: none; + -webkit-text-emphasis: none; + text-emphasis: none; + -moz-text-emphasis-position: under; + -webkit-text-emphasis-position: under; + text-emphasis-position: under; + font-style: normal; + font-weight: normal; + line-height: 1.3; + text-decoration: none; + text-indent: 0; + content: "・"; + font-family: Meiryo, "MS Gothic", "MS Mincho" !important; + line-height: 1.75em; } + .no-textemphasis em:lang(zh) span.latin:after { + left: 50%; + margin: .4em 0 0 -.2em; + text-indent: -0.3em; + width: 0.3em; } + .no-textemphasis em:lang(zh) span.space:after, + .no-textemphasis em:lang(zh) span.biaodian:after, + .no-textemphasis em:lang(zh) span.punct:after { + content: none !important; } +html.han-js-rendered em:lang(ja) { + border-bottom-width: 0; + padding-bottom: 0; } + html.han-js-rendered em:lang(ja) span.biaodian, + html.han-js-rendered em:lang(ja) span.punct { + -moz-text-emphasis: none; + -webkit-text-emphasis: none; + text-emphasis: none; + -moz-text-emphasis-position: under; + -webkit-text-emphasis-position: under; + text-emphasis-position: under; } +.no-textemphasis em:lang(ja) { + line-height: 2; } + .no-textemphasis em:lang(ja) span.jinze, + .no-textemphasis em:lang(ja) span.latin.word { + display: inline-block; } + .no-textemphasis em:lang(ja) span.char { + font-style: inherit; + position: relative; } + .no-textemphasis em:lang(ja) span.char:after { + display: inline-block; + left: 0; + margin: -1.45em 0 0 .32em; + overflow: hidden; + position: absolute; + text-indent: 0; + top: 0; + height: 1.9em; + -moz-text-emphasis: none; + -webkit-text-emphasis: none; + text-emphasis: none; + -moz-text-emphasis-position: under; + -webkit-text-emphasis-position: under; + text-emphasis-position: under; + font-style: normal; + font-weight: normal; + line-height: 1.3; + text-decoration: none; + text-indent: 0; + content: "、"; + font-family: Meiryo, "MS Gothic", "MS Mincho" !important; + line-height: 1.75em; } + .no-textemphasis em:lang(ja) span.latin:after { + left: 50%; + margin: -1.45em 0 0 .1em; + text-indent: -0.3em; + width: 0.3em; } + .no-textemphasis em:lang(ja) span.space:after, + .no-textemphasis em:lang(ja) span.biaodian:after, + .no-textemphasis em:lang(ja) span.punct:after { + content: none !important; } + +/* + * 變音文字及變數 + * Alternative voices & Variables + */ +.no-fontface-kaiti i, +.no-fontface-kaiti var { + border-bottom: 3px double lightgrey; + padding-bottom: 0.05em; } + +/* + * 註記 + * Annotations + */ +html.han-js-rendered u + u, +html.han-js-rendered ins + ins { + margin-left: auto; } +html.han-js-rendered u.adjacent, +html.han-js-rendered ins.adjacent { + margin-left: 0.125em; } + +/* 實驗性底線 + * Experimental underlines + */ +.han-js-rendered.han-lab-underline u.adjacent { + margin-left: auto; } +.han-js-rendered.han-lab-underline u, +.han-js-rendered.han-lab-underline u *, +.han-js-rendered.han-lab-underline u *:before, +.han-js-rendered.han-lab-underline u *:after { + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; + box-sizing: content-box; } + +u.han-js-charized { + border-bottom: 0 none; + text-decoration: none; } + u.han-js-charized span.char:not(:first-of-type):not(:last-of-type) span, + u.han-js-charized hanla, + u.han-js-charized span.char:first-of-type span:after, + u.han-js-charized span.char:last-of-type span:after { + border-bottom: 1px solid; + padding-bottom: 0.05em; } + u.han-js-charized span.char:first-of-type span, + u.han-js-charized span.char:last-of-type span { + position: relative; } + u.han-js-charized span.char:first-of-type span:after, + u.han-js-charized span.char:last-of-type span:after { + content: ""; + display: inline-block; + left: 0; + margin-left: 1px; + position: absolute; + top: 0; + height: 100%; + width: -moz-calc(100% - 1px ); + width: -webkit-calc(100% - 1px ); + width: calc(100% - 1px ); } + u.han-js-charized span.char:last-of-type span:after { + margin: 0 1px 0 0; } + u.han-js-charized span.char:first-child:last-child span:after { + margin: 0 1px 0; + width: -moz-calc(100% - 2px ); + width: -webkit-calc(100% - 2px ); + width: calc(100% - 2px ); } + u.han-js-charized *:not(:first-child) span.char:first-of-type span:after, + u.han-js-charized *:not(:last-child) span.char:last-of-type span:after, + u.han-js-charized span.char:not(:first-child):first-of-type span:after, + u.han-js-charized span.char:not(:last-child):last-of-type span:after { + border-bottom: 0; } + u.han-js-charized *:not(:first-child) span.char:first-of-type span, + u.han-js-charized *:not(:last-child) span.char:last-of-type span, + u.han-js-charized span.char:not(:first-child):first-of-type span, + u.han-js-charized span.char:not(:last-child):last-of-type span { + border-bottom: 1px solid; + padding-bottom: 0.125em; } + u.han-js-charized hanla:first-child, + u.han-js-charized hanla:last-child { + border: 0 none; } + u.han-js-charized *:not(:first-child) hanla:first-child, + u.han-js-charized *:not(:last-child) hanla:last-child { + border: 1px solid; } + +/* + * 小字標注 + * Ruby annotations + */ +hruby { + display: inline; + line-height: 2; } + hruby rp { + display: none; } + hruby copy { + display: inline-block; + opacity: 0; + text-indent: -9999999px; + height: 0; + width: 0; } + hruby rb[annotation] { + display: inline-block; + position: relative; + text-indent: 0; } + hruby rb[annotation]:before { + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; + display: inline-block; + left: -200%; + position: absolute; + top: -0.5em; + vertical-align: middle; + -moz-transform: scale(0.55); + -ms-transform: scale(0.55); + -webkit-transform: scale(0.55); + transform: scale(0.55); + height: 1em; + width: 500%; + content: attr(annotation); + line-height: 1.5; + text-align: center; + text-indent: 0; } + hruby[complex] rb[annotation][order="1"]:before { + top: -0.5em; } + hruby[complex] rb[annotation][order="2"]:before { + bottom: -0.25em; + top: auto; } + hruby[rightangle] rb[annotation]:before { + bottom: -0.25em; + top: auto; + margin-left: -0.3em; + line-height: 1; } + hruby rb[zhuyin] { + display: inline-block; + position: relative; + text-indent: 0; + width: 1.7em; } + hruby rb[zhuyin]:before, hruby rb[zhuyin][diao]:after { + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; + display: inline-block; + position: absolute; + right: 0.15em; + top: 0; + -moz-transform: scale(0.55); + -ms-transform: scale(0.55); + -webkit-transform: scale(0.55); + transform: scale(0.55); + height: 2.7em; + width: 0.8em; + -moz-text-emphasis: none; + -webkit-text-emphasis: none; + text-emphasis: none; + -moz-text-emphasis-position: under; + -webkit-text-emphasis-position: under; + text-emphasis-position: under; + font-style: normal; + font-weight: normal; + line-height: 1.3; + text-decoration: none; + text-indent: 0; } + hruby rb[zhuyin]:before { + content: attr(yin); + line-height: 0.9; + white-space: pre-wrap; + word-break: break-all; } + hruby rb[zhuyin][diao]:after { + right: -0.45em; + width: 1em; + content: attr(diao); } + hruby rb[zhuyin][length="1"]:before { + margin-top: 0.25em; } + hruby rb[zhuyin][length="1"]:after { + margin-top: -0.35em; } + hruby rb[zhuyin][length="2"]:before { + margin-top: -0.15em; } + hruby rb[zhuyin][length="2"]:after { + margin-top: 0.125em; } + hruby rb[zhuyin][length="3"]:before { + margin-top: -0.4em; } + hruby rb[zhuyin][length="3"]:after { + margin-top: 0.25em; } + hruby rb[zhuyin][diao="˙"]:after { + right: -0.2em; } + hruby rb[zhuyin][diao="˙"][length="1"]:after { + margin-top: 0; } + hruby rb[zhuyin][diao="˙"][length="2"]:after { + margin-top: -0.25em; } + hruby rb[zhuyin][diao="˙"][length="3"]:after { + margin-top: -0.6em; } + hruby rb[zhuyin][diao="˪"]:after, hruby rb[zhuyin][diao="˫"]:after { + -moz-transform: scale(0.6); + -ms-transform: scale(0.6); + -webkit-transform: scale(0.6); + transform: scale(0.6); + margin-right: -0.15em; } + hruby rb[zhuyin][diao^="ㆴ"]:after, hruby rb[zhuyin][diao^="ㆵ"]:after, hruby rb[zhuyin][diao^="ㆶ"]:after, hruby rb[zhuyin][diao^="ㆷ"]:after, hruby rb[zhuyin][diao="󳆴"]:after, hruby rb[zhuyin][diao="󳆵"]:after, hruby rb[zhuyin][diao="󳆶"]:after, hruby rb[zhuyin][diao="󳆷"]:after { + margin-right: -0.2em; + margin-top: 0.55em; } + @media screen and (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 192dpi) { + hruby rb[zhuyin] { + width: 1.55em; } + hruby rb[zhuyin]:before, hruby rb[zhuyin][diao]:after { + -moz-transform: scale(0.4); + -ms-transform: scale(0.4); + -webkit-transform: scale(0.4); + transform: scale(0.4); + right: 0.05em; + line-height: 0.9; } + hruby rb[zhuyin][diao]:after { + right: -0.45em; } + hruby rb[zhuyin][length="1"]:before { + margin-top: 0; } + hruby rb[zhuyin][length="1"]:after { + margin-top: -0.125em; } + hruby rb[zhuyin][length="2"]:before { + margin-top: -0.2em; } + hruby rb[zhuyin][length="2"]:after { + margin-top: 0; } + hruby rb[zhuyin][length="3"]:after { + margin-top: 0.125em; } + hruby rb[zhuyin][diao="˙"]:after { + right: -0.275em; } + hruby rb[zhuyin][diao="˙"][length="1"]:after { + margin-top: -0.125em; } + hruby rb[zhuyin][diao="˙"][length="2"]:after { + margin-top: -0.25em; } + hruby rb[zhuyin][diao="˙"][length="3"]:after { + margin-top: -0.475em; } + hruby rb[zhuyin][diao="˪"]:after, hruby rb[zhuyin][diao="˫"]:after { + -moz-transform: scale(0.55); + -ms-transform: scale(0.55); + -webkit-transform: scale(0.55); + transform: scale(0.55); + margin-right: -0.15em; } + hruby rb[zhuyin][diao^="ㆴ"]:after, hruby rb[zhuyin][diao^="ㆵ"]:after, hruby rb[zhuyin][diao^="ㆶ"]:after, hruby rb[zhuyin][diao^="ㆷ"]:after, hruby rb[zhuyin][diao="󳆴"]:after, hruby rb[zhuyin][diao="󳆵"]:after, hruby rb[zhuyin][diao="󳆶"]:after, hruby rb[zhuyin][diao="󳆷"]:after { + margin-right: -0.15em; + margin-top: 0.4em; } } + +/* 排版功能 + * Typography + * ========================================================================== */ +/* + * 避頭尾禁則 + * Biaodian rules + */ +.han-js-bitouwei-rendered span.bitouwei { + display: inline-block; + text-indent: 0; } + +.han-js-charized span.char.space, +.han-js-charized span.char > span { + display: inline; } + +/* + * 漢拉間隙 + * Kerning between Hanzi and Latin letter + */ +hanla, html:not(.han-la) hanla { + display: none; } +html.han-la hanla:lang(zh), html.han-la hanla:lang(ja) { + display: inline; + position: static; } +html.han-la hanla:after { + content: " "; + display: inline; + font-family: Arial; + font-size: 0.89em; } + +html.han-la code hanla, +html.han-la pre hanla, +html.han-la kbd hanla, +html.han-la samp hanla { + display: none; } +html.han-la ol > hanla, +html.han-la ul > hanla { + display: none; } + +/* 基礎頁面 + * Base + * ========================================================================== */ +html:lang(zh) { + font-family: "Biaodian Sans", "Helvetica Neue", Helvetica, Arial, "Han Heiti", sans-serif; } +html:lang(ja) { + font-family: "Yakumono Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; } +html.han-biaodian-pro { + font-family: "Biaodian Pro Sans", "Helvetica Neue", Helvetica, Arial, "Han Heiti", sans-serif; } +html.han-biaodian-pro-cns { + font-family: "Biaodian Pro Sans CNS", "Helvetica Neue", Helvetica, Arial, "Han Heiti CNS", sans-serif; } +html.han-biaodian-pro-gb { + font-family: "Biaodian Pro Sans GB", "Helvetica Neue", Helvetica, Arial, "Han Heiti GB", sans-serif; } +html:not(:lang(zh)):not(:lang(ja)), +html *:not(:lang(zh)):not(:lang(ja)) { + font-family: "Helvetica Neue", Helvetica, Arial, "Han Heiti", sans-serif; } + +/* 內容群組元素 + * Grouping content + * ========================================================================== */ +/* + * 引用區塊 + * Blockquotes + */ +article blockquote:lang(zh) { + font-family: "Biaodian Serif", Georgia, Times, "Times New Roman", "Han Kaiti", cursive, "Han Songti", serif; } +article blockquote:lang(ja) { + font-family: 'Yakumono Serif', 'Numeral LF Serif', Georgia, 'Times New Roman', serif; } +html.han-biaodian-pro article blockquote { + font-family: 'Biaodian Pro Serif', 'Numeral LF Serif', Georgia, 'Times New Roman', 'Han Kaiti', cursive, serif; } +html.han-biaodian-pro-cns article blockquote { + font-family: 'Biaodian Pro Serif CNS', 'Numeral LF Serif', Georgia, 'Times New Roman', 'Han Kaiti CNS', cursive, serif; } +html.han-biaodian-pro-gb article blockquote { + font-family: 'Biaodian Pro Serif GB', 'Numeral LF Serif', Georgia, 'Times New Roman', 'Han Kaiti GB', cursive, serif; } +article blockquote:not(:lang(zh)):not(:lang(ja)), +article blockquote *:not(:lang(zh)):not(:lang(ja)) { + font-family: Georgia, Times, "Times New Roman", "Han Kaiti", cursive, "Han Songti", serif; } + +article figure blockquote:lang(zh) { + font-family: "Biaodian Serif", Georgia, Times, "Times New Roman", "Han Songti", serif; } +article figure blockquote:lang(ja) { + font-family: 'Yakumono Serif', 'Numeral LF Serif', Georgia, 'Times New Roman', serif; } +html.han-biaodian-pro article figure blockquote { + font-family: 'Biaodian Pro Serif', 'Numeral LF Serif', Georgia, 'Times New Roman', 'Han Songti', serif; } +html.han-biaodian-pro-cns article figure blockquote { + font-family: 'Biaodian Pro Serif CNS', 'Numeral LF Serif', Georgia, 'Times New Roman', 'Han Songti CNS', serif; } +html.han-biaodian-pro-gb article figure blockquote { + font-family: 'Biaodian Pro Serif GB', 'Numeral LF Serif', Georgia, 'Times New Roman', 'Han Songti GB', serif; } + +article figure figcaption:lang(zh) { + font-family: "Biaodian Sans", "Helvetica Neue", Helvetica, Arial, "Han Heiti", sans-serif; + font-size: 0.85em; } +article figure figcaption:lang(ja) { + font-family: "Yakumono Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 0.85em; } +html.han-biaodian-pro article figure figcaption { + font-family: "Biaodian Pro Sans", "Helvetica Neue", Helvetica, Arial, "Han Heiti", sans-serif; } +html.han-biaodian-pro-cns article figure figcaption { + font-family: "Biaodian Pro Sans CNS", "Helvetica Neue", Helvetica, Arial, "Han Heiti CNS", sans-serif; } +html.han-biaodian-pro-gb article figure figcaption { + font-family: "Biaodian Pro Sans GB", "Helvetica Neue", Helvetica, Arial, "Han Heiti GB", sans-serif; } +article figure figcaption:not(:lang(zh)):not(:lang(ja)), +article figure figcaption *:not(:lang(zh)):not(:lang(ja)) { + font-family: Georgia, Times, "Times New Roman", "Han Kaiti", cursive, "Han Songti", serif; } + +/* 字級語意元素 + * Text-level semantics + * ========================================================================== */ +/* + * 強調 + * Emphases + */ +.no-textemphasis em:lang(zh) span.cjk:after, +.no-textemphasis em:lang(zh) span.latin:after, .no-textemphasis em:lang(ja) span.cjk:after, +.no-textemphasis em:lang(ja) span.latin:after { + font-family: "Hiragino Mincho ProN", "Hiragino Mincho Pro", Meiryo, "MS Gothic", "MS Mincho" serif !important; } + +/* + * 來源 + * Cites + */ +cite:lang(en).piece:before, cite:lang(en).piece:after { + font-family: Georgia, Times, "Times New Roman", serif; } + +/* + * 文章內重點 + * Importance in article + */ +article strong:lang(zh) { + font-family: "Biaodian Sans", "Helvetica Neue", Helvetica, Arial, "Han Heiti", sans-serif; } +article strong:lang(ja) { + font-family: "Yakumono Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; } +html.han-biaodian-pro article strong { + font-family: "Biaodian Pro Sans", "Helvetica Neue", Helvetica, Arial, "Han Heiti", sans-serif; } +html.han-biaodian-pro-cns article strong { + font-family: "Biaodian Pro Sans CNS", "Helvetica Neue", Helvetica, Arial, "Han Heiti CNS", sans-serif; } +html.han-biaodian-pro-gb article strong { + font-family: "Biaodian Pro Sans GB", "Helvetica Neue", Helvetica, Arial, "Han Heiti GB", sans-serif; } +article strong:not(:lang(zh)):not(:lang(ja)), +article strong *:not(:lang(zh)):not(:lang(ja)) { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; } + +/* + * 代碼、輸入鍵、計算機輸出示例、格式預處理文字 + * Code, user input, computer output, preformatted text + */ +code, +kbd, +pre, +samp { + font-family: Menlo, Courier, "Helvetica Neue", Helvetica, Arial, "Han Heiti", sans-serif, sans-serif; } + code:lang(zh), + kbd:lang(zh), + pre:lang(zh), + samp:lang(zh) { + font-family: "Biaodian Sans", Menlo, Courier, "Helvetica Neue", Helvetica, Arial, "Han Heiti", sans-serif, sans-serif; } + code:lang(ja), + kbd:lang(ja), + pre:lang(ja), + samp:lang(ja) { + font-family: "Yakumono Sans", Menlo, Courier; } + html.han-biaodian-pro code, html.han-biaodian-pro + kbd, html.han-biaodian-pro + pre, html.han-biaodian-pro + samp { + font-family: "Biaodian Pro Sans", Menlo, Courier, "Helvetica Neue", Helvetica, Arial, "Han Heiti", sans-serif, sans-serif; } + html.han-biaodian-pro-cns code, html.han-biaodian-pro-cns + kbd, html.han-biaodian-pro-cns + pre, html.han-biaodian-pro-cns + samp { + font-family: "Biaodian Pro Sans CNS", Menlo, Courier, "Helvetica Neue", Helvetica, Arial, "Han Heiti", sans-serif, sans-serif; } + html.han-biaodian-pro-gb code, html.han-biaodian-pro-gb + kbd, html.han-biaodian-pro-gb + pre, html.han-biaodian-pro-gb + samp { + font-family: "Biaodian Pro Sans GB", Menlo, Courier, "Helvetica Neue", Helvetica, Arial, "Han Heiti", sans-serif, sans-serif; } + code:not(:lang(zh)):not(:lang(ja)), + code *:not(:lang(zh)):not(:lang(ja)), + kbd:not(:lang(zh)):not(:lang(ja)), + kbd *:not(:lang(zh)):not(:lang(ja)), + pre:not(:lang(zh)):not(:lang(ja)), + pre *:not(:lang(zh)):not(:lang(ja)), + samp:not(:lang(zh)):not(:lang(ja)), + samp *:not(:lang(zh)):not(:lang(ja)) { + font-family: Menlo, Courier, "Helvetica Neue", Helvetica, Arial, "Han Heiti", sans-serif, sans-serif; } + +/* + * 變音文字及變數 + * Alternative voices & Variables + */ +i:lang(zh), +var:lang(zh) { + font-family: "Biaodian Serif", "Latin Italic Serif", Georgia, Times, "Times New Roman", "Han Kaiti", cursive, "Han Songti", serif; } +i:lang(ja), +var:lang(ja) { + font-family: "Yakumono Serif", "Latin Italic Serif", cursive, serif; } +html.han-biaodian-pro i, html.han-biaodian-pro +var { + font-family: "Biaodian Pro Serif", "Latin Italic Serif", Georgia, Times, "Times New Roman", "Han Kaiti", cursive, "Han Songti", serif; } +html.han-biaodian-pro-cns i, html.han-biaodian-pro-cns +var { + font-family: "Biaodian Pro Sans CNS", "Latin Italic Serif", Georgia, Times, "Times New Roman", "Han Kaiti", cursive, "Han Songti", serif; } +html.han-biaodian-pro-gb i, html.han-biaodian-pro-gb +var { + font-family: "Biaodian Pro Sans GB", "Latin Italic Serif", Georgia, Times, "Times New Roman", "Han Kaiti", cursive, "Han Songti", serif; } +i:not(:lang(zh)):not(:lang(ja)), +var:not(:lang(zh)):not(:lang(ja)) { + font-family: "Latin Italic Sans", "Helvetica Neue", Helvetica, Arial, "Han Heiti", sans-serif; } +i *:not(:lang(zh)):not(:lang(ja)), +var *:not(:lang(zh)):not(:lang(ja)) { + font-family: "Latin Italic Serif", Georgia, Times, "Times New Roman", "Han Songti", serif; } + +article blockquote i:lang(zh), +article blockquote var:lang(zh) { + font-family: "Biaodian Sans", "Latin Italic Sans", "Helvetica Neue", Helvetica, Arial, "Han Heiti", sans-serif; } +article blockquote i:lang(ja), +article blockquote var:lang(ja) { + font-family: "Yakumono Sans", "Latin Italic Sans", sans-serif; } +html.han-biaodian-pro article blockquote i, html.han-biaodian-pro +article blockquote var { + font-family: "Biaodian Pro Sans", "Latin Italic Sans", "Helvetica Neue", Helvetica, Arial, "Han Heiti", sans-serif; } +html.han-biaodian-pro-cns article blockquote i, html.han-biaodian-pro-cns +article blockquote var { + font-family: "Biaodian Pro Sans CNS", "Latin Italic Sans", "Helvetica Neue", Helvetica, Arial, "Han Heiti", sans-serif; } +html.han-biaodian-pro-gb article blockquote i, html.han-biaodian-pro-gb +article blockquote var { + font-family: "Biaodian Pro Sans GB", "Latin Italic Sans", "Helvetica Neue", Helvetica, Arial, "Han Heiti", sans-serif; } +article blockquote i:not(:lang(zh)):not(:lang(ja)), +article blockquote var:not(:lang(zh)):not(:lang(ja)) { + font-family: "Latin Italic Serif", Georgia, Times, "Times New Roman", "Han Songti", serif; } +article blockquote i *:not(:lang(zh)):not(:lang(ja)), +article blockquote var *:not(:lang(zh)):not(:lang(ja)) { + font-family: "Latin Italic Sans", "Helvetica Neue", Helvetica, Arial, "Han Heiti", sans-serif; } + +/* + * 小字標注 + * Ruby annotations + */ +hruby[generic] rb[zhuyin]:after { + font-family: "Zhuyin Kaiti", cursive, serif; } +hruby[generic="sans"] rb[zhuyin]:before, +hruby[generic="sans"] rb[diao^="ㆴ"]:after, +hruby[generic="sans"] rb[diao^="ㆵ"]:after, +hruby[generic="sans"] rb[diao^="ㆶ"]:after, +hruby[generic="sans"] rb[diao^="ㆷ"]:after, +hruby[generic="sans"] rb[diao="󳆴"]:after, +hruby[generic="sans"] rb[diao="󳆵"]:after, +hruby[generic="sans"] rb[diao="󳆶"]:after, +hruby[generic="sans"] rb[diao="󳆷"]:after { + font-family: "Zhuyin Heiti", sans-serif; } +hruby[generic] rb[diao^="ㆴ"]:after, +hruby[generic] rb[diao^="ㆵ"]:after, +hruby[generic] rb[diao^="ㆶ"]:after, +hruby[generic] rb[diao^="ㆷ"]:after { + -moz-font-feature-settings: "liga, dlig"; + -ms-font-feature-settings: "liga", "dlig"; + -webkit-font-feature-settings: "liga", "dlig"; + font-feature-settings: "liga", "dlig"; + font-family: "Zhuyin Kaiti", cursive, serif; } +hruby[generic="serif"] rb[zhuyin]:before { + font-family: "Zhuyin Kaiti", cursive, serif; } diff --git a/ajax/libs/Han/2.3.0/han.js b/ajax/libs/Han/2.3.0/han.js new file mode 100644 index 000000000..8766f8fbb --- /dev/null +++ b/ajax/libs/Han/2.3.0/han.js @@ -0,0 +1,1415 @@ + + +/*! + * 漢字標準格式 v2.3 + * Hanzi-optimised CSS Mode + * + * Lisence: MIT Lisence + * Last-Modified: 2014/2/7 + */ + +;(function(window, $){ + var version = '2.3', + + tests = [], + rubies, + + unicode = [], + + rendered = 'han-js-rendered', + classes = [rendered], + fontfaces = [], + + + han = function() { + $(document).on('ready', function(){ + + // `unicode-range` + classes.push( ( test_for_unicoderange() ? '' : 'no-' ) + 'unicoderange' ) + + // The 4(-1) Typefaces + fontfaces['songti'] = test_for_fontface( 'Han Songti' ) + fontfaces['kaiti'] = test_for_fontface( 'Han Kaiti' ) + fontfaces['fangsong'] = test_for_fontface( 'Han Fangsong' ) + + for ( var font in fontfaces ) { + classes.push( ( fontfaces[font] ? '' : 'no-' ) + 'fontface-' + font ) + } + + // altogether + $('html').addClass( classes.join(' ') ) + + init() + }) + }, + + + init = function( range ) { + if ( !range && $('html').hasClass('no-han-init') ) + return + + var range = range || 'body' + + if ( range !== 'body' && !$(range).hasClass(rendered) ) + $(range).addClass(rendered) + else if ( range === 'body' && !$('html').hasClass(rendered) ) + $('html').addClass(rendered) + + + + /* + * 加強漢字註音功能 + * --- + * Enhance `` element + * + * **注意:**需置於``的hack前。 + * + * **Note:** The necessity of being + * placed before the hack of + * the `` element is required. + */ + + // 語意類別簡化 + var _ruby = $(range).find('ruby, rtc') + _ruby.filter('.pinyin').addClass('romanization') + _ruby.filter('.mps').addClass('zhuyin') + _ruby.filter('.romanization').addClass('annotation') + + $(range).find('ruby').each(function() { + var html = $(this).html(), + that = $(this), + hruby = document.createElement('hruby') + + // 羅馬拼音(在不支援``的瀏覽器下) + if ( !tests['ruby']() && + !that.hasClass('complex') && + !that.hasClass('zhuyin') && + !that.hasClass('rightangle') ) { + + // 將拼音轉為元素屬性以便CSS產生偽類 + that + .find('rt') + .each(function(){ + var anno = $(this).html(), + prev = this.previousSibling, + text = prev.nodeValue + + prev.nodeValue = '' + + $(prev).before( + $('') + .html( text ) + .attr('annotation', anno) + .replaceWith(_copy) + ) + + $(this).replaceWith( + _copy().html(anno) + ) + }) + + that + .replaceWith( + $(hruby) + .html( $(this).html() ) + ) + + } else { + var attr = {} + + // 國語注音、台灣方言音符號 + if ( that.hasClass('zhuyin') ) { + // 將注音轉為元素屬性以便CSS產生偽類 + that.find('rt') + .each(function(){ + _apply_zhuyin(this) + }) + + // 雙行文字註記 + } else if ( that.hasClass('complex') ) { + attr.complex = 'complex' + + _apply_annotation(this) + + + // 拼音、注音直角顯示 + } else if ( that.hasClass('rightangle') ) { + attr.rightangle = 'rightangle' + + + // 國語注音、台灣方言音符號 + that.find('rtc.zhuyin') + .hide() + .each(function(){ + var t = $(this).prevAll('rbc'), + c, len, data + + $(this).find('rt') + .each(function(i){ + var rb = t.find('rb:not([annotation])').eq(i) + if($(this).html()) _apply_zhuyin( this, rb ) + }) + + $(this).nextAll('rt') + .each(function(i){ + var rb = t.find('rb:not([annotation])').eq(i) + if($(this).html()) _apply_zhuyin( this, rb ) + }) + }) + + // 羅馬拼音或文字註記 + _apply_annotation(this) + } + + // 以``元素替代``,避免UA原生樣式的干擾 + that.filter(function(){ + return $(this).hasClass("zhuyin") || + $(this).hasClass("complex") || + $(this).hasClass("rightangle") + }).replaceWith( + $(hruby) + .html( $(this).html().replace(/(.*<\/rbc>).*/, '$1') ) + .attr('generic', _get_zhuyin_font(this)) + .attr(attr) + ) + } + }) + + + + /* + * 漢拉間隙 + * --- + * Kerning between Hanzi and Latin Letter + * + */ + + if ( $('html').hasClass('han-la') ) + $(range).each(function(){ + var hanzi = unicode_set('hanzi'), + latin = unicode_set('latin') + '|' + unicode['punc'][0], + punc = unicode['punc'] + + patterns = [ + '/(' + hanzi + ')(' + latin + '|' + punc[1] + ')/ig', + '/(' + latin + '|' + punc[2] + ')(' + hanzi + ')/ig' + ] + + + patterns.forEach(function( exp ){ + findAndReplaceDOMText(this, { + find: eval(exp), + replace: '$1$2' + }) + }, this) + + findAndReplaceDOMText(this, { + find: '', + replace: function(){ + return document.createElement('hanla') + } + }) + + this.normalize() + + $('* > hanla:first-child').parent().each(function(){ + if ( this.firstChild.nodeType == 1 ) { + $(this).before( $('') ) + $(this).find('hanla:first-child').remove() + } + }) + }) + + + + /* + * 修正相鄰註記元素``的底線相連問題 + * --- + * fixing the underline-adjacency issue on `` element + * + */ + + if ( $('html').hasClass('han-lab-underline') ) + $(range).find('u').charize({'bitouwei': false}, true, true) + + $(range).find('u, ins').each(function(){ + var next = this.nextSibling + + while ( next != null && ( next.nodeName === "WBR" || next.nodeType == 8 )) + next = next.nextSibling + + $(next).filter('u, ins').addClass('adjacent') + }) + + + + /* 強調元素``的着重號 + * --- + * punctuation: CJK emphasis dots on `` element + * + */ + + $(range).find('em').charize({ + latin: ( tests['textemphasis']() ) ? 'none' : 'individual' + }) + }, + + + + unicode_set = function( set ) { + var join = ( set.match(/[hanzi|latin]/) ) ? true : false, + result = ( join ) ? unicode[set].join('|') : unicode[set] + + return result + }, + + + _span = function( className ) { + var span = document.createElement('span') + span.className = className + + return span + }, + + + _copy = function() { + return $(document.createElement('copy')) + }, + + + _apply_annotation = function( node ) { + $(node).find('rbc').find('rb') + .each(function(i){ + $(this).attr('index', i) + }) + + $(node).find('rtc:not(.zhuyin)') + .hide() + .each(function(t){ + var c = 0, + rtc = $(this), + rbc = $(this).prevAll('rbc'), + len = $(this).find('rt').length || $(this).nextAll('rt').length, + data = [] + + $(this).find('rt') + .each(function(h){ + var anno = $(this).html(), + rbspan = $(this).attr('rbspan') || 1, + i = c + + c += Number(rbspan) + + data[h] = { + 'annotation': anno, + 'order': (t==0) ? '1' : '2' + } + + for ( var j=i; j') + .attr( data[k] ) + ) + } + }) + .remove() + + $(node).find('rb') + .removeAttr('set index') + .filter('rb[annotation]') + .each(function(){ + var t = $(this).attr('annotation') + $(this).after( _copy().html( t ) ) + }) + }, + + + _get_zhuyin_font = function( node ) { + var reg = /(sans-serif|monospace)$/, + generic = $(node).css('font-family'), + font = generic.match(reg) ? 'sans' : 'serif' + + return font + }, + + + _apply_zhuyin = function( node, rb ) { + var sm = unicode['zhuyin']['shengmu'], + jy = unicode['zhuyin']['jieyin'], + ym = unicode['zhuyin']['yunmu'], + yj = unicode['zhuyin']['yunjiao'], + tone = unicode['zhuyin']['diao'], + + prev, text, zi, + zy = $(node).html(), + yin, diao, form, length, data + + form = ( zy.match(eval('/(' + sm + ')/')) ) ? 'shengmu' : '' + form += ( zy.match(eval('/(' + jy + ')/')) ) ? (( form !== '' ) ? '-' : '') + 'jieyin' : '' + form += ( zy.match(eval('/(' + ym + ')/')) ) ? (( form !== '' ) ? '-' : '') + 'yunmu' : '' + + yin = zy + .replace(eval('/(' + tone + ')/g'), '') + .replace(eval('/(' + yj + '[\u0358\u030d]?)/g'), '') + + length = (yin) ? yin.length : 0 + + diao = ( zy.match(/(\u02D9)/) ) ? '\u02D9' : + ( zy.match(/(\u02CA)/) ) ? '\u02CA' : + ( zy.match(/([\u02C5\u02C7])/) ) ? '\u02C7' : + ( zy.match(/(\u02CB)/) ) ? '\u02CB' : + ( zy.match(/(\u02EA)/) ) ? '\u02EA' : + ( zy.match(/(\u02EB)/) ) ? '\u02EB' : + ( zy.match(/(\u31B4[\u0358\u030d])/) ) ? '\u31B4\u0358' : + ( zy.match(/(\u31B5[\u0358\u030d])/) ) ? '\u31B5\u0358' : + ( zy.match(/(\u31B6[\u0358\u030d])/) ) ? '\u31B6\u0358' : + ( zy.match(/(\u31B7[\u0358\u030d])/) ) ? '\u31B7\u0358' : + ( zy.match(/(\u31B4)/) ) ? '\u31B4' : + ( zy.match(/(\u31B5)/) ) ? '\u31B5' : + ( zy.match(/(\u31B6)/) ) ? '\u31B6' : + ( zy.match(/(\u31B7)/) ) ? '\u31B7' : '' + + data = { + 'zhuyin': zy, + 'yin': yin, + 'diao': diao, + 'length': length, + 'form': form + } + + if ( rb ) + rb + .attr(data) + .append( _copy().html( zy ) ) + else { + prev = node.previousSibling + text = prev.nodeValue.split('') + zi = text.pop() + prev.nodeValue = text.join('') + + $(node) + .before( + $('') + .attr(data) + .text( zi ) + ) + .replaceWith( _copy().html( zy ) ) + } + }, + + + findAndReplaceDOMText = function( a, b ) { + var b = b + + b.filterElements = function( el ) { + var name = el.nodeName.toLowerCase(), + classes = ( el.nodeType == 1 ) ? el.getAttribute('class') : '', + charized = ( classes && classes.match(/han-js-charized/) != null ) ? true : false + + return name !== 'style' && name !== 'script' && !charized + } + + return window.findAndReplaceDOMText(a,b) + }, + + + inject_element_with_styles = function( rule, callback, nodes, testnames ) { + var style, ret, node, docOverflow, + + docElement = document.documentElement, + div = document.createElement('div'), + body = document.body, + fakeBody = body || document.createElement('body') + + + style = [''].join('') + + ;(body ? div : fakeBody).innerHTML += style + fakeBody.appendChild(div) + + if ( !body ) { + fakeBody.style.background = '' + fakeBody.style.overflow = 'hidden' + docOverflow = docElement.style.overflow + docElement.style.overflow = 'hidden' + docElement.appendChild(fakeBody) + } + + ret = callback(div, rule) + + if ( !body ) { + fakeBody.parentNode.removeChild(fakeBody) + docElement.style.overflow = docOverflow + } else + div.parentNode.removeChild(div) + + return !!ret + }, + + + write_on_canvas = function( text, font ) { + var canvasNode = document.createElement('canvas') + canvasNode.width = '50' + canvasNode.height = '20' + + canvasNode.style.display = 'none' + canvasNode.className = 'han_support_tests' + document.body.appendChild(canvasNode) + var ctx = canvasNode.getContext('2d') + + ctx.textBaseline = 'top' + ctx.font = '15px ' + font + ', sans-serif' + ctx.fillStyle = 'black' + ctx.strokeStyle = 'black' + + ctx.fillText( text, 0, 0 ) + + return ctx + }, + + + test_for_fontface = function( test, compare, zi ) { + if ( !tests['fontface']() ) + return false + + var test = test, + compare = compare || 'sans-serif', + zi = zi || '辭Q' + + try { + var sans = write_on_canvas( zi, compare ), + test = write_on_canvas( zi, test ), + support + + for (var j=1; j<=20; j++) { + for (var i=1; i<=50; i++) { + var sansData = sans.getImageData(i, j, 1, 1).data, + testData = test.getImageData(i, j, 1, 1).data, + + alpha = [] + + alpha['sans'] = sansData[3] + alpha['test'] = testData[3] + + if ( support !== 'undefined' && alpha['test'] != alpha['sans'] ) + support = true + else if ( support ) + break + if ( i == 20 && j == 20 && !support ) + support = false + } + } + + $('canvas.han_support_tests').remove() + return support + } catch ( err ) { + return false + } + } + + + test_for_unicoderange = function() { + return !test_for_fontface( 'han-unicode-range', 'Arial, "Droid Sans"', 'a' ) + } + + + /** + * -------------------------------------------------------- + * Unicode區段說明(6.2.0) + * Unicode blocks + * -------------------------------------------------------- + * 或參考: + * http://css.hanzi.co/manual/api/javascript_jiekou-han.unicode + * -------------------------------------------------------- + * + ** 以下歸類為「拉丁字母」(`unicode('latin')`)** + * + * 基本拉丁字母:a-z + * 阿拉伯數字:0-9 + * 拉丁字母補充-1:[\u00C0-\u00FF] + * 拉丁字母擴展-A區:[\u0100-\u017F] + * 拉丁字母擴展-B區:[\u0180-\u024F] + * 拉丁字母附加區:[\u1E00-\u1EFF] + * + ** 符號:[~!@#&=_\$\%\^\*\-\+\,\.\/(\\)\?\:\'\"\[\]\(\)'"<>‘“”’] + * + * -------------------------------------------------------- + * + ** 以下歸類為「漢字」(`unicode('hanzi')`)** + * + * CJK一般:[\u4E00-\u9FFF] + * CJK擴展-A區:[\u3400-\u4DB5] + * CJK擴展-B區:[\u20000-\u2A6D6] + * CJK Unicode 4.1:[\u9FA6-\u9FBB]、[\uFA70-\uFAD9] + * CJK Unicode 5.1:[\u9FBC-\u9FC3] + * CJK擴展-C區:[\u2A700-\u2B734] + * CJK擴展-D區:[\u2B740-\u2B81D](急用漢字) + * CJK擴展-E區:[\u2B820-\u2F7FF](**註**:暫未支援) + * CJK擴展-F區(**註**:暫未支援) + * CJK筆畫區:[\u31C0-\u31E3] + * 數字「〇」:[\u3007] + * 日文假名:[\u3040-\u309E][\u30A1-\u30FA][\u30FD\u30FE](**註**:排除片假名中點、長音符) + * + * CJK相容表意文字: + * [\uF900-\uFAFF](**註**:不使用) + * [\uFA0E-\uFA0F\uFA11\uFA13-\uFA14\uFA1F\uFA21\uFA23-\uFA24\uFA27-\uFA29](**註**:12個例外) + * -------------------------------------------------------- + * + ** 符號 + * [·・︰、,。:;?!—⋯….·「『(〔【《〈“‘」』)〕】》〉’”–ー—] + * + ** 其他 + * + * 漢語注音符號、擴充:[\u3105-\u312D][\u31A0-\u31BA] + * 國語五聲調(三聲有二種符號):[\u02D9\u02CA\u02C5\u02C7\u02CB] + * 台灣漢語方言音擴充聲調:[\u02EA\u02EB] + * + */ + + unicode['latin'] = [ + '[A-Za-z0-9\u00C0-\u00FF\u0100-\u017F\u0180-\u024F\u1E00-\u1EFF]' + ] + + unicode['punc'] = [ + '[@&=_\,\.\?\!\$\%\^\*\-\+\/]', + '[\(\\[\'"<‘“]', + '[\)\\]\'">”’]' + ] + + unicode['hanzi'] = [ + '[\u4E00-\u9FFF]', + '[\u3400-\u4DB5\u9FA6-\u9FBB\uFA70-\uFAD9\u9FBC-\u9FC3\u3007\u3040-\u309E\u30A1-\u30FA\u30FD\u30FE\uFA0E-\uFA0F\uFA11\uFA13-\uFA14\uFA1F\uFA21\uFA23-\uFA24\uFA27-\uFA29]', + '[\uD840-\uD868][\uDC00-\uDFFF]|\uD869[\uDC00-\uDEDF]', + '\uD86D[\uDC00-\uDF3F]|[\uD86A-\uD86C][\uDC00-\uDFFF]|\uD869[\uDF00-\uDFFF]', + '\uD86D[\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1F]', + '[\u31C0-\u31E3]' + ] + + unicode['biaodian'] = [ + '[·・︰、,。:;?!—ー⋯….·/]', + '[「『(〔【《〈“‘]', + '[」』)〕】》〉’”]' + ] + + unicode['zhuyin'] = [] + unicode['zhuyin'][0] = '[\u3105-\u312D\u31A0-\u31BA]' + unicode['zhuyin']['shengmu'] = '[\u3105-\u3119\u312A-\u312C\u31A0-\u31A3]' + unicode['zhuyin']['jieyin'] = '[\u3127-\u3129]' + unicode['zhuyin']['yunmu'] = '[\u311A-\u3126\u312D\u31A4-\u31B3\u31B8-\u31BA]' + unicode['zhuyin']['yunjiao'] = '[\u31B4-\u31B7]' + unicode['zhuyin']['diao'] = '[\u02D9\u02CA\u02C5\u02C7\u02CB\u02EA\u02EB]' + + + + /** + * tests for HTML5/CSS3 features + * + */ + + /* CSS3 property: `column-width` */ + tests['columnwidth'] = function() { + var cw = $('
tester
'), + + bool = ( /^200px$/.test( cw.css("-webkit-column-width") ) || + /^200px$/.test( cw.css("-moz-column-width") ) || + /^200px$/.test( cw.css("-ms-column-width") ) || + /^200px$/.test( cw.css("column-width") ) ) ? true : false + + return bool + } + + + /* -------------------------------------------------------- + * test for '@font-face' + * -------------------------------------------------------- + * Originates from Modernizr (http://modernizr.com) + */ + + tests['fontface'] = function() { + var bool + + inject_element_with_styles('@font-face {font-family:"font"; src:url("https://")}', function( node, rule ) { + var style = document.getElementById('han-support'), + sheet = style.sheet || style.styleSheet, + cssText = sheet ? (sheet.cssRules && sheet.cssRules[0] ? sheet.cssRules[0].cssText : sheet.cssText || '') : '' + + bool = /src/i.test(cssText) && cssText.indexOf(rule.split(' ')[0]) === 0 + }) + + return bool + } + + + tests['ruby'] = function() { + if ( rubies != null ) + return rubies + + + var ruby = document.createElement('ruby'), + rt = document.createElement('rt'), + rp = document.createElement('rp'), + docElement = document.documentElement, + displayStyleProperty = 'display' + + ruby.appendChild(rp) + ruby.appendChild(rt) + docElement.appendChild(ruby) + + // browsers that support hide the via "display:none" + rubies = ( getStyle(rp, displayStyleProperty) == 'none' || + // but in IE browsers has "display:inline" so, the test needs other conditions: + getStyle(ruby, displayStyleProperty) == 'ruby' + && getStyle(rt, displayStyleProperty) == 'ruby-text' ) ? true : false + + + docElement.removeChild(ruby) + // the removed child node still exists in memory, so ... + ruby = null + rt = null + rp = null + + return rubies + + + function getStyle( element, styleProperty ) { + var result + + if ( window.getComputedStyle ) // for non-IE browsers + result = document.defaultView.getComputedStyle(element,null).getPropertyValue(styleProperty) + else if ( element.currentStyle ) // for IE + result = element.currentStyle[styleProperty] + + return result + } + } + + + tests['textemphasis'] = function() { + var em = $('tester'), + + bool = ( /^dot$/.test( em.css("-webkit-text-emphasis-style") ) || + /^dot$/.test( em.css("text-emphasis-style") ) || + /^dot$/.test( em.css("-moz-text-emphasis-style") ) || + /^dot$/.test( em.css("-ms-text-emphasis-style") ) ) ? true : false + + return bool + } + + + tests['writingmode'] = function() { + var wm = $('
tester
'), + + bool = ( /^tb-rl$/.test( wm.css("writing-mode") ) || + /^vertical-rl$/.test( wm.css("-webkit-writing-mode") ) || + /^tb-rl$/.test( wm.css("-moz-writing-mode") ) || + /^tb-rl$/.test( wm.css("-ms-writing-mode") ) ) ? true: false + + return bool + } + + + + $.fn.extend({ + hanInit: function() { + return init(this) + }, + + + bitouwei: function() { + return this.each(function(){ + $(this).addClass( 'han-js-bitouwei-rendered' ) + + var tou = unicode['biaodian'][0] + unicode['biaodian'][2], + wei = unicode['biaodian'][1], + start = unicode['punc'][0] + unicode['punc'][2], + end = unicode['punc'][1] + + tou = tou.replace(/\]\[/g, '' ) + start = start.replace(/\]\[/g, '' ) + + + // CJK characters + findAndReplaceDOMText(this, { + find: eval( '/(' + wei + ')(' + unicode_set('hanzi') + ')(' + tou + ')/ig' ), + wrap: _span( 'bitouwei bitouweidian' ) + }) + + findAndReplaceDOMText(this, { + find: eval( '/(' + unicode_set('hanzi') + ')(' + tou + ')/ig' ), + wrap: _span( 'bitouwei bitoudian' ) + }) + + findAndReplaceDOMText(this, { + find: eval( '/(' + wei + ')(' + unicode_set('hanzi') + ')/ig' ), + wrap: _span( 'bitouwei biweidian' ) + }) + + + // Latin letters + findAndReplaceDOMText(this, { + find: eval( '/(' + end + ')(' + unicode_set('latin') + '+)(' + start + ')/ig' ), + wrap: _span( 'bitouwei bitouweidian' ) + }) + + findAndReplaceDOMText(this, { + find: eval( '/(' + unicode_set('latin') + '+)(' + start + ')/ig' ), + wrap: _span( 'bitouwei bitoudian' ) + }) + + findAndReplaceDOMText(this, { + find: eval( '/(' + end + ')(' + unicode_set('latin') + '+)/ig' ), + wrap: _span( 'bitouwei biweidian' ) + }) + }) + }, + + + charize: function( glyph, charClass, innerSpan ){ + var glyph = glyph || {}, + charClass = (charClass == true) ? true : false + + glyph = { + cjk: glyph.cjk || 'individual', + bitouwei: (glyph.bitouwei == false) ? false : true, + latin: glyph.latin || 'group' + } + + return this.each(function(){ + if ( glyph.bitouwei ) + $(this).bitouwei() + + + // CJK characters + if ( glyph.cjk === 'individual' ) + findAndReplaceDOMText(this, { + find: eval( '/(' + unicode_set('hanzi') + ')/ig' ), + wrap: _span( 'char cjk' ) + }) + + + if ( glyph.cjk === 'individual' || glyph.cjk === 'biaodian' ) + findAndReplaceDOMText(this, { + find: eval( '/(' + unicode_set('biaodian') + ')/ig' ), + wrap: _span( 'char cjk biaodian' ) + }) + + + if ( glyph.cjk === 'group' ) + findAndReplaceDOMText(this, { + find: eval( '/(' + unicode_set('hanzi') + '+|' + unicode_set('biaodian') + '+)/ig' ), + wrap: _span( 'char cjk' ) + }) + + + var latin_regex = ( glyph.latin === 'group' ) ? + '/(' + unicode_set('latin') + '+)/ig' : + '/(' + unicode_set('latin') + ')/ig' + + findAndReplaceDOMText(this, { + find: eval( latin_regex ), + wrap: _span( 'char latin' ) + }) + + + findAndReplaceDOMText(this, { + find: eval( '/(' + unicode_set('punc') + '+)/ig' ), + wrap: _span( 'char latin punc' ) + }) + + findAndReplaceDOMText(this, { + find: /([\s]+)/ig, + wrap: _span( 'char space' ) + }) + + + if ( innerSpan ) + $(this).find('.char').each(function(){ + $(this).html( + $('').text( $(this).text() ) + ) + }) + + + if ( charClass ) + $(this).addClass('han-js-charized') + }) + } + }) + + + // tests + for ( var feature in tests ) { + classes.push( ( tests[feature]() ? '' : 'no-' ) + feature ) + + if ( !tester ) + var tester = '' + + tester += ' ' + feature + ': tests[\'' + feature + '\'](),\n' + } + + !function(window) { + eval("tester = ({\n" + tester.replace(/\n$/ig, + '\nunicoderange: test_for_unicoderange, \nfont: test_for_fontface\n}') + ")") + }() + + + + han() + + window.han = { + unicode: unicode_set, + support: tester + } + +})(window, window.jQuery, undefined) + + +/** + * findAndReplaceDOMText v 0.4.0 + * @author James Padolsey http://james.padolsey.com + * @license http://unlicense.org/UNLICENSE + * + * Matches the text of a DOM node against a regular expression + * and replaces each match (or node-separated portions of the match) + * in the specified element. + */ +;window.findAndReplaceDOMText = (function() { + + var PORTION_MODE_RETAIN = 'retain'; + var PORTION_MODE_FIRST = 'first'; + + var doc = document; + var toString = {}.toString; + + function isArray(a) { + return toString.call(a) == '[object Array]'; + } + + function escapeRegExp(s) { + return String(s).replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1'); + } + + function exposed() { + // Try deprecated arg signature first: + return deprecated.apply(null, arguments) || findAndReplaceDOMText.apply(null, arguments); + } + + function deprecated(regex, node, replacement, captureGroup, elFilter) { + if ((node && !node.nodeType) && arguments.length <= 2) { + return false; + } + var isReplacementFunction = typeof replacement == 'function'; + + if (isReplacementFunction) { + replacement = (function(original) { + return function(portion, match) { + return original(portion.text, match.startIndex); + }; + }(replacement)); + } + + // Awkward support for deprecated argument signature (<0.4.0) + var instance = findAndReplaceDOMText(node, { + + find: regex, + + wrap: isReplacementFunction ? null : replacement, + replace: isReplacementFunction ? replacement : '$' + (captureGroup || '&'), + + prepMatch: function(m, mi) { + + // Support captureGroup (a deprecated feature) + + if (!m[0]) throw 'findAndReplaceDOMText cannot handle zero-length matches'; + + if (captureGroup > 0) { + var cg = m[captureGroup]; + m.index += m[0].indexOf(cg); + m[0] = cg; + } + + m.endIndex = m.index + m[0].length; + m.startIndex = m.index; + m.index = mi; + + return m; + }, + filterElements: elFilter + }); + + exposed.revert = function() { + return instance.revert(); + }; + + return true; + } + + /** + * findAndReplaceDOMText + * + * Locates matches and replaces with replacementNode + * + * @param {Node} node Element or Text node to search within + * @param {RegExp} options.find The regular expression to match + * @param {String|Element} [options.wrap] A NodeName, or a Node to clone + * @param {String|Function} [options.replace='$&'] What to replace each match with + * @param {Function} [options.filterElements] A Function to be called to check whether to + * process an element. (returning true = process element, + * returning false = avoid element) + */ + function findAndReplaceDOMText(node, options) { + return new Finder(node, options); + } + + exposed.Finder = Finder; + + /** + * Finder -- encapsulates logic to find and replace. + */ + function Finder(node, options) { + + options.portionMode = options.portionMode || PORTION_MODE_RETAIN; + + this.node = node; + this.options = options; + + // ENable match-preparation method to be passed as option: + this.prepMatch = options.prepMatch || this.prepMatch; + + this.reverts = []; + + this.matches = this.search(); + + if (this.matches.length) { + this.processMatches(); + } + + } + + Finder.prototype = { + + /** + * Searches for all matches that comply with the instance's 'match' option + */ + search: function() { + + var match; + var matchIndex = 0; + var regex = this.options.find; + var text = this.getAggregateText(); + var matches = []; + + regex = typeof regex === 'string' ? RegExp(escapeRegExp(regex), 'g') : regex; + + if (regex.global) { + while (match = regex.exec(text)) { + matches.push(this.prepMatch(match, matchIndex++)); + } + } else { + if (match = text.match(regex)) { + matches.push(this.prepMatch(match, 0)); + } + } + + return matches; + + }, + + /** + * Prepares a single match with useful meta info: + */ + prepMatch: function(match, matchIndex) { + + if (!match[0]) { + throw new Error('findAndReplaceDOMText cannot handle zero-length matches'); + } + + match.endIndex = match.index + match[0].length; + match.startIndex = match.index; + match.index = matchIndex; + + return match; + }, + + /** + * Gets aggregate text within subject node + */ + getAggregateText: function() { + + var elementFilter = this.options.filterElements; + + return getText(this.node); + + /** + * Gets aggregate text of a node without resorting + * to broken innerText/textContent + */ + function getText(node) { + + if (node.nodeType === 3) { + return node.data; + } + + if (elementFilter && !elementFilter(node)) { + return ''; + } + + var txt = ''; + + if (node = node.firstChild) do { + txt += getText(node); + } while (node = node.nextSibling); + + return txt; + + } + + }, + + /** + * Steps through the target node, looking for matches, and + * calling replaceFn when a match is found. + */ + processMatches: function() { + + var matches = this.matches; + var node = this.node; + var elementFilter = this.options.filterElements; + + var startPortion, + endPortion, + innerPortions = [], + curNode = node, + match = matches.shift(), + atIndex = 0, // i.e. nodeAtIndex + matchIndex = 0, + portionIndex = 0, + doAvoidNode; + + out: while (true) { + + if (curNode.nodeType === 3) { + + if (!endPortion && curNode.length + atIndex >= match.endIndex) { + + // We've found the ending + endPortion = { + node: curNode, + index: portionIndex++, + text: curNode.data.substring(match.startIndex - atIndex, match.endIndex - atIndex), + indexInMatch: atIndex - match.startIndex, + indexInNode: match.startIndex - atIndex, // always zero for end-portions + endIndexInNode: match.endIndex - atIndex, + isEnd: true + }; + + } else if (startPortion) { + // Intersecting node + innerPortions.push({ + node: curNode, + index: portionIndex++, + text: curNode.data, + indexInMatch: atIndex - match.startIndex, + indexInNode: 0 // always zero for inner-portions + }); + } + + if (!startPortion && curNode.length + atIndex > match.startIndex) { + // We've found the match start + startPortion = { + node: curNode, + index: portionIndex++, + indexInMatch: 0, + indexInNode: match.startIndex - atIndex, + endIndexInNode: match.endIndex - atIndex, + text: curNode.data.substring(match.startIndex - atIndex, match.endIndex - atIndex) + }; + } + + atIndex += curNode.data.length; + + } + + doAvoidNode = curNode.nodeType === 1 && elementFilter && !elementFilter(curNode); + + if (startPortion && endPortion) { + + curNode = this.replaceMatch(match, startPortion, innerPortions, endPortion); + + // processMatches has to return the node that replaced the endNode + // and then we step back so we can continue from the end of the + // match: + + atIndex -= (endPortion.node.data.length - endPortion.endIndexInNode); + + startPortion = null; + endPortion = null; + innerPortions = []; + match = matches.shift(); + portionIndex = 0; + matchIndex++; + + if (!match) { + break; // no more matches + } + + } else if ( + !doAvoidNode && + (curNode.firstChild || curNode.nextSibling) + ) { + // Move down or forward: + curNode = curNode.firstChild || curNode.nextSibling; + continue; + } + + // Move forward or up: + while (true) { + if (curNode.nextSibling) { + curNode = curNode.nextSibling; + break; + } else if (curNode.parentNode !== node) { + curNode = curNode.parentNode; + } else { + break out; + } + } + + } + + }, + + /** + * Reverts ... TODO + */ + revert: function() { + // Reversion occurs backwards so as to avoid nodes subsequently + // replaced during the matching phase (a forward process): + for (var l = this.reverts.length; l--;) { + this.reverts[l](); + } + this.reverts = []; + }, + + prepareReplacementString: function(string, portion, match, matchIndex) { + var portionMode = this.options.portionMode; + if ( + portionMode === PORTION_MODE_FIRST && + portion.indexInMatch > 0 + ) { + return ''; + } + string = string.replace(/\$(\d+|&|`|')/g, function($0, t) { + var replacement; + switch(t) { + case '&': + replacement = match[0]; + break; + case '`': + replacement = match.input.substring(0, match.startIndex); + break; + case '\'': + replacement = match.input.substring(match.endIndex); + break; + default: + replacement = match[+t]; + } + return replacement; + }); + + if (portionMode === PORTION_MODE_FIRST) { + return string; + } + + if (portion.isEnd) { + return string.substring(portion.indexInMatch); + } + + return string.substring(portion.indexInMatch, portion.indexInMatch + portion.text.length); + }, + + getPortionReplacementNode: function(portion, match, matchIndex) { + + var replacement = this.options.replace || '$&'; + var wrapper = this.options.wrap; + + if (wrapper && wrapper.nodeType) { + // Wrapper has been provided as a stencil-node for us to clone: + var clone = doc.createElement('div'); + clone.innerHTML = wrapper.outerHTML || new XMLSerializer().serializeToString(wrapper); + wrapper = clone.firstChild; + } + + if (typeof replacement == 'function') { + replacement = replacement(portion, match, matchIndex); + if (replacement && replacement.nodeType) { + return replacement; + } + return doc.createTextNode(String(replacement)); + } + + var el = typeof wrapper == 'string' ? doc.createElement(wrapper) : wrapper; + + replacement = doc.createTextNode( + this.prepareReplacementString( + replacement, portion, match, matchIndex + ) + ); + + if (!el) { + return replacement; + } + + el.appendChild(replacement); + + return el; + }, + + replaceMatch: function(match, startPortion, innerPortions, endPortion) { + + var matchStartNode = startPortion.node; + var matchEndNode = endPortion.node; + + var preceedingTextNode; + var followingTextNode; + + if (matchStartNode === matchEndNode) { + + var node = matchStartNode; + + if (startPortion.indexInNode > 0) { + // Add `before` text node (before the match) + preceedingTextNode = doc.createTextNode(node.data.substring(0, startPortion.indexInNode)); + node.parentNode.insertBefore(preceedingTextNode, node); + } + + // Create the replacement node: + var newNode = this.getPortionReplacementNode( + endPortion, + match + ); + + node.parentNode.insertBefore(newNode, node); + + if (endPortion.endIndexInNode < node.length) { // ????? + // Add `after` text node (after the match) + followingTextNode = doc.createTextNode(node.data.substring(endPortion.endIndexInNode)); + node.parentNode.insertBefore(followingTextNode, node); + } + + node.parentNode.removeChild(node); + + this.reverts.push(function() { + if (preceedingTextNode === newNode.previousSibling) { + preceedingTextNode.parentNode.removeChild(preceedingTextNode); + } + if (followingTextNode === newNode.nextSibling) { + followingTextNode.parentNode.removeChild(followingTextNode); + } + newNode.parentNode.replaceChild(node, newNode); + }); + + return newNode; + + } else { + // Replace matchStartNode -> [innerMatchNodes...] -> matchEndNode (in that order) + + + preceedingTextNode = doc.createTextNode( + matchStartNode.data.substring(0, startPortion.indexInNode) + ); + + followingTextNode = doc.createTextNode( + matchEndNode.data.substring(endPortion.endIndexInNode) + ); + + var firstNode = this.getPortionReplacementNode( + startPortion, + match + ); + + var innerNodes = []; + + for (var i = 0, l = innerPortions.length; i < l; ++i) { + var portion = innerPortions[i]; + var innerNode = this.getPortionReplacementNode( + portion, + match + ); + portion.node.parentNode.replaceChild(innerNode, portion.node); + this.reverts.push((function(portion, innerNode) { + return function() { + innerNode.parentNode.replaceChild(portion.node, innerNode); + }; + }(portion, innerNode))); + innerNodes.push(innerNode); + } + + var lastNode = this.getPortionReplacementNode( + endPortion, + match + ); + + matchStartNode.parentNode.insertBefore(preceedingTextNode, matchStartNode); + matchStartNode.parentNode.insertBefore(firstNode, matchStartNode); + matchStartNode.parentNode.removeChild(matchStartNode); + + matchEndNode.parentNode.insertBefore(lastNode, matchEndNode); + matchEndNode.parentNode.insertBefore(followingTextNode, matchEndNode); + matchEndNode.parentNode.removeChild(matchEndNode); + + this.reverts.push(function() { + preceedingTextNode.parentNode.removeChild(preceedingTextNode); + firstNode.parentNode.replaceChild(matchStartNode, firstNode); + followingTextNode.parentNode.removeChild(followingTextNode); + lastNode.parentNode.replaceChild(matchEndNode, lastNode); + }); + + return lastNode; + } + } + + }; + + return exposed; + +}()); + diff --git a/ajax/libs/Han/package.json b/ajax/libs/Han/package.json index 93c228b47..2d7363881 100644 --- a/ajax/libs/Han/package.json +++ b/ajax/libs/Han/package.json @@ -1,21 +1,24 @@ { "name": "Han", "filename": "han.css", - "version": "2.2.3", + "version": "2.3.0", "description": "The CSS typography framework optimised for Hanzi", "keywords": [ "han", "Chinese", "Japanese", - "Korean" + "Korean", + "CSS", + "normamlize", + "typography" ], "author": "ethantw ", - "homepage": "http://http://css.hanzi.co/", + "homepage": "http://css.hanzi.co/", "bugs": "https://github.com/ethantw/Han/issues", "licenses": [ { "type": "MIT", - "url": "http://css.hanzi.co/license.md" + "url": "http://css.hanzi.co/LICENSE.md" } ], "repository": {