diff --git a/css/dist/ReadMe.md b/css/dist/ReadMe.md index a5588f5..db11328 100644 --- a/css/dist/ReadMe.md +++ b/css/dist/ReadMe.md @@ -111,8 +111,4 @@ This is currently an edge case as we still have to see whether we want to suppor - Traditional is written `vertical-lr` so we can’t use `page-progression-direction` as an hint, and we must check if the language item (`mn`) is enough: - if `mn-Mong` is set, then `vertical-lr` must be used; - if `mn-Cyrl` is set, then the publication is in cyrillic and it is `horizontal-tb`. -- We don’t currently support the `mn` language, and we can’t rely on system fonts to do so, we’ll have to embed one. - -## Android Fonts Patch - -See [the specific ReadMe](android-fonts-patch/ReadMe.md) for further information. \ No newline at end of file +- We don’t currently support the `mn` language, and we can’t rely on system fonts to do so, we’ll have to embed one. \ No newline at end of file diff --git a/css/dist/ReadiumCSS-after.css b/css/dist/ReadiumCSS-after.css index aa4403e..fd6453b 100644 --- a/css/dist/ReadiumCSS-after.css +++ b/css/dist/ReadiumCSS-after.css @@ -1,5 +1,5 @@ /*! - * Readium CSS v.2.0.2 + * Readium CSS v.2.0.3 * Copyright (c) 2017–2026. Readium Foundation. All rights reserved. * Use of this source code is governed by a BSD-style license which is detailed in the * LICENSE file present in the project repository where this source code is maintained. diff --git a/css/dist/ReadiumCSS-before.css b/css/dist/ReadiumCSS-before.css index 54eb3bb..c9c02ff 100644 --- a/css/dist/ReadiumCSS-before.css +++ b/css/dist/ReadiumCSS-before.css @@ -1,5 +1,5 @@ /*! - * Readium CSS v.2.0.2 + * Readium CSS v.2.0.3 * Copyright (c) 2017–2026. Readium Foundation. All rights reserved. * Use of this source code is governed by a BSD-style license which is detailed in the * LICENSE file present in the project repository where this source code is maintained. @@ -32,6 +32,14 @@ :root{ + --RS__sans-serif-ja-v:'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Hiragino Kaku Gothic Pro', 'ヒラギノ角ゴ W3', 'YuGothic', 'Yu Gothic Medium', 'BIZ UDGothic', 'Yu Gothic', 'MSゴシック', 'MS Gothic', sans-serif; + + --RS__serif-ja-v:'Hiragino Mincho ProN', 'Hiragino Mincho Pro', 'YuMincho', 'BIZ UDMincho', 'Yu Mincho', 'MS明朝', 'MS Mincho', serif; + + --RS__sans-serif-ja:'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Hiragino Kaku Gothic Pro', 'ヒラギノ角ゴ W3', 'YuGothic', 'Yu Gothic Medium', 'BIZ UDPGothic', 'Yu Gothic', 'MS Pゴシック', 'MS PGothic', sans-serif; + + --RS__serif-ja:'Hiragino Mincho ProN', 'Hiragino Mincho Pro', 'YuMincho', 'BIZ UDPMincho', 'Yu Mincho', 'MS P明朝', 'MS PMincho', serif; + --RS__monospaceTf:ui-monospace, 'Andale Mono', 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace; --RS__humanistTf:Seravek, Calibri, 'Gill Sans Nova', Roboto, Ubuntu, 'DejaVu Sans', source-sans-pro, sans-serif; @@ -41,9 +49,106 @@ --RS__modernTf:Athelas, Constantia, Charter, 'Bitstream Charter', Cambria, 'Georgia Pro', Georgia, serif; --RS__oldStyleTf:'Iowan Old Style', Sitka, 'Sitka Text', Palatino, 'Book Antiqua', 'URW Palladio L', P052, serif; - --RS__baseFontFamily:var(--RS__oldStyleTf); - --RS__lineHeightCompensation:1; + --RS__zh-HK-lineHeightCompensation:1.167; + + --RS__zh-HK-baseFontFamily:'方體', 'PingFang HK', '方體', 'PingFang TC', '黑體', 'Heiti TC', 'Microsoft JhengHei UI', 'Microsoft JhengHei', Roboto, Noto, 'Noto Sans CJK TC', sans-serif; + + --RS__zh-TW-lineHeightCompensation:1.167; + + --RS__zh-TW-baseFontFamily:'方體', 'PingFang TC', '黑體', 'Heiti TC', 'Microsoft JhengHei UI', 'Microsoft JhengHei', Roboto, Noto, 'Noto Sans CJK TC', sans-serif; + + --RS__zh-Hant-lineHeightCompensation:1.167; + + --RS__zh-Hant-baseFontFamily:'方體', 'PingFang TC', '黑體', 'Heiti TC', 'Microsoft JhengHei UI', 'Microsoft JhengHei', Roboto, Noto, 'Noto Sans CJK TC', sans-serif; + + --RS__zh-lineHeightCompensation:1.167; + + --RS__zh-baseFontFamily:'方体', 'PingFang SC', '黑体', 'Heiti SC', 'Microsoft JhengHei UI', 'Microsoft JhengHei', Roboto, Noto, 'Noto Sans CJK SC', sans-serif; + + --RS__th-lineHeightCompensation:1.067; + + --RS__th-baseFontFamily:Thonburi, 'Leelawadee UI', 'Cordia New', Roboto, Noto, 'Noto Sans Thai', sans-serif; + + --RS__te-baseFontFamily:'Kohinoor Telugu', 'Telugu Sangam MN', 'Nirmala UI', Gautami, Roboto, Noto, 'Noto Sans Telugu', sans-serif; + + --RS__ta-lineHeightCompensation:1.067; + + --RS__ta-baseFontFamily:'Tamil Sangam MN', 'Nirmala UI', Latha, Roboto, Noto, 'Noto Sans Tamil', sans-serif; + + --RS__si-lineHeightCompensation:1.167; + + --RS__si-baseFontFamily:'Sinhala Sangam MN', 'Nirmala UI', 'Iskoola Pota', Roboto, Noto, 'Noto Sans Sinhala', sans-serif; + + --RS__pa-lineHeightCompensation:1.1; + + --RS__pa-baseFontFamily:'Gurmukhi MN', 'Nirmala UI', Kartika, Roboto, Noto, 'Noto Sans Gurmukhi', sans-serif; + + --RS__or-lineHeightCompensation:1.167; + + --RS__or-baseFontFamily:'Oriya Sangam MN', 'Nirmala UI', Kalinga, Roboto, Noto, 'Noto Sans Oriya', sans-serif; + + --RS__ml-lineHeightCompensation:1.067; + + --RS__ml-baseFontFamily:'Malayalam Sangam MN', 'Nirmala UI', Kartika, Roboto, Noto, 'Noto Sans Malayalam', sans-serif; + + --RS__lo-baseFontFamily:'Lao Sangam MN', 'Leelawadee UI', 'Lao UI', Roboto, Noto, 'Noto Sans Lao', sans-serif; + + --RS__ko-lineHeightCompensation:1.167; + + --RS__ko-baseFontFamily:'Nanum Gothic', 'Apple SD Gothic Neo', 'Malgun Gothic', Roboto, Noto, 'Noto Sans CJK KR', sans-serif; + + --RS__kn-lineHeightCompensation:1.1; + + --RS__kn-baseFontFamily:'Kannada Sangam MN', 'Nirmala UI', Tunga, Roboto, Noto, 'Noto Sans Kannada', sans-serif; + + --RS__km-lineHeightCompensation:1.067; + + --RS__km-baseFontFamily:'Khmer Sangam MN', 'Leelawadee UI', 'Khmer UI', Roboto, Noto, 'Noto Sans Khmer', sans-serif; + + --RS__ja-lineHeightCompensation:1.167; + + --RS__ja-baseFontFamily:YuGothic, 'Hiragino Maru Gothic ProN', 'Hiragino Sans', 'Yu Gothic UI', 'Meiryo UI', 'MS Gothic', Roboto, Noto, 'Noto Sans CJK JP', sans-serif; + + --RS__iu-baseFontFamily:'Euphemia UCAS', Euphemia, Roboto, Noto, 'Noto Sans Canadian Aboriginal', sans-serif; + + --RS__hy-baseFontFamily:Mshtakan, Sylfaen, Roboto, Noto, 'Noto Serif Armenian', serif; + + --RS__hi-lineHeightCompensation:1.1; + + --RS__hi-baseFontFamily:'Kohinoor Devanagari', 'Devanagari Sangam MN', Kokila, 'Nirmala UI', Roboto, Noto, 'Noto Sans Devanagari', sans-serif; + + --RS__he-lineHeightCompensation:1.1; + + --RS__he-baseFontFamily:'New Peninim MT', 'Arial Hebrew', Gisha, 'Times New Roman', Roboto, Noto, 'Noto Sans Hebrew', sans-serif; + + --RS__gu-lineHeightCompensation:1.167; + + --RS__gu-baseFontFamily:'Gujarati Sangam MN', 'Nirmala UI', Shruti, Roboto, Noto, 'Noto Sans Gujarati', sans-serif; + + --RS__fa-baseFontFamily:'Geeza Pro', 'Arabic Typesetting', Roboto, Noto, 'Noto Naskh Arabic', 'Times New Roman', serif; + + --RS__chr-lineHeightCompensation:1.167; + + --RS__chr-baseFontFamily:'Plantagenet Cherokee', Roboto, Noto, 'Noto Sans Cherokee'; + + --RS__bo-baseFontFamily:Kailasa, 'Microsoft Himalaya', Roboto, Noto, 'Noto Sans Tibetan', sans-serif; + + --RS__bn-lineHeightCompensation:1.067; + + --RS__bn-baseFontFamily:'Kohinoor Bangla', 'Bangla Sangam MN', Vrinda, Roboto, Noto, 'Noto Sans Bengali', sans-serif; + + --RS__ar-baseFontFamily:'Geeza Pro', 'Arabic Typesetting', Roboto, Noto, 'Noto Naskh Arabic', 'Times New Roman', serif; + + --RS__am-lineHeightCompensation:1.167; + + --RS__am-baseFontFamily:Kefa, Nyala, Roboto, Noto, 'Noto Sans Ethiopic', serif; + + --RS__default-lineHeightCompensation:1; + + --RS__default-baseFontFamily:var(--RS__oldStyleTf); + --RS__baseFontFamily:var(--RS__default-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__default-lineHeightCompensation); --RS__baseLineHeight:calc(1.5 * var(--RS__lineHeightCompensation)); --RS__selectionTextColor:inherit; @@ -97,132 +202,131 @@ math{ } :lang(am){ - --RS__baseFontFamily:kefa, nyala, roboto, noto, "Noto Sans Ethiopic", serif; - --RS__lineHeightCompensation:1.167; + --RS__baseFontFamily:var(--RS__am-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__am-lineHeightCompensation); } :lang(ar){ - --RS__baseFontFamily:"Geeza Pro", "Arabic Typesetting", roboto, noto, "Noto Naskh Arabic", "Times New Roman", serif; + --RS__baseFontFamily:var(--RS__ar-baseFontFamily); } :lang(bn){ - --RS__baseFontFamily:"Kohinoor Bangla", "Bangla Sangam MN", vrinda, roboto, noto, "Noto Sans Bengali", sans-serif; - --RS__lineHeightCompensation:1.067; + --RS__baseFontFamily:var(--RS__bn-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__bn-lineHeightCompensation); } :lang(bo){ - --RS__baseFontFamily:kailasa, "Microsoft Himalaya", roboto, noto, "Noto Sans Tibetan", sans-serif; + --RS__baseFontFamily:var(--RS__bo-baseFontFamily); } :lang(chr){ - --RS__baseFontFamily:"Plantagenet Cherokee", roboto, noto, "Noto Sans Cherokee"; - --RS__lineHeightCompensation:1.167; + --RS__baseFontFamily:var(--RS__chr-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__chr-lineHeightCompensation); } :lang(fa){ - --RS__baseFontFamily:"Geeza Pro", "Arabic Typesetting", roboto, noto, "Noto Naskh Arabic", "Times New Roman", serif; + --RS__baseFontFamily:var(--RS__fa-baseFontFamily); } :lang(gu){ - --RS__baseFontFamily:"Gujarati Sangam MN", "Nirmala UI", shruti, roboto, noto, "Noto Sans Gujarati", sans-serif; - --RS__lineHeightCompensation:1.167; + --RS__baseFontFamily:var(--RS__gu-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__gu-lineHeightCompensation); } :lang(he){ - --RS__baseFontFamily:"New Peninim MT", "Arial Hebrew", gisha, "Times New Roman", roboto, noto, "Noto Sans Hebrew" sans-serif; - --RS__lineHeightCompensation:1.1; + --RS__baseFontFamily:var(--RS__he-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__he-lineHeightCompensation); } :lang(hi){ - --RS__baseFontFamily:"Kohinoor Devanagari", "Devanagari Sangam MN", kokila, "Nirmala UI", roboto, noto, "Noto Sans Devanagari", sans-serif; - - --RS__lineHeightCompensation:1.1; + --RS__baseFontFamily:var(--RS__hi-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__hi-lineHeightCompensation); } :lang(hy){ - --RS__baseFontFamily:mshtakan, sylfaen, roboto, noto, "Noto Serif Armenian", serif; + --RS__baseFontFamily:var(--RS__hy-baseFontFamily); } :lang(iu){ - --RS__baseFontFamily:"Euphemia UCAS", euphemia, roboto, noto, "Noto Sans Canadian Aboriginal", sans-serif; + --RS__baseFontFamily:var(--RS__iu-baseFontFamily); } :lang(ja){ - --RS__baseFontFamily:yugothic, "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic UI", "Meiryo UI", "MS Gothic", roboto, noto, "Noto Sans CJK JP", sans-serif; - --RS__lineHeightCompensation:1.167; - --RS__serif-ja:"Hiragino Mincho ProN", "Hiragino Mincho Pro", "YuMincho", "BIZ UDPMincho", "Yu Mincho", "MS P明朝", "MS PMincho", serif; - --RS__sans-serif-ja:"Hiragino Sans", "Hiragino Kaku Gothic ProN", "Hiragino Kaku Gothic Pro", "ヒラギノ角ゴ W3", "YuGothic", "Yu Gothic Medium", "BIZ UDPGothic", "Yu Gothic", "MS Pゴシック", "MS PGothic", sans-serif; - --RS__serif-ja-v:"Hiragino Mincho ProN", "Hiragino Mincho Pro", "YuMincho", "BIZ UDMincho", "Yu Mincho", "MS明朝", "MS Mincho", serif; - --RS__sans-serif-ja-v:"Hiragino Sans", "Hiragino Kaku Gothic ProN", "Hiragino Kaku Gothic Pro", "ヒラギノ角ゴ W3", "YuGothic", "Yu Gothic Medium", "BIZ UDGothic", "Yu Gothic", "MSゴシック", "MS Gothic", sans-serif; + --RS__baseFontFamily:var(--RS__ja-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__ja-lineHeightCompensation); } :lang(km){ - --RS__baseFontFamily:"Khmer Sangam MN", "Leelawadee UI", "Khmer UI", roboto, noto, "Noto Sans Khmer", sans-serif; - --RS__lineHeightCompensation:1.067; + --RS__baseFontFamily:var(--RS__km-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__km-lineHeightCompensation); } :lang(kn){ - --RS__baseFontFamily:"Kannada Sangam MN", "Nirmala UI", tunga, roboto, noto, "Noto Sans Kannada", sans-serif; - --RS__lineHeightCompensation:1.1; + --RS__baseFontFamily:var(--RS__kn-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__kn-lineHeightCompensation); } :lang(ko){ - --RS__baseFontFamily:"Nanum Gothic", "Apple SD Gothic Neo", "Malgun Gothic", roboto, noto, "Noto Sans CJK KR", sans-serif; - --RS__lineHeightCompensation:1.167; + --RS__baseFontFamily:var(--RS__ko-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__ko-lineHeightCompensation); } :lang(lo){ - --RS__baseFontFamily:"Lao Sangam MN", "Leelawadee UI", "Lao UI", roboto, noto, "Noto Sans Lao", sans-serif; + --RS__baseFontFamily:var(--RS__lo-baseFontFamily); } :lang(ml){ - --RS__baseFontFamily:"Malayalam Sangam MN", "Nirmala UI", kartika, roboto, noto, "Noto Sans Malayalam", sans-serif; - --RS__lineHeightCompensation:1.067; + --RS__baseFontFamily:var(--RS__ml-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__ml-lineHeightCompensation); } :lang(or){ - --RS__baseFontFamily:"Oriya Sangam MN", "Nirmala UI", kalinga, roboto, noto, "Noto Sans Oriya", sans-serif; - --RS__lineHeightCompensation:1.167; + --RS__baseFontFamily:var(--RS__or-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__or-lineHeightCompensation); } :lang(pa){ - --RS__baseFontFamily:"Gurmukhi MN", "Nirmala UI", kartika, roboto, noto, "Noto Sans Gurmukhi", sans-serif; - --RS__lineHeightCompensation:1.1; + --RS__baseFontFamily:var(--RS__pa-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__pa-lineHeightCompensation); } :lang(si){ - --RS__baseFontFamily:"Sinhala Sangam MN", "Nirmala UI", "Iskoola Pota", roboto, noto, "Noto Sans Sinhala", sans-serif; - --RS__lineHeightCompensation:1.167; + --RS__baseFontFamily:var(--RS__si-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__si-lineHeightCompensation); } :lang(ta){ - --RS__baseFontFamily:"Tamil Sangam MN", "Nirmala UI", latha, roboto, noto, "Noto Sans Tamil", sans-serif; - --RS__lineHeightCompensation:1.067; + --RS__baseFontFamily:var(--RS__ta-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__ta-lineHeightCompensation); } :lang(te){ - --RS__baseFontFamily:"Kohinoor Telugu", "Telugu Sangam MN", "Nirmala UI", gautami, roboto, noto, "Noto Sans Telugu", sans-serif; + --RS__baseFontFamily:var(--RS__te-baseFontFamily); } :lang(th){ - --RS__baseFontFamily:"Thonburi", "Leelawadee UI", "Cordia New", roboto, noto, "Noto Sans Thai", sans-serif; - --RS__lineHeightCompensation:1.067; + --RS__baseFontFamily:var(--RS__th-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__th-lineHeightCompensation); } :lang(zh){ - --RS__baseFontFamily:"方体", "PingFang SC", "黑体", "Heiti SC", "Microsoft JhengHei UI", "Microsoft JhengHei", roboto, noto, "Noto Sans CJK SC", sans-serif; - --RS__lineHeightCompensation:1.167; + --RS__baseFontFamily:var(--RS__zh-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__zh-lineHeightCompensation); +} + +:lang(zh-Hant){ + --RS__baseFontFamily:var(--RS__zh-Hant-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__zh-Hant-lineHeightCompensation); } -:lang(zh-Hant), :lang(zh-TW){ - --RS__baseFontFamily:"方體", "PingFang TC", "黑體", "Heiti TC", "Microsoft JhengHei UI", "Microsoft JhengHei", roboto, noto, "Noto Sans CJK TC", sans-serif; - --RS__lineHeightCompensation:1.167; + --RS__baseFontFamily:var(--RS__zh-TW-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__zh-TW-lineHeightCompensation); } :lang(zh-HK){ - --RS__baseFontFamily:"方體", "PingFang HK", "方體", "PingFang TC", "黑體", "Heiti TC", "Microsoft JhengHei UI", "Microsoft JhengHei", roboto, noto, "Noto Sans CJK TC", sans-serif; - --RS__lineHeightCompensation:1.167; + --RS__baseFontFamily:var(--RS__zh-HK-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__zh-HK-lineHeightCompensation); } body{ diff --git a/css/dist/ReadiumCSS-default.css b/css/dist/ReadiumCSS-default.css index 71589e7..b132bcb 100644 --- a/css/dist/ReadiumCSS-default.css +++ b/css/dist/ReadiumCSS-default.css @@ -1,5 +1,5 @@ /*! - * Readium CSS v.2.0.2 + * Readium CSS v.2.0.3 * Copyright (c) 2017–2026. Readium Foundation. All rights reserved. * Use of this source code is governed by a BSD-style license which is detailed in the * LICENSE file present in the project repository where this source code is maintained. diff --git a/css/dist/cjk-horizontal/ReadiumCSS-after.css b/css/dist/cjk-horizontal/ReadiumCSS-after.css index 3d1ecec..47face3 100644 --- a/css/dist/cjk-horizontal/ReadiumCSS-after.css +++ b/css/dist/cjk-horizontal/ReadiumCSS-after.css @@ -1,5 +1,5 @@ /*! - * Readium CSS v.2.0.2 + * Readium CSS v.2.0.3 * Copyright (c) 2017–2026. Readium Foundation. All rights reserved. * Use of this source code is governed by a BSD-style license which is detailed in the * LICENSE file present in the project repository where this source code is maintained. diff --git a/css/dist/cjk-horizontal/ReadiumCSS-before.css b/css/dist/cjk-horizontal/ReadiumCSS-before.css index 54eb3bb..c9c02ff 100644 --- a/css/dist/cjk-horizontal/ReadiumCSS-before.css +++ b/css/dist/cjk-horizontal/ReadiumCSS-before.css @@ -1,5 +1,5 @@ /*! - * Readium CSS v.2.0.2 + * Readium CSS v.2.0.3 * Copyright (c) 2017–2026. Readium Foundation. All rights reserved. * Use of this source code is governed by a BSD-style license which is detailed in the * LICENSE file present in the project repository where this source code is maintained. @@ -32,6 +32,14 @@ :root{ + --RS__sans-serif-ja-v:'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Hiragino Kaku Gothic Pro', 'ヒラギノ角ゴ W3', 'YuGothic', 'Yu Gothic Medium', 'BIZ UDGothic', 'Yu Gothic', 'MSゴシック', 'MS Gothic', sans-serif; + + --RS__serif-ja-v:'Hiragino Mincho ProN', 'Hiragino Mincho Pro', 'YuMincho', 'BIZ UDMincho', 'Yu Mincho', 'MS明朝', 'MS Mincho', serif; + + --RS__sans-serif-ja:'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Hiragino Kaku Gothic Pro', 'ヒラギノ角ゴ W3', 'YuGothic', 'Yu Gothic Medium', 'BIZ UDPGothic', 'Yu Gothic', 'MS Pゴシック', 'MS PGothic', sans-serif; + + --RS__serif-ja:'Hiragino Mincho ProN', 'Hiragino Mincho Pro', 'YuMincho', 'BIZ UDPMincho', 'Yu Mincho', 'MS P明朝', 'MS PMincho', serif; + --RS__monospaceTf:ui-monospace, 'Andale Mono', 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace; --RS__humanistTf:Seravek, Calibri, 'Gill Sans Nova', Roboto, Ubuntu, 'DejaVu Sans', source-sans-pro, sans-serif; @@ -41,9 +49,106 @@ --RS__modernTf:Athelas, Constantia, Charter, 'Bitstream Charter', Cambria, 'Georgia Pro', Georgia, serif; --RS__oldStyleTf:'Iowan Old Style', Sitka, 'Sitka Text', Palatino, 'Book Antiqua', 'URW Palladio L', P052, serif; - --RS__baseFontFamily:var(--RS__oldStyleTf); - --RS__lineHeightCompensation:1; + --RS__zh-HK-lineHeightCompensation:1.167; + + --RS__zh-HK-baseFontFamily:'方體', 'PingFang HK', '方體', 'PingFang TC', '黑體', 'Heiti TC', 'Microsoft JhengHei UI', 'Microsoft JhengHei', Roboto, Noto, 'Noto Sans CJK TC', sans-serif; + + --RS__zh-TW-lineHeightCompensation:1.167; + + --RS__zh-TW-baseFontFamily:'方體', 'PingFang TC', '黑體', 'Heiti TC', 'Microsoft JhengHei UI', 'Microsoft JhengHei', Roboto, Noto, 'Noto Sans CJK TC', sans-serif; + + --RS__zh-Hant-lineHeightCompensation:1.167; + + --RS__zh-Hant-baseFontFamily:'方體', 'PingFang TC', '黑體', 'Heiti TC', 'Microsoft JhengHei UI', 'Microsoft JhengHei', Roboto, Noto, 'Noto Sans CJK TC', sans-serif; + + --RS__zh-lineHeightCompensation:1.167; + + --RS__zh-baseFontFamily:'方体', 'PingFang SC', '黑体', 'Heiti SC', 'Microsoft JhengHei UI', 'Microsoft JhengHei', Roboto, Noto, 'Noto Sans CJK SC', sans-serif; + + --RS__th-lineHeightCompensation:1.067; + + --RS__th-baseFontFamily:Thonburi, 'Leelawadee UI', 'Cordia New', Roboto, Noto, 'Noto Sans Thai', sans-serif; + + --RS__te-baseFontFamily:'Kohinoor Telugu', 'Telugu Sangam MN', 'Nirmala UI', Gautami, Roboto, Noto, 'Noto Sans Telugu', sans-serif; + + --RS__ta-lineHeightCompensation:1.067; + + --RS__ta-baseFontFamily:'Tamil Sangam MN', 'Nirmala UI', Latha, Roboto, Noto, 'Noto Sans Tamil', sans-serif; + + --RS__si-lineHeightCompensation:1.167; + + --RS__si-baseFontFamily:'Sinhala Sangam MN', 'Nirmala UI', 'Iskoola Pota', Roboto, Noto, 'Noto Sans Sinhala', sans-serif; + + --RS__pa-lineHeightCompensation:1.1; + + --RS__pa-baseFontFamily:'Gurmukhi MN', 'Nirmala UI', Kartika, Roboto, Noto, 'Noto Sans Gurmukhi', sans-serif; + + --RS__or-lineHeightCompensation:1.167; + + --RS__or-baseFontFamily:'Oriya Sangam MN', 'Nirmala UI', Kalinga, Roboto, Noto, 'Noto Sans Oriya', sans-serif; + + --RS__ml-lineHeightCompensation:1.067; + + --RS__ml-baseFontFamily:'Malayalam Sangam MN', 'Nirmala UI', Kartika, Roboto, Noto, 'Noto Sans Malayalam', sans-serif; + + --RS__lo-baseFontFamily:'Lao Sangam MN', 'Leelawadee UI', 'Lao UI', Roboto, Noto, 'Noto Sans Lao', sans-serif; + + --RS__ko-lineHeightCompensation:1.167; + + --RS__ko-baseFontFamily:'Nanum Gothic', 'Apple SD Gothic Neo', 'Malgun Gothic', Roboto, Noto, 'Noto Sans CJK KR', sans-serif; + + --RS__kn-lineHeightCompensation:1.1; + + --RS__kn-baseFontFamily:'Kannada Sangam MN', 'Nirmala UI', Tunga, Roboto, Noto, 'Noto Sans Kannada', sans-serif; + + --RS__km-lineHeightCompensation:1.067; + + --RS__km-baseFontFamily:'Khmer Sangam MN', 'Leelawadee UI', 'Khmer UI', Roboto, Noto, 'Noto Sans Khmer', sans-serif; + + --RS__ja-lineHeightCompensation:1.167; + + --RS__ja-baseFontFamily:YuGothic, 'Hiragino Maru Gothic ProN', 'Hiragino Sans', 'Yu Gothic UI', 'Meiryo UI', 'MS Gothic', Roboto, Noto, 'Noto Sans CJK JP', sans-serif; + + --RS__iu-baseFontFamily:'Euphemia UCAS', Euphemia, Roboto, Noto, 'Noto Sans Canadian Aboriginal', sans-serif; + + --RS__hy-baseFontFamily:Mshtakan, Sylfaen, Roboto, Noto, 'Noto Serif Armenian', serif; + + --RS__hi-lineHeightCompensation:1.1; + + --RS__hi-baseFontFamily:'Kohinoor Devanagari', 'Devanagari Sangam MN', Kokila, 'Nirmala UI', Roboto, Noto, 'Noto Sans Devanagari', sans-serif; + + --RS__he-lineHeightCompensation:1.1; + + --RS__he-baseFontFamily:'New Peninim MT', 'Arial Hebrew', Gisha, 'Times New Roman', Roboto, Noto, 'Noto Sans Hebrew', sans-serif; + + --RS__gu-lineHeightCompensation:1.167; + + --RS__gu-baseFontFamily:'Gujarati Sangam MN', 'Nirmala UI', Shruti, Roboto, Noto, 'Noto Sans Gujarati', sans-serif; + + --RS__fa-baseFontFamily:'Geeza Pro', 'Arabic Typesetting', Roboto, Noto, 'Noto Naskh Arabic', 'Times New Roman', serif; + + --RS__chr-lineHeightCompensation:1.167; + + --RS__chr-baseFontFamily:'Plantagenet Cherokee', Roboto, Noto, 'Noto Sans Cherokee'; + + --RS__bo-baseFontFamily:Kailasa, 'Microsoft Himalaya', Roboto, Noto, 'Noto Sans Tibetan', sans-serif; + + --RS__bn-lineHeightCompensation:1.067; + + --RS__bn-baseFontFamily:'Kohinoor Bangla', 'Bangla Sangam MN', Vrinda, Roboto, Noto, 'Noto Sans Bengali', sans-serif; + + --RS__ar-baseFontFamily:'Geeza Pro', 'Arabic Typesetting', Roboto, Noto, 'Noto Naskh Arabic', 'Times New Roman', serif; + + --RS__am-lineHeightCompensation:1.167; + + --RS__am-baseFontFamily:Kefa, Nyala, Roboto, Noto, 'Noto Sans Ethiopic', serif; + + --RS__default-lineHeightCompensation:1; + + --RS__default-baseFontFamily:var(--RS__oldStyleTf); + --RS__baseFontFamily:var(--RS__default-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__default-lineHeightCompensation); --RS__baseLineHeight:calc(1.5 * var(--RS__lineHeightCompensation)); --RS__selectionTextColor:inherit; @@ -97,132 +202,131 @@ math{ } :lang(am){ - --RS__baseFontFamily:kefa, nyala, roboto, noto, "Noto Sans Ethiopic", serif; - --RS__lineHeightCompensation:1.167; + --RS__baseFontFamily:var(--RS__am-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__am-lineHeightCompensation); } :lang(ar){ - --RS__baseFontFamily:"Geeza Pro", "Arabic Typesetting", roboto, noto, "Noto Naskh Arabic", "Times New Roman", serif; + --RS__baseFontFamily:var(--RS__ar-baseFontFamily); } :lang(bn){ - --RS__baseFontFamily:"Kohinoor Bangla", "Bangla Sangam MN", vrinda, roboto, noto, "Noto Sans Bengali", sans-serif; - --RS__lineHeightCompensation:1.067; + --RS__baseFontFamily:var(--RS__bn-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__bn-lineHeightCompensation); } :lang(bo){ - --RS__baseFontFamily:kailasa, "Microsoft Himalaya", roboto, noto, "Noto Sans Tibetan", sans-serif; + --RS__baseFontFamily:var(--RS__bo-baseFontFamily); } :lang(chr){ - --RS__baseFontFamily:"Plantagenet Cherokee", roboto, noto, "Noto Sans Cherokee"; - --RS__lineHeightCompensation:1.167; + --RS__baseFontFamily:var(--RS__chr-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__chr-lineHeightCompensation); } :lang(fa){ - --RS__baseFontFamily:"Geeza Pro", "Arabic Typesetting", roboto, noto, "Noto Naskh Arabic", "Times New Roman", serif; + --RS__baseFontFamily:var(--RS__fa-baseFontFamily); } :lang(gu){ - --RS__baseFontFamily:"Gujarati Sangam MN", "Nirmala UI", shruti, roboto, noto, "Noto Sans Gujarati", sans-serif; - --RS__lineHeightCompensation:1.167; + --RS__baseFontFamily:var(--RS__gu-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__gu-lineHeightCompensation); } :lang(he){ - --RS__baseFontFamily:"New Peninim MT", "Arial Hebrew", gisha, "Times New Roman", roboto, noto, "Noto Sans Hebrew" sans-serif; - --RS__lineHeightCompensation:1.1; + --RS__baseFontFamily:var(--RS__he-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__he-lineHeightCompensation); } :lang(hi){ - --RS__baseFontFamily:"Kohinoor Devanagari", "Devanagari Sangam MN", kokila, "Nirmala UI", roboto, noto, "Noto Sans Devanagari", sans-serif; - - --RS__lineHeightCompensation:1.1; + --RS__baseFontFamily:var(--RS__hi-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__hi-lineHeightCompensation); } :lang(hy){ - --RS__baseFontFamily:mshtakan, sylfaen, roboto, noto, "Noto Serif Armenian", serif; + --RS__baseFontFamily:var(--RS__hy-baseFontFamily); } :lang(iu){ - --RS__baseFontFamily:"Euphemia UCAS", euphemia, roboto, noto, "Noto Sans Canadian Aboriginal", sans-serif; + --RS__baseFontFamily:var(--RS__iu-baseFontFamily); } :lang(ja){ - --RS__baseFontFamily:yugothic, "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic UI", "Meiryo UI", "MS Gothic", roboto, noto, "Noto Sans CJK JP", sans-serif; - --RS__lineHeightCompensation:1.167; - --RS__serif-ja:"Hiragino Mincho ProN", "Hiragino Mincho Pro", "YuMincho", "BIZ UDPMincho", "Yu Mincho", "MS P明朝", "MS PMincho", serif; - --RS__sans-serif-ja:"Hiragino Sans", "Hiragino Kaku Gothic ProN", "Hiragino Kaku Gothic Pro", "ヒラギノ角ゴ W3", "YuGothic", "Yu Gothic Medium", "BIZ UDPGothic", "Yu Gothic", "MS Pゴシック", "MS PGothic", sans-serif; - --RS__serif-ja-v:"Hiragino Mincho ProN", "Hiragino Mincho Pro", "YuMincho", "BIZ UDMincho", "Yu Mincho", "MS明朝", "MS Mincho", serif; - --RS__sans-serif-ja-v:"Hiragino Sans", "Hiragino Kaku Gothic ProN", "Hiragino Kaku Gothic Pro", "ヒラギノ角ゴ W3", "YuGothic", "Yu Gothic Medium", "BIZ UDGothic", "Yu Gothic", "MSゴシック", "MS Gothic", sans-serif; + --RS__baseFontFamily:var(--RS__ja-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__ja-lineHeightCompensation); } :lang(km){ - --RS__baseFontFamily:"Khmer Sangam MN", "Leelawadee UI", "Khmer UI", roboto, noto, "Noto Sans Khmer", sans-serif; - --RS__lineHeightCompensation:1.067; + --RS__baseFontFamily:var(--RS__km-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__km-lineHeightCompensation); } :lang(kn){ - --RS__baseFontFamily:"Kannada Sangam MN", "Nirmala UI", tunga, roboto, noto, "Noto Sans Kannada", sans-serif; - --RS__lineHeightCompensation:1.1; + --RS__baseFontFamily:var(--RS__kn-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__kn-lineHeightCompensation); } :lang(ko){ - --RS__baseFontFamily:"Nanum Gothic", "Apple SD Gothic Neo", "Malgun Gothic", roboto, noto, "Noto Sans CJK KR", sans-serif; - --RS__lineHeightCompensation:1.167; + --RS__baseFontFamily:var(--RS__ko-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__ko-lineHeightCompensation); } :lang(lo){ - --RS__baseFontFamily:"Lao Sangam MN", "Leelawadee UI", "Lao UI", roboto, noto, "Noto Sans Lao", sans-serif; + --RS__baseFontFamily:var(--RS__lo-baseFontFamily); } :lang(ml){ - --RS__baseFontFamily:"Malayalam Sangam MN", "Nirmala UI", kartika, roboto, noto, "Noto Sans Malayalam", sans-serif; - --RS__lineHeightCompensation:1.067; + --RS__baseFontFamily:var(--RS__ml-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__ml-lineHeightCompensation); } :lang(or){ - --RS__baseFontFamily:"Oriya Sangam MN", "Nirmala UI", kalinga, roboto, noto, "Noto Sans Oriya", sans-serif; - --RS__lineHeightCompensation:1.167; + --RS__baseFontFamily:var(--RS__or-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__or-lineHeightCompensation); } :lang(pa){ - --RS__baseFontFamily:"Gurmukhi MN", "Nirmala UI", kartika, roboto, noto, "Noto Sans Gurmukhi", sans-serif; - --RS__lineHeightCompensation:1.1; + --RS__baseFontFamily:var(--RS__pa-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__pa-lineHeightCompensation); } :lang(si){ - --RS__baseFontFamily:"Sinhala Sangam MN", "Nirmala UI", "Iskoola Pota", roboto, noto, "Noto Sans Sinhala", sans-serif; - --RS__lineHeightCompensation:1.167; + --RS__baseFontFamily:var(--RS__si-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__si-lineHeightCompensation); } :lang(ta){ - --RS__baseFontFamily:"Tamil Sangam MN", "Nirmala UI", latha, roboto, noto, "Noto Sans Tamil", sans-serif; - --RS__lineHeightCompensation:1.067; + --RS__baseFontFamily:var(--RS__ta-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__ta-lineHeightCompensation); } :lang(te){ - --RS__baseFontFamily:"Kohinoor Telugu", "Telugu Sangam MN", "Nirmala UI", gautami, roboto, noto, "Noto Sans Telugu", sans-serif; + --RS__baseFontFamily:var(--RS__te-baseFontFamily); } :lang(th){ - --RS__baseFontFamily:"Thonburi", "Leelawadee UI", "Cordia New", roboto, noto, "Noto Sans Thai", sans-serif; - --RS__lineHeightCompensation:1.067; + --RS__baseFontFamily:var(--RS__th-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__th-lineHeightCompensation); } :lang(zh){ - --RS__baseFontFamily:"方体", "PingFang SC", "黑体", "Heiti SC", "Microsoft JhengHei UI", "Microsoft JhengHei", roboto, noto, "Noto Sans CJK SC", sans-serif; - --RS__lineHeightCompensation:1.167; + --RS__baseFontFamily:var(--RS__zh-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__zh-lineHeightCompensation); +} + +:lang(zh-Hant){ + --RS__baseFontFamily:var(--RS__zh-Hant-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__zh-Hant-lineHeightCompensation); } -:lang(zh-Hant), :lang(zh-TW){ - --RS__baseFontFamily:"方體", "PingFang TC", "黑體", "Heiti TC", "Microsoft JhengHei UI", "Microsoft JhengHei", roboto, noto, "Noto Sans CJK TC", sans-serif; - --RS__lineHeightCompensation:1.167; + --RS__baseFontFamily:var(--RS__zh-TW-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__zh-TW-lineHeightCompensation); } :lang(zh-HK){ - --RS__baseFontFamily:"方體", "PingFang HK", "方體", "PingFang TC", "黑體", "Heiti TC", "Microsoft JhengHei UI", "Microsoft JhengHei", roboto, noto, "Noto Sans CJK TC", sans-serif; - --RS__lineHeightCompensation:1.167; + --RS__baseFontFamily:var(--RS__zh-HK-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__zh-HK-lineHeightCompensation); } body{ diff --git a/css/dist/cjk-horizontal/ReadiumCSS-default.css b/css/dist/cjk-horizontal/ReadiumCSS-default.css index f716583..4f5d77d 100644 --- a/css/dist/cjk-horizontal/ReadiumCSS-default.css +++ b/css/dist/cjk-horizontal/ReadiumCSS-default.css @@ -1,5 +1,5 @@ /*! - * Readium CSS v.2.0.2 + * Readium CSS v.2.0.3 * Copyright (c) 2017–2026. Readium Foundation. All rights reserved. * Use of this source code is governed by a BSD-style license which is detailed in the * LICENSE file present in the project repository where this source code is maintained. diff --git a/css/dist/cjk-vertical/ReadiumCSS-after.css b/css/dist/cjk-vertical/ReadiumCSS-after.css index 621d736..db61ce7 100644 --- a/css/dist/cjk-vertical/ReadiumCSS-after.css +++ b/css/dist/cjk-vertical/ReadiumCSS-after.css @@ -1,5 +1,5 @@ /*! - * Readium CSS v.2.0.2 + * Readium CSS v.2.0.3 * Copyright (c) 2017–2026. Readium Foundation. All rights reserved. * Use of this source code is governed by a BSD-style license which is detailed in the * LICENSE file present in the project repository where this source code is maintained. diff --git a/css/dist/cjk-vertical/ReadiumCSS-before.css b/css/dist/cjk-vertical/ReadiumCSS-before.css index 8c2cc05..cbef3ce 100644 --- a/css/dist/cjk-vertical/ReadiumCSS-before.css +++ b/css/dist/cjk-vertical/ReadiumCSS-before.css @@ -1,5 +1,5 @@ /*! - * Readium CSS v.2.0.2 + * Readium CSS v.2.0.3 * Copyright (c) 2017–2026. Readium Foundation. All rights reserved. * Use of this source code is governed by a BSD-style license which is detailed in the * LICENSE file present in the project repository where this source code is maintained. @@ -32,6 +32,14 @@ :root{ + --RS__sans-serif-ja-v:'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Hiragino Kaku Gothic Pro', 'ヒラギノ角ゴ W3', 'YuGothic', 'Yu Gothic Medium', 'BIZ UDGothic', 'Yu Gothic', 'MSゴシック', 'MS Gothic', sans-serif; + + --RS__serif-ja-v:'Hiragino Mincho ProN', 'Hiragino Mincho Pro', 'YuMincho', 'BIZ UDMincho', 'Yu Mincho', 'MS明朝', 'MS Mincho', serif; + + --RS__sans-serif-ja:'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Hiragino Kaku Gothic Pro', 'ヒラギノ角ゴ W3', 'YuGothic', 'Yu Gothic Medium', 'BIZ UDPGothic', 'Yu Gothic', 'MS Pゴシック', 'MS PGothic', sans-serif; + + --RS__serif-ja:'Hiragino Mincho ProN', 'Hiragino Mincho Pro', 'YuMincho', 'BIZ UDPMincho', 'Yu Mincho', 'MS P明朝', 'MS PMincho', serif; + --RS__monospaceTf:ui-monospace, 'Andale Mono', 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace; --RS__humanistTf:Seravek, Calibri, 'Gill Sans Nova', Roboto, Ubuntu, 'DejaVu Sans', source-sans-pro, sans-serif; @@ -41,9 +49,106 @@ --RS__modernTf:Athelas, Constantia, Charter, 'Bitstream Charter', Cambria, 'Georgia Pro', Georgia, serif; --RS__oldStyleTf:'Iowan Old Style', Sitka, 'Sitka Text', Palatino, 'Book Antiqua', 'URW Palladio L', P052, serif; - --RS__baseFontFamily:var(--RS__oldStyleTf); - --RS__lineHeightCompensation:1; + --RS__zh-HK-lineHeightCompensation:1.167; + + --RS__zh-HK-baseFontFamily:'方體', 'PingFang HK', '方體', 'PingFang TC', '黑體', 'Heiti TC', 'Microsoft JhengHei UI', 'Microsoft JhengHei', Roboto, Noto, 'Noto Sans CJK TC', sans-serif; + + --RS__zh-TW-lineHeightCompensation:1.167; + + --RS__zh-TW-baseFontFamily:'方體', 'PingFang TC', '黑體', 'Heiti TC', 'Microsoft JhengHei UI', 'Microsoft JhengHei', Roboto, Noto, 'Noto Sans CJK TC', sans-serif; + + --RS__zh-Hant-lineHeightCompensation:1.167; + + --RS__zh-Hant-baseFontFamily:'方體', 'PingFang TC', '黑體', 'Heiti TC', 'Microsoft JhengHei UI', 'Microsoft JhengHei', Roboto, Noto, 'Noto Sans CJK TC', sans-serif; + + --RS__zh-lineHeightCompensation:1.167; + + --RS__zh-baseFontFamily:'方体', 'PingFang SC', '黑体', 'Heiti SC', 'Microsoft JhengHei UI', 'Microsoft JhengHei', Roboto, Noto, 'Noto Sans CJK SC', sans-serif; + + --RS__th-lineHeightCompensation:1.067; + + --RS__th-baseFontFamily:Thonburi, 'Leelawadee UI', 'Cordia New', Roboto, Noto, 'Noto Sans Thai', sans-serif; + + --RS__te-baseFontFamily:'Kohinoor Telugu', 'Telugu Sangam MN', 'Nirmala UI', Gautami, Roboto, Noto, 'Noto Sans Telugu', sans-serif; + + --RS__ta-lineHeightCompensation:1.067; + + --RS__ta-baseFontFamily:'Tamil Sangam MN', 'Nirmala UI', Latha, Roboto, Noto, 'Noto Sans Tamil', sans-serif; + + --RS__si-lineHeightCompensation:1.167; + + --RS__si-baseFontFamily:'Sinhala Sangam MN', 'Nirmala UI', 'Iskoola Pota', Roboto, Noto, 'Noto Sans Sinhala', sans-serif; + + --RS__pa-lineHeightCompensation:1.1; + + --RS__pa-baseFontFamily:'Gurmukhi MN', 'Nirmala UI', Kartika, Roboto, Noto, 'Noto Sans Gurmukhi', sans-serif; + + --RS__or-lineHeightCompensation:1.167; + + --RS__or-baseFontFamily:'Oriya Sangam MN', 'Nirmala UI', Kalinga, Roboto, Noto, 'Noto Sans Oriya', sans-serif; + + --RS__ml-lineHeightCompensation:1.067; + + --RS__ml-baseFontFamily:'Malayalam Sangam MN', 'Nirmala UI', Kartika, Roboto, Noto, 'Noto Sans Malayalam', sans-serif; + + --RS__lo-baseFontFamily:'Lao Sangam MN', 'Leelawadee UI', 'Lao UI', Roboto, Noto, 'Noto Sans Lao', sans-serif; + + --RS__ko-lineHeightCompensation:1.167; + + --RS__ko-baseFontFamily:'Nanum Gothic', 'Apple SD Gothic Neo', 'Malgun Gothic', Roboto, Noto, 'Noto Sans CJK KR', sans-serif; + + --RS__kn-lineHeightCompensation:1.1; + + --RS__kn-baseFontFamily:'Kannada Sangam MN', 'Nirmala UI', Tunga, Roboto, Noto, 'Noto Sans Kannada', sans-serif; + + --RS__km-lineHeightCompensation:1.067; + + --RS__km-baseFontFamily:'Khmer Sangam MN', 'Leelawadee UI', 'Khmer UI', Roboto, Noto, 'Noto Sans Khmer', sans-serif; + + --RS__ja-lineHeightCompensation:1.167; + + --RS__ja-baseFontFamily:YuGothic, 'Hiragino Maru Gothic ProN', 'Hiragino Sans', 'Yu Gothic UI', 'Meiryo UI', 'MS Gothic', Roboto, Noto, 'Noto Sans CJK JP', sans-serif; + + --RS__iu-baseFontFamily:'Euphemia UCAS', Euphemia, Roboto, Noto, 'Noto Sans Canadian Aboriginal', sans-serif; + + --RS__hy-baseFontFamily:Mshtakan, Sylfaen, Roboto, Noto, 'Noto Serif Armenian', serif; + + --RS__hi-lineHeightCompensation:1.1; + + --RS__hi-baseFontFamily:'Kohinoor Devanagari', 'Devanagari Sangam MN', Kokila, 'Nirmala UI', Roboto, Noto, 'Noto Sans Devanagari', sans-serif; + + --RS__he-lineHeightCompensation:1.1; + + --RS__he-baseFontFamily:'New Peninim MT', 'Arial Hebrew', Gisha, 'Times New Roman', Roboto, Noto, 'Noto Sans Hebrew', sans-serif; + + --RS__gu-lineHeightCompensation:1.167; + + --RS__gu-baseFontFamily:'Gujarati Sangam MN', 'Nirmala UI', Shruti, Roboto, Noto, 'Noto Sans Gujarati', sans-serif; + + --RS__fa-baseFontFamily:'Geeza Pro', 'Arabic Typesetting', Roboto, Noto, 'Noto Naskh Arabic', 'Times New Roman', serif; + + --RS__chr-lineHeightCompensation:1.167; + + --RS__chr-baseFontFamily:'Plantagenet Cherokee', Roboto, Noto, 'Noto Sans Cherokee'; + + --RS__bo-baseFontFamily:Kailasa, 'Microsoft Himalaya', Roboto, Noto, 'Noto Sans Tibetan', sans-serif; + + --RS__bn-lineHeightCompensation:1.067; + + --RS__bn-baseFontFamily:'Kohinoor Bangla', 'Bangla Sangam MN', Vrinda, Roboto, Noto, 'Noto Sans Bengali', sans-serif; + + --RS__ar-baseFontFamily:'Geeza Pro', 'Arabic Typesetting', Roboto, Noto, 'Noto Naskh Arabic', 'Times New Roman', serif; + + --RS__am-lineHeightCompensation:1.167; + + --RS__am-baseFontFamily:Kefa, Nyala, Roboto, Noto, 'Noto Sans Ethiopic', serif; + + --RS__default-lineHeightCompensation:1; + + --RS__default-baseFontFamily:var(--RS__oldStyleTf); + --RS__baseFontFamily:var(--RS__default-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__default-lineHeightCompensation); --RS__baseLineHeight:calc(1.5 * var(--RS__lineHeightCompensation)); --RS__selectionTextColor:inherit; @@ -97,132 +202,131 @@ math{ } :lang(am){ - --RS__baseFontFamily:kefa, nyala, roboto, noto, "Noto Sans Ethiopic", serif; - --RS__lineHeightCompensation:1.167; + --RS__baseFontFamily:var(--RS__am-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__am-lineHeightCompensation); } :lang(ar){ - --RS__baseFontFamily:"Geeza Pro", "Arabic Typesetting", roboto, noto, "Noto Naskh Arabic", "Times New Roman", serif; + --RS__baseFontFamily:var(--RS__ar-baseFontFamily); } :lang(bn){ - --RS__baseFontFamily:"Kohinoor Bangla", "Bangla Sangam MN", vrinda, roboto, noto, "Noto Sans Bengali", sans-serif; - --RS__lineHeightCompensation:1.067; + --RS__baseFontFamily:var(--RS__bn-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__bn-lineHeightCompensation); } :lang(bo){ - --RS__baseFontFamily:kailasa, "Microsoft Himalaya", roboto, noto, "Noto Sans Tibetan", sans-serif; + --RS__baseFontFamily:var(--RS__bo-baseFontFamily); } :lang(chr){ - --RS__baseFontFamily:"Plantagenet Cherokee", roboto, noto, "Noto Sans Cherokee"; - --RS__lineHeightCompensation:1.167; + --RS__baseFontFamily:var(--RS__chr-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__chr-lineHeightCompensation); } :lang(fa){ - --RS__baseFontFamily:"Geeza Pro", "Arabic Typesetting", roboto, noto, "Noto Naskh Arabic", "Times New Roman", serif; + --RS__baseFontFamily:var(--RS__fa-baseFontFamily); } :lang(gu){ - --RS__baseFontFamily:"Gujarati Sangam MN", "Nirmala UI", shruti, roboto, noto, "Noto Sans Gujarati", sans-serif; - --RS__lineHeightCompensation:1.167; + --RS__baseFontFamily:var(--RS__gu-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__gu-lineHeightCompensation); } :lang(he){ - --RS__baseFontFamily:"New Peninim MT", "Arial Hebrew", gisha, "Times New Roman", roboto, noto, "Noto Sans Hebrew" sans-serif; - --RS__lineHeightCompensation:1.1; + --RS__baseFontFamily:var(--RS__he-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__he-lineHeightCompensation); } :lang(hi){ - --RS__baseFontFamily:"Kohinoor Devanagari", "Devanagari Sangam MN", kokila, "Nirmala UI", roboto, noto, "Noto Sans Devanagari", sans-serif; - - --RS__lineHeightCompensation:1.1; + --RS__baseFontFamily:var(--RS__hi-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__hi-lineHeightCompensation); } :lang(hy){ - --RS__baseFontFamily:mshtakan, sylfaen, roboto, noto, "Noto Serif Armenian", serif; + --RS__baseFontFamily:var(--RS__hy-baseFontFamily); } :lang(iu){ - --RS__baseFontFamily:"Euphemia UCAS", euphemia, roboto, noto, "Noto Sans Canadian Aboriginal", sans-serif; + --RS__baseFontFamily:var(--RS__iu-baseFontFamily); } :lang(ja){ - --RS__baseFontFamily:yugothic, "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic UI", "Meiryo UI", "MS Gothic", roboto, noto, "Noto Sans CJK JP", sans-serif; - --RS__lineHeightCompensation:1.167; - --RS__serif-ja:"Hiragino Mincho ProN", "Hiragino Mincho Pro", "YuMincho", "BIZ UDPMincho", "Yu Mincho", "MS P明朝", "MS PMincho", serif; - --RS__sans-serif-ja:"Hiragino Sans", "Hiragino Kaku Gothic ProN", "Hiragino Kaku Gothic Pro", "ヒラギノ角ゴ W3", "YuGothic", "Yu Gothic Medium", "BIZ UDPGothic", "Yu Gothic", "MS Pゴシック", "MS PGothic", sans-serif; - --RS__serif-ja-v:"Hiragino Mincho ProN", "Hiragino Mincho Pro", "YuMincho", "BIZ UDMincho", "Yu Mincho", "MS明朝", "MS Mincho", serif; - --RS__sans-serif-ja-v:"Hiragino Sans", "Hiragino Kaku Gothic ProN", "Hiragino Kaku Gothic Pro", "ヒラギノ角ゴ W3", "YuGothic", "Yu Gothic Medium", "BIZ UDGothic", "Yu Gothic", "MSゴシック", "MS Gothic", sans-serif; + --RS__baseFontFamily:var(--RS__ja-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__ja-lineHeightCompensation); } :lang(km){ - --RS__baseFontFamily:"Khmer Sangam MN", "Leelawadee UI", "Khmer UI", roboto, noto, "Noto Sans Khmer", sans-serif; - --RS__lineHeightCompensation:1.067; + --RS__baseFontFamily:var(--RS__km-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__km-lineHeightCompensation); } :lang(kn){ - --RS__baseFontFamily:"Kannada Sangam MN", "Nirmala UI", tunga, roboto, noto, "Noto Sans Kannada", sans-serif; - --RS__lineHeightCompensation:1.1; + --RS__baseFontFamily:var(--RS__kn-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__kn-lineHeightCompensation); } :lang(ko){ - --RS__baseFontFamily:"Nanum Gothic", "Apple SD Gothic Neo", "Malgun Gothic", roboto, noto, "Noto Sans CJK KR", sans-serif; - --RS__lineHeightCompensation:1.167; + --RS__baseFontFamily:var(--RS__ko-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__ko-lineHeightCompensation); } :lang(lo){ - --RS__baseFontFamily:"Lao Sangam MN", "Leelawadee UI", "Lao UI", roboto, noto, "Noto Sans Lao", sans-serif; + --RS__baseFontFamily:var(--RS__lo-baseFontFamily); } :lang(ml){ - --RS__baseFontFamily:"Malayalam Sangam MN", "Nirmala UI", kartika, roboto, noto, "Noto Sans Malayalam", sans-serif; - --RS__lineHeightCompensation:1.067; + --RS__baseFontFamily:var(--RS__ml-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__ml-lineHeightCompensation); } :lang(or){ - --RS__baseFontFamily:"Oriya Sangam MN", "Nirmala UI", kalinga, roboto, noto, "Noto Sans Oriya", sans-serif; - --RS__lineHeightCompensation:1.167; + --RS__baseFontFamily:var(--RS__or-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__or-lineHeightCompensation); } :lang(pa){ - --RS__baseFontFamily:"Gurmukhi MN", "Nirmala UI", kartika, roboto, noto, "Noto Sans Gurmukhi", sans-serif; - --RS__lineHeightCompensation:1.1; + --RS__baseFontFamily:var(--RS__pa-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__pa-lineHeightCompensation); } :lang(si){ - --RS__baseFontFamily:"Sinhala Sangam MN", "Nirmala UI", "Iskoola Pota", roboto, noto, "Noto Sans Sinhala", sans-serif; - --RS__lineHeightCompensation:1.167; + --RS__baseFontFamily:var(--RS__si-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__si-lineHeightCompensation); } :lang(ta){ - --RS__baseFontFamily:"Tamil Sangam MN", "Nirmala UI", latha, roboto, noto, "Noto Sans Tamil", sans-serif; - --RS__lineHeightCompensation:1.067; + --RS__baseFontFamily:var(--RS__ta-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__ta-lineHeightCompensation); } :lang(te){ - --RS__baseFontFamily:"Kohinoor Telugu", "Telugu Sangam MN", "Nirmala UI", gautami, roboto, noto, "Noto Sans Telugu", sans-serif; + --RS__baseFontFamily:var(--RS__te-baseFontFamily); } :lang(th){ - --RS__baseFontFamily:"Thonburi", "Leelawadee UI", "Cordia New", roboto, noto, "Noto Sans Thai", sans-serif; - --RS__lineHeightCompensation:1.067; + --RS__baseFontFamily:var(--RS__th-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__th-lineHeightCompensation); } :lang(zh){ - --RS__baseFontFamily:"方体", "PingFang SC", "黑体", "Heiti SC", "Microsoft JhengHei UI", "Microsoft JhengHei", roboto, noto, "Noto Sans CJK SC", sans-serif; - --RS__lineHeightCompensation:1.167; + --RS__baseFontFamily:var(--RS__zh-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__zh-lineHeightCompensation); +} + +:lang(zh-Hant){ + --RS__baseFontFamily:var(--RS__zh-Hant-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__zh-Hant-lineHeightCompensation); } -:lang(zh-Hant), :lang(zh-TW){ - --RS__baseFontFamily:"方體", "PingFang TC", "黑體", "Heiti TC", "Microsoft JhengHei UI", "Microsoft JhengHei", roboto, noto, "Noto Sans CJK TC", sans-serif; - --RS__lineHeightCompensation:1.167; + --RS__baseFontFamily:var(--RS__zh-TW-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__zh-TW-lineHeightCompensation); } :lang(zh-HK){ - --RS__baseFontFamily:"方體", "PingFang HK", "方體", "PingFang TC", "黑體", "Heiti TC", "Microsoft JhengHei UI", "Microsoft JhengHei", roboto, noto, "Noto Sans CJK TC", sans-serif; - --RS__lineHeightCompensation:1.167; + --RS__baseFontFamily:var(--RS__zh-HK-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__zh-HK-lineHeightCompensation); } body{ diff --git a/css/dist/cjk-vertical/ReadiumCSS-default.css b/css/dist/cjk-vertical/ReadiumCSS-default.css index 580e1e8..dd9f306 100644 --- a/css/dist/cjk-vertical/ReadiumCSS-default.css +++ b/css/dist/cjk-vertical/ReadiumCSS-default.css @@ -1,5 +1,5 @@ /*! - * Readium CSS v.2.0.2 + * Readium CSS v.2.0.3 * Copyright (c) 2017–2026. Readium Foundation. All rights reserved. * Use of this source code is governed by a BSD-style license which is detailed in the * LICENSE file present in the project repository where this source code is maintained. diff --git a/css/dist/rtl/ReadiumCSS-after.css b/css/dist/rtl/ReadiumCSS-after.css index 7789af3..4ad7865 100644 --- a/css/dist/rtl/ReadiumCSS-after.css +++ b/css/dist/rtl/ReadiumCSS-after.css @@ -1,5 +1,5 @@ /*! - * Readium CSS v.2.0.2 + * Readium CSS v.2.0.3 * Copyright (c) 2017–2026. Readium Foundation. All rights reserved. * Use of this source code is governed by a BSD-style license which is detailed in the * LICENSE file present in the project repository where this source code is maintained. diff --git a/css/dist/rtl/ReadiumCSS-before.css b/css/dist/rtl/ReadiumCSS-before.css index 54eb3bb..c9c02ff 100644 --- a/css/dist/rtl/ReadiumCSS-before.css +++ b/css/dist/rtl/ReadiumCSS-before.css @@ -1,5 +1,5 @@ /*! - * Readium CSS v.2.0.2 + * Readium CSS v.2.0.3 * Copyright (c) 2017–2026. Readium Foundation. All rights reserved. * Use of this source code is governed by a BSD-style license which is detailed in the * LICENSE file present in the project repository where this source code is maintained. @@ -32,6 +32,14 @@ :root{ + --RS__sans-serif-ja-v:'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Hiragino Kaku Gothic Pro', 'ヒラギノ角ゴ W3', 'YuGothic', 'Yu Gothic Medium', 'BIZ UDGothic', 'Yu Gothic', 'MSゴシック', 'MS Gothic', sans-serif; + + --RS__serif-ja-v:'Hiragino Mincho ProN', 'Hiragino Mincho Pro', 'YuMincho', 'BIZ UDMincho', 'Yu Mincho', 'MS明朝', 'MS Mincho', serif; + + --RS__sans-serif-ja:'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Hiragino Kaku Gothic Pro', 'ヒラギノ角ゴ W3', 'YuGothic', 'Yu Gothic Medium', 'BIZ UDPGothic', 'Yu Gothic', 'MS Pゴシック', 'MS PGothic', sans-serif; + + --RS__serif-ja:'Hiragino Mincho ProN', 'Hiragino Mincho Pro', 'YuMincho', 'BIZ UDPMincho', 'Yu Mincho', 'MS P明朝', 'MS PMincho', serif; + --RS__monospaceTf:ui-monospace, 'Andale Mono', 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace; --RS__humanistTf:Seravek, Calibri, 'Gill Sans Nova', Roboto, Ubuntu, 'DejaVu Sans', source-sans-pro, sans-serif; @@ -41,9 +49,106 @@ --RS__modernTf:Athelas, Constantia, Charter, 'Bitstream Charter', Cambria, 'Georgia Pro', Georgia, serif; --RS__oldStyleTf:'Iowan Old Style', Sitka, 'Sitka Text', Palatino, 'Book Antiqua', 'URW Palladio L', P052, serif; - --RS__baseFontFamily:var(--RS__oldStyleTf); - --RS__lineHeightCompensation:1; + --RS__zh-HK-lineHeightCompensation:1.167; + + --RS__zh-HK-baseFontFamily:'方體', 'PingFang HK', '方體', 'PingFang TC', '黑體', 'Heiti TC', 'Microsoft JhengHei UI', 'Microsoft JhengHei', Roboto, Noto, 'Noto Sans CJK TC', sans-serif; + + --RS__zh-TW-lineHeightCompensation:1.167; + + --RS__zh-TW-baseFontFamily:'方體', 'PingFang TC', '黑體', 'Heiti TC', 'Microsoft JhengHei UI', 'Microsoft JhengHei', Roboto, Noto, 'Noto Sans CJK TC', sans-serif; + + --RS__zh-Hant-lineHeightCompensation:1.167; + + --RS__zh-Hant-baseFontFamily:'方體', 'PingFang TC', '黑體', 'Heiti TC', 'Microsoft JhengHei UI', 'Microsoft JhengHei', Roboto, Noto, 'Noto Sans CJK TC', sans-serif; + + --RS__zh-lineHeightCompensation:1.167; + + --RS__zh-baseFontFamily:'方体', 'PingFang SC', '黑体', 'Heiti SC', 'Microsoft JhengHei UI', 'Microsoft JhengHei', Roboto, Noto, 'Noto Sans CJK SC', sans-serif; + + --RS__th-lineHeightCompensation:1.067; + + --RS__th-baseFontFamily:Thonburi, 'Leelawadee UI', 'Cordia New', Roboto, Noto, 'Noto Sans Thai', sans-serif; + + --RS__te-baseFontFamily:'Kohinoor Telugu', 'Telugu Sangam MN', 'Nirmala UI', Gautami, Roboto, Noto, 'Noto Sans Telugu', sans-serif; + + --RS__ta-lineHeightCompensation:1.067; + + --RS__ta-baseFontFamily:'Tamil Sangam MN', 'Nirmala UI', Latha, Roboto, Noto, 'Noto Sans Tamil', sans-serif; + + --RS__si-lineHeightCompensation:1.167; + + --RS__si-baseFontFamily:'Sinhala Sangam MN', 'Nirmala UI', 'Iskoola Pota', Roboto, Noto, 'Noto Sans Sinhala', sans-serif; + + --RS__pa-lineHeightCompensation:1.1; + + --RS__pa-baseFontFamily:'Gurmukhi MN', 'Nirmala UI', Kartika, Roboto, Noto, 'Noto Sans Gurmukhi', sans-serif; + + --RS__or-lineHeightCompensation:1.167; + + --RS__or-baseFontFamily:'Oriya Sangam MN', 'Nirmala UI', Kalinga, Roboto, Noto, 'Noto Sans Oriya', sans-serif; + + --RS__ml-lineHeightCompensation:1.067; + + --RS__ml-baseFontFamily:'Malayalam Sangam MN', 'Nirmala UI', Kartika, Roboto, Noto, 'Noto Sans Malayalam', sans-serif; + + --RS__lo-baseFontFamily:'Lao Sangam MN', 'Leelawadee UI', 'Lao UI', Roboto, Noto, 'Noto Sans Lao', sans-serif; + + --RS__ko-lineHeightCompensation:1.167; + + --RS__ko-baseFontFamily:'Nanum Gothic', 'Apple SD Gothic Neo', 'Malgun Gothic', Roboto, Noto, 'Noto Sans CJK KR', sans-serif; + + --RS__kn-lineHeightCompensation:1.1; + + --RS__kn-baseFontFamily:'Kannada Sangam MN', 'Nirmala UI', Tunga, Roboto, Noto, 'Noto Sans Kannada', sans-serif; + + --RS__km-lineHeightCompensation:1.067; + + --RS__km-baseFontFamily:'Khmer Sangam MN', 'Leelawadee UI', 'Khmer UI', Roboto, Noto, 'Noto Sans Khmer', sans-serif; + + --RS__ja-lineHeightCompensation:1.167; + + --RS__ja-baseFontFamily:YuGothic, 'Hiragino Maru Gothic ProN', 'Hiragino Sans', 'Yu Gothic UI', 'Meiryo UI', 'MS Gothic', Roboto, Noto, 'Noto Sans CJK JP', sans-serif; + + --RS__iu-baseFontFamily:'Euphemia UCAS', Euphemia, Roboto, Noto, 'Noto Sans Canadian Aboriginal', sans-serif; + + --RS__hy-baseFontFamily:Mshtakan, Sylfaen, Roboto, Noto, 'Noto Serif Armenian', serif; + + --RS__hi-lineHeightCompensation:1.1; + + --RS__hi-baseFontFamily:'Kohinoor Devanagari', 'Devanagari Sangam MN', Kokila, 'Nirmala UI', Roboto, Noto, 'Noto Sans Devanagari', sans-serif; + + --RS__he-lineHeightCompensation:1.1; + + --RS__he-baseFontFamily:'New Peninim MT', 'Arial Hebrew', Gisha, 'Times New Roman', Roboto, Noto, 'Noto Sans Hebrew', sans-serif; + + --RS__gu-lineHeightCompensation:1.167; + + --RS__gu-baseFontFamily:'Gujarati Sangam MN', 'Nirmala UI', Shruti, Roboto, Noto, 'Noto Sans Gujarati', sans-serif; + + --RS__fa-baseFontFamily:'Geeza Pro', 'Arabic Typesetting', Roboto, Noto, 'Noto Naskh Arabic', 'Times New Roman', serif; + + --RS__chr-lineHeightCompensation:1.167; + + --RS__chr-baseFontFamily:'Plantagenet Cherokee', Roboto, Noto, 'Noto Sans Cherokee'; + + --RS__bo-baseFontFamily:Kailasa, 'Microsoft Himalaya', Roboto, Noto, 'Noto Sans Tibetan', sans-serif; + + --RS__bn-lineHeightCompensation:1.067; + + --RS__bn-baseFontFamily:'Kohinoor Bangla', 'Bangla Sangam MN', Vrinda, Roboto, Noto, 'Noto Sans Bengali', sans-serif; + + --RS__ar-baseFontFamily:'Geeza Pro', 'Arabic Typesetting', Roboto, Noto, 'Noto Naskh Arabic', 'Times New Roman', serif; + + --RS__am-lineHeightCompensation:1.167; + + --RS__am-baseFontFamily:Kefa, Nyala, Roboto, Noto, 'Noto Sans Ethiopic', serif; + + --RS__default-lineHeightCompensation:1; + + --RS__default-baseFontFamily:var(--RS__oldStyleTf); + --RS__baseFontFamily:var(--RS__default-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__default-lineHeightCompensation); --RS__baseLineHeight:calc(1.5 * var(--RS__lineHeightCompensation)); --RS__selectionTextColor:inherit; @@ -97,132 +202,131 @@ math{ } :lang(am){ - --RS__baseFontFamily:kefa, nyala, roboto, noto, "Noto Sans Ethiopic", serif; - --RS__lineHeightCompensation:1.167; + --RS__baseFontFamily:var(--RS__am-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__am-lineHeightCompensation); } :lang(ar){ - --RS__baseFontFamily:"Geeza Pro", "Arabic Typesetting", roboto, noto, "Noto Naskh Arabic", "Times New Roman", serif; + --RS__baseFontFamily:var(--RS__ar-baseFontFamily); } :lang(bn){ - --RS__baseFontFamily:"Kohinoor Bangla", "Bangla Sangam MN", vrinda, roboto, noto, "Noto Sans Bengali", sans-serif; - --RS__lineHeightCompensation:1.067; + --RS__baseFontFamily:var(--RS__bn-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__bn-lineHeightCompensation); } :lang(bo){ - --RS__baseFontFamily:kailasa, "Microsoft Himalaya", roboto, noto, "Noto Sans Tibetan", sans-serif; + --RS__baseFontFamily:var(--RS__bo-baseFontFamily); } :lang(chr){ - --RS__baseFontFamily:"Plantagenet Cherokee", roboto, noto, "Noto Sans Cherokee"; - --RS__lineHeightCompensation:1.167; + --RS__baseFontFamily:var(--RS__chr-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__chr-lineHeightCompensation); } :lang(fa){ - --RS__baseFontFamily:"Geeza Pro", "Arabic Typesetting", roboto, noto, "Noto Naskh Arabic", "Times New Roman", serif; + --RS__baseFontFamily:var(--RS__fa-baseFontFamily); } :lang(gu){ - --RS__baseFontFamily:"Gujarati Sangam MN", "Nirmala UI", shruti, roboto, noto, "Noto Sans Gujarati", sans-serif; - --RS__lineHeightCompensation:1.167; + --RS__baseFontFamily:var(--RS__gu-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__gu-lineHeightCompensation); } :lang(he){ - --RS__baseFontFamily:"New Peninim MT", "Arial Hebrew", gisha, "Times New Roman", roboto, noto, "Noto Sans Hebrew" sans-serif; - --RS__lineHeightCompensation:1.1; + --RS__baseFontFamily:var(--RS__he-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__he-lineHeightCompensation); } :lang(hi){ - --RS__baseFontFamily:"Kohinoor Devanagari", "Devanagari Sangam MN", kokila, "Nirmala UI", roboto, noto, "Noto Sans Devanagari", sans-serif; - - --RS__lineHeightCompensation:1.1; + --RS__baseFontFamily:var(--RS__hi-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__hi-lineHeightCompensation); } :lang(hy){ - --RS__baseFontFamily:mshtakan, sylfaen, roboto, noto, "Noto Serif Armenian", serif; + --RS__baseFontFamily:var(--RS__hy-baseFontFamily); } :lang(iu){ - --RS__baseFontFamily:"Euphemia UCAS", euphemia, roboto, noto, "Noto Sans Canadian Aboriginal", sans-serif; + --RS__baseFontFamily:var(--RS__iu-baseFontFamily); } :lang(ja){ - --RS__baseFontFamily:yugothic, "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic UI", "Meiryo UI", "MS Gothic", roboto, noto, "Noto Sans CJK JP", sans-serif; - --RS__lineHeightCompensation:1.167; - --RS__serif-ja:"Hiragino Mincho ProN", "Hiragino Mincho Pro", "YuMincho", "BIZ UDPMincho", "Yu Mincho", "MS P明朝", "MS PMincho", serif; - --RS__sans-serif-ja:"Hiragino Sans", "Hiragino Kaku Gothic ProN", "Hiragino Kaku Gothic Pro", "ヒラギノ角ゴ W3", "YuGothic", "Yu Gothic Medium", "BIZ UDPGothic", "Yu Gothic", "MS Pゴシック", "MS PGothic", sans-serif; - --RS__serif-ja-v:"Hiragino Mincho ProN", "Hiragino Mincho Pro", "YuMincho", "BIZ UDMincho", "Yu Mincho", "MS明朝", "MS Mincho", serif; - --RS__sans-serif-ja-v:"Hiragino Sans", "Hiragino Kaku Gothic ProN", "Hiragino Kaku Gothic Pro", "ヒラギノ角ゴ W3", "YuGothic", "Yu Gothic Medium", "BIZ UDGothic", "Yu Gothic", "MSゴシック", "MS Gothic", sans-serif; + --RS__baseFontFamily:var(--RS__ja-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__ja-lineHeightCompensation); } :lang(km){ - --RS__baseFontFamily:"Khmer Sangam MN", "Leelawadee UI", "Khmer UI", roboto, noto, "Noto Sans Khmer", sans-serif; - --RS__lineHeightCompensation:1.067; + --RS__baseFontFamily:var(--RS__km-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__km-lineHeightCompensation); } :lang(kn){ - --RS__baseFontFamily:"Kannada Sangam MN", "Nirmala UI", tunga, roboto, noto, "Noto Sans Kannada", sans-serif; - --RS__lineHeightCompensation:1.1; + --RS__baseFontFamily:var(--RS__kn-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__kn-lineHeightCompensation); } :lang(ko){ - --RS__baseFontFamily:"Nanum Gothic", "Apple SD Gothic Neo", "Malgun Gothic", roboto, noto, "Noto Sans CJK KR", sans-serif; - --RS__lineHeightCompensation:1.167; + --RS__baseFontFamily:var(--RS__ko-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__ko-lineHeightCompensation); } :lang(lo){ - --RS__baseFontFamily:"Lao Sangam MN", "Leelawadee UI", "Lao UI", roboto, noto, "Noto Sans Lao", sans-serif; + --RS__baseFontFamily:var(--RS__lo-baseFontFamily); } :lang(ml){ - --RS__baseFontFamily:"Malayalam Sangam MN", "Nirmala UI", kartika, roboto, noto, "Noto Sans Malayalam", sans-serif; - --RS__lineHeightCompensation:1.067; + --RS__baseFontFamily:var(--RS__ml-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__ml-lineHeightCompensation); } :lang(or){ - --RS__baseFontFamily:"Oriya Sangam MN", "Nirmala UI", kalinga, roboto, noto, "Noto Sans Oriya", sans-serif; - --RS__lineHeightCompensation:1.167; + --RS__baseFontFamily:var(--RS__or-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__or-lineHeightCompensation); } :lang(pa){ - --RS__baseFontFamily:"Gurmukhi MN", "Nirmala UI", kartika, roboto, noto, "Noto Sans Gurmukhi", sans-serif; - --RS__lineHeightCompensation:1.1; + --RS__baseFontFamily:var(--RS__pa-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__pa-lineHeightCompensation); } :lang(si){ - --RS__baseFontFamily:"Sinhala Sangam MN", "Nirmala UI", "Iskoola Pota", roboto, noto, "Noto Sans Sinhala", sans-serif; - --RS__lineHeightCompensation:1.167; + --RS__baseFontFamily:var(--RS__si-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__si-lineHeightCompensation); } :lang(ta){ - --RS__baseFontFamily:"Tamil Sangam MN", "Nirmala UI", latha, roboto, noto, "Noto Sans Tamil", sans-serif; - --RS__lineHeightCompensation:1.067; + --RS__baseFontFamily:var(--RS__ta-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__ta-lineHeightCompensation); } :lang(te){ - --RS__baseFontFamily:"Kohinoor Telugu", "Telugu Sangam MN", "Nirmala UI", gautami, roboto, noto, "Noto Sans Telugu", sans-serif; + --RS__baseFontFamily:var(--RS__te-baseFontFamily); } :lang(th){ - --RS__baseFontFamily:"Thonburi", "Leelawadee UI", "Cordia New", roboto, noto, "Noto Sans Thai", sans-serif; - --RS__lineHeightCompensation:1.067; + --RS__baseFontFamily:var(--RS__th-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__th-lineHeightCompensation); } :lang(zh){ - --RS__baseFontFamily:"方体", "PingFang SC", "黑体", "Heiti SC", "Microsoft JhengHei UI", "Microsoft JhengHei", roboto, noto, "Noto Sans CJK SC", sans-serif; - --RS__lineHeightCompensation:1.167; + --RS__baseFontFamily:var(--RS__zh-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__zh-lineHeightCompensation); +} + +:lang(zh-Hant){ + --RS__baseFontFamily:var(--RS__zh-Hant-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__zh-Hant-lineHeightCompensation); } -:lang(zh-Hant), :lang(zh-TW){ - --RS__baseFontFamily:"方體", "PingFang TC", "黑體", "Heiti TC", "Microsoft JhengHei UI", "Microsoft JhengHei", roboto, noto, "Noto Sans CJK TC", sans-serif; - --RS__lineHeightCompensation:1.167; + --RS__baseFontFamily:var(--RS__zh-TW-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__zh-TW-lineHeightCompensation); } :lang(zh-HK){ - --RS__baseFontFamily:"方體", "PingFang HK", "方體", "PingFang TC", "黑體", "Heiti TC", "Microsoft JhengHei UI", "Microsoft JhengHei", roboto, noto, "Noto Sans CJK TC", sans-serif; - --RS__lineHeightCompensation:1.167; + --RS__baseFontFamily:var(--RS__zh-HK-baseFontFamily); + --RS__lineHeightCompensation:var(--RS__zh-HK-lineHeightCompensation); } body{ diff --git a/css/dist/rtl/ReadiumCSS-default.css b/css/dist/rtl/ReadiumCSS-default.css index b7ffbb2..e90c38a 100644 --- a/css/dist/rtl/ReadiumCSS-default.css +++ b/css/dist/rtl/ReadiumCSS-default.css @@ -1,5 +1,5 @@ /*! - * Readium CSS v.2.0.2 + * Readium CSS v.2.0.3 * Copyright (c) 2017–2026. Readium Foundation. All rights reserved. * Use of this source code is governed by a BSD-style license which is detailed in the * LICENSE file present in the project repository where this source code is maintained. diff --git a/css/dist/webPub/ReadiumCSS-webPub.css b/css/dist/webPub/ReadiumCSS-webPub.css index 20ed3d5..9a5d871 100644 --- a/css/dist/webPub/ReadiumCSS-webPub.css +++ b/css/dist/webPub/ReadiumCSS-webPub.css @@ -1,5 +1,5 @@ /*! - * Readium CSS v.2.0.2 + * Readium CSS v.2.0.3 * Copyright (c) 2017–2026. Readium Foundation. All rights reserved. * Use of this source code is governed by a BSD-style license which is detailed in the * LICENSE file present in the project repository where this source code is maintained. diff --git a/css/postcss.config.js b/css/postcss.config.js index 174b186..a7e48d8 100644 --- a/css/postcss.config.js +++ b/css/postcss.config.js @@ -51,7 +51,9 @@ module.exports = (ctx) => ({ root: ctx.file.dirname }), require("postcss-custom-selectors")({}), - require("@daltontan/postcss-import-json")({}), + require("@daltontan/postcss-import-json")({ + prefix: "--RS__" + }), require("postcss-discard-comments")({}), require("stylelint")({ "fix": true, diff --git a/css/src/modules/ReadiumCSS-base.css b/css/src/modules/ReadiumCSS-base.css index f3c5e1b..5163c83 100644 --- a/css/src/modules/ReadiumCSS-base.css +++ b/css/src/modules/ReadiumCSS-base.css @@ -19,12 +19,14 @@ /* Default font-stacks */ @import-json "../../vars/fontStacks.json"; - /* Config */ - --RS__baseFontFamily: var(--RS__oldStyleTf); + /* i18n data (language-specific font stacks and line-height compensations) */ + @import-json "../../vars/i18n.json"; - /* For square-ish fonts (CJK, Indic, etc.), we must apply some compensation in dynamic leading. Default is 1 i.e. no compensation */ - --RS__lineHeightCompensation: 1; + /* Config */ + --RS__baseFontFamily: var(--RS__default-baseFontFamily); + /* For square-ish fonts (CJK, Indic, etc.), we must apply some compensation in leading. Default is 1 i.e. no compensation */ + --RS__lineHeightCompensation: var(--RS__default-lineHeightCompensation); --RS__baseLineHeight: calc(1.5 * var(--RS__lineHeightCompensation)); /* Default colors (previously implemented as day mode) */ @@ -80,144 +82,132 @@ math { That will only work if either html or body have a (xml:)lang attribute, not for inline overrides */ :lang(am) { - --RS__baseFontFamily: Kefa, Nyala, Roboto, Noto, "Noto Sans Ethiopic", serif; - --RS__lineHeightCompensation: 1.167; + --RS__baseFontFamily: var(--RS__am-baseFontFamily); + --RS__lineHeightCompensation: var(--RS__am-lineHeightCompensation); } :lang(ar) { - --RS__baseFontFamily: "Geeza Pro", "Arabic Typesetting", Roboto, Noto, "Noto Naskh Arabic", "Times New Roman", serif; + --RS__baseFontFamily: var(--RS__ar-baseFontFamily); } :lang(bn) { - --RS__baseFontFamily: "Kohinoor Bangla", "Bangla Sangam MN", Vrinda, Roboto, Noto, "Noto Sans Bengali", sans-serif; - --RS__lineHeightCompensation: 1.067; + --RS__baseFontFamily: var(--RS__bn-baseFontFamily); + --RS__lineHeightCompensation: var(--RS__bn-lineHeightCompensation); } :lang(bo) { - --RS__baseFontFamily: Kailasa, "Microsoft Himalaya", Roboto, Noto, "Noto Sans Tibetan", sans-serif; + --RS__baseFontFamily: var(--RS__bo-baseFontFamily); } :lang(chr) { - --RS__baseFontFamily: "Plantagenet Cherokee", Roboto, Noto, "Noto Sans Cherokee"; - --RS__lineHeightCompensation: 1.167; + --RS__baseFontFamily: var(--RS__chr-baseFontFamily); + --RS__lineHeightCompensation: var(--RS__chr-lineHeightCompensation); } :lang(fa) { - --RS__baseFontFamily: "Geeza Pro", "Arabic Typesetting", Roboto, Noto, "Noto Naskh Arabic", "Times New Roman", serif; + --RS__baseFontFamily: var(--RS__fa-baseFontFamily); } :lang(gu) { - --RS__baseFontFamily: "Gujarati Sangam MN", "Nirmala UI", Shruti, Roboto, Noto, "Noto Sans Gujarati", sans-serif; - --RS__lineHeightCompensation: 1.167; + --RS__baseFontFamily: var(--RS__gu-baseFontFamily); + --RS__lineHeightCompensation: var(--RS__gu-lineHeightCompensation); } :lang(he) { - --RS__baseFontFamily: "New Peninim MT", "Arial Hebrew", Gisha, "Times New Roman", Roboto, Noto, "Noto Sans Hebrew" sans-serif; - --RS__lineHeightCompensation: 1.1; + --RS__baseFontFamily: var(--RS__he-baseFontFamily); + --RS__lineHeightCompensation: var(--RS__he-lineHeightCompensation); } :lang(hi) { - --RS__baseFontFamily: "Kohinoor Devanagari", "Devanagari Sangam MN", Kokila, "Nirmala UI", Roboto, Noto, "Noto Sans Devanagari", sans-serif; - - --RS__lineHeightCompensation: 1.1; + --RS__baseFontFamily: var(--RS__hi-baseFontFamily); + --RS__lineHeightCompensation: var(--RS__hi-lineHeightCompensation); } :lang(hy) { - --RS__baseFontFamily: Mshtakan, Sylfaen, Roboto, Noto, "Noto Serif Armenian", serif; + --RS__baseFontFamily: var(--RS__hy-baseFontFamily); } :lang(iu) { - --RS__baseFontFamily: "Euphemia UCAS", Euphemia, Roboto, Noto, "Noto Sans Canadian Aboriginal", sans-serif; + --RS__baseFontFamily: var(--RS__iu-baseFontFamily); } +/* See also extra variables for Japanese font-stacks in vars folder as we may want to reuse them for user settings + default */ +/* This setting uses the BIZ UD font for serif and the Yu font for sans serif on Windows. Note: When using the BIZ UD font for vertical writing display, if you set half-width (ASCII) characters to stand upright with `text-orientation: upright`, the width of these characters is narrow. By specifying `font-variant-east-asian: full-width;` at the same time, you can display the characters with the width of one full-width character. */ :lang(ja) { - --RS__baseFontFamily: YuGothic, "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic UI", "Meiryo UI", "MS Gothic", Roboto, Noto, "Noto Sans CJK JP", sans-serif; - - /* For CJK, the line-height is usually 15–20% more than for Latin */ - --RS__lineHeightCompensation: 1.167; - - /* Extra variables for Japanese font-stacks as we may want to reuse them for user settings + default */ - /* This setting uses the BIZ UD font for serif and the Yu font for sans serif on Windows. Note: When using the BIZ UD font for vertical writing display, if you set half-width (ASCII) characters to stand upright with `text-orientation: upright`, the width of these characters is narrow. By specifying `font-variant-east-asian: full-width;` at the same time, you can display the characters with the width of one full-width character. */ - --RS__serif-ja: "Hiragino Mincho ProN", "Hiragino Mincho Pro", "YuMincho", "BIZ UDPMincho", "Yu Mincho", "MS P明朝", "MS PMincho", serif; - --RS__sans-serif-ja: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Hiragino Kaku Gothic Pro", "ヒラギノ角ゴ W3", "YuGothic", "Yu Gothic Medium", "BIZ UDPGothic", "Yu Gothic", "MS Pゴシック", "MS PGothic", sans-serif; - --RS__serif-ja-v: "Hiragino Mincho ProN", "Hiragino Mincho Pro", "YuMincho", "BIZ UDMincho", "Yu Mincho", "MS明朝", "MS Mincho", serif; - --RS__sans-serif-ja-v: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Hiragino Kaku Gothic Pro", "ヒラギノ角ゴ W3", "YuGothic", "Yu Gothic Medium", "BIZ UDGothic", "Yu Gothic", "MSゴシック", "MS Gothic", sans-serif; + --RS__baseFontFamily: var(--RS__ja-baseFontFamily); + --RS__lineHeightCompensation: var(--RS__ja-lineHeightCompensation); } :lang(km) { - --RS__baseFontFamily: "Khmer Sangam MN", "Leelawadee UI", "Khmer UI", Roboto, Noto, "Noto Sans Khmer", sans-serif; - --RS__lineHeightCompensation: 1.067; + --RS__baseFontFamily: var(--RS__km-baseFontFamily); + --RS__lineHeightCompensation: var(--RS__km-lineHeightCompensation); } :lang(kn) { - --RS__baseFontFamily: "Kannada Sangam MN", "Nirmala UI", Tunga, Roboto, Noto, "Noto Sans Kannada", sans-serif; - --RS__lineHeightCompensation: 1.1; + --RS__baseFontFamily: var(--RS__kn-baseFontFamily); + --RS__lineHeightCompensation: var(--RS__kn-lineHeightCompensation); } :lang(ko) { - --RS__baseFontFamily: "Nanum Gothic", "Apple SD Gothic Neo", "Malgun Gothic", Roboto, Noto, "Noto Sans CJK KR", sans-serif; - - /* For CJK, the line-height is usually 15–20% more than for Latin */ - --RS__lineHeightCompensation: 1.167; + --RS__baseFontFamily: var(--RS__ko-baseFontFamily); + --RS__lineHeightCompensation: var(--RS__ko-lineHeightCompensation); } :lang(lo) { - --RS__baseFontFamily: "Lao Sangam MN", "Leelawadee UI", "Lao UI", Roboto, Noto, "Noto Sans Lao", sans-serif; + --RS__baseFontFamily: var(--RS__lo-baseFontFamily); } :lang(ml) { - --RS__baseFontFamily: "Malayalam Sangam MN", "Nirmala UI", Kartika, Roboto, Noto, "Noto Sans Malayalam", sans-serif; - --RS__lineHeightCompensation: 1.067; + --RS__baseFontFamily: var(--RS__ml-baseFontFamily); + --RS__lineHeightCompensation: var(--RS__ml-lineHeightCompensation); } :lang(or) { - --RS__baseFontFamily: "Oriya Sangam MN", "Nirmala UI", Kalinga, Roboto, Noto, "Noto Sans Oriya", sans-serif; - --RS__lineHeightCompensation: 1.167; + --RS__baseFontFamily: var(--RS__or-baseFontFamily); + --RS__lineHeightCompensation: var(--RS__or-lineHeightCompensation); } :lang(pa) { - --RS__baseFontFamily: "Gurmukhi MN", "Nirmala UI", Kartika, Roboto, Noto, "Noto Sans Gurmukhi", sans-serif; - --RS__lineHeightCompensation: 1.1; + --RS__baseFontFamily: var(--RS__pa-baseFontFamily); + --RS__lineHeightCompensation: var(--RS__pa-lineHeightCompensation); } :lang(si) { - --RS__baseFontFamily: "Sinhala Sangam MN", "Nirmala UI", "Iskoola Pota", Roboto, Noto, "Noto Sans Sinhala", sans-serif; - --RS__lineHeightCompensation: 1.167; + --RS__baseFontFamily: var(--RS__si-baseFontFamily); + --RS__lineHeightCompensation: var(--RS__si-lineHeightCompensation); } :lang(ta) { - --RS__baseFontFamily: "Tamil Sangam MN", "Nirmala UI", Latha, Roboto, Noto, "Noto Sans Tamil", sans-serif; - --RS__lineHeightCompensation: 1.067; + --RS__baseFontFamily: var(--RS__ta-baseFontFamily); + --RS__lineHeightCompensation: var(--RS__ta-lineHeightCompensation); } :lang(te) { - --RS__baseFontFamily: "Kohinoor Telugu", "Telugu Sangam MN", "Nirmala UI", Gautami, Roboto, Noto, "Noto Sans Telugu", sans-serif; + --RS__baseFontFamily: var(--RS__te-baseFontFamily); } :lang(th) { - --RS__baseFontFamily: "Thonburi", "Leelawadee UI", "Cordia New", Roboto, Noto, "Noto Sans Thai", sans-serif; - --RS__lineHeightCompensation: 1.067; + --RS__baseFontFamily: var(--RS__th-baseFontFamily); + --RS__lineHeightCompensation: var(--RS__th-lineHeightCompensation); } /* The following will also work for zh-Hans */ :lang(zh) { - --RS__baseFontFamily: "方体", "PingFang SC", "黑体", "Heiti SC", "Microsoft JhengHei UI", "Microsoft JhengHei", Roboto, Noto, "Noto Sans CJK SC", sans-serif; + --RS__baseFontFamily: var(--RS__zh-baseFontFamily); + --RS__lineHeightCompensation: var(--RS__zh-lineHeightCompensation); +} - /* For CJK, the line-height is usually 15–20% more than for Latin */ - --RS__lineHeightCompensation: 1.167; +:lang(zh-Hant) { + --RS__baseFontFamily: var(--RS__zh-Hant-baseFontFamily); + --RS__lineHeightCompensation: var(--RS__zh-Hant-lineHeightCompensation); } -:lang(zh-Hant), :lang(zh-TW) { - --RS__baseFontFamily: "方體", "PingFang TC", "黑體", "Heiti TC", "Microsoft JhengHei UI", "Microsoft JhengHei", Roboto, Noto, "Noto Sans CJK TC", sans-serif; - - /* For CJK, the line-height is usually 15–20% more than for Latin */ - --RS__lineHeightCompensation: 1.167; + --RS__baseFontFamily: var(--RS__zh-TW-baseFontFamily); + --RS__lineHeightCompensation: var(--RS__zh-TW-lineHeightCompensation); } :lang(zh-HK) { - --RS__baseFontFamily: "方體", "PingFang HK", "方體", "PingFang TC", "黑體", "Heiti TC", "Microsoft JhengHei UI", "Microsoft JhengHei", Roboto, Noto, "Noto Sans CJK TC", sans-serif; - - /* For CJK, the line-height is usually 15–20% more than for Latin */ - --RS__lineHeightCompensation: 1.167; + --RS__baseFontFamily: var(--RS__zh-HK-baseFontFamily); + --RS__lineHeightCompensation: var(--RS__zh-HK-lineHeightCompensation); } \ No newline at end of file diff --git a/css/vars/CSS-Variables.md b/css/vars/CSS-Variables.md new file mode 100644 index 0000000..c6fe3bb --- /dev/null +++ b/css/vars/CSS-Variables.md @@ -0,0 +1,101 @@ +# CSS Variables Reference + +## Pagination + +| Variable | Value | +| --- | --- | +| `--RS__colWidth` | `100vw` | +| `--RS__colCount` | `1` | +| `--RS__colGap` | `0` | +| `--RS__defaultLineLength` | `100%` | +| `--RS__pageGutter` | `0` | +| `--RS__viewportWidth` | `100%` | + +## Colors + +| Variable | Value | +| --- | --- | +| `--RS__backgroundColor` | `#FFFFFF` | +| `--RS__textColor` | `#121212` | +| `--RS__linkColor` | `#0000EE` | +| `--RS__visitedColor` | `#551A8B` | +| `--RS__selectionBackgroundColor` | `#b4d8fe` | +| `--RS__selectionTextColor` | `inherit` | + +## Font Stacks + +| Variable | Value | +| --- | --- | +| `--RS__oldStyleTf` | `'Iowan Old Style', Sitka, 'Sitka Text', Palatino, 'Book Antiqua', 'URW Palladio L', P052, serif` | +| `--RS__modernTf` | `Athelas, Constantia, Charter, 'Bitstream Charter', Cambria, 'Georgia Pro', Georgia, serif` | +| `--RS__sansTf` | `-ui-sans-serif, -apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI Variable', 'Segoe UI', Inter, Roboto, 'Helvetica Neue', 'Arial Nova', 'Liberation Sans', Arial, sans-serif` | +| `--RS__humanistTf` | `Seravek, Calibri, 'Gill Sans Nova', Roboto, Ubuntu, 'DejaVu Sans', source-sans-pro, sans-serif` | +| `--RS__monospaceTf` | `ui-monospace, 'Andale Mono', 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace` | +| `--RS__serif-ja` | `'Hiragino Mincho ProN', 'Hiragino Mincho Pro', 'YuMincho', 'BIZ UDPMincho', 'Yu Mincho', 'MS P明朝', 'MS PMincho', serif` | +| `--RS__sans-serif-ja` | `'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Hiragino Kaku Gothic Pro', 'ヒラギノ角ゴ W3', 'YuGothic', 'Yu Gothic Medium', 'BIZ UDPGothic', 'Yu Gothic', 'MS Pゴシック', 'MS PGothic', sans-serif` | +| `--RS__serif-ja-v` | `'Hiragino Mincho ProN', 'Hiragino Mincho Pro', 'YuMincho', 'BIZ UDMincho', 'Yu Mincho', 'MS明朝', 'MS Mincho', serif` | +| `--RS__sans-serif-ja-v` | `'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Hiragino Kaku Gothic Pro', 'ヒラギノ角ゴ W3', 'YuGothic', 'Yu Gothic Medium', 'BIZ UDGothic', 'Yu Gothic', 'MSゴシック', 'MS Gothic', sans-serif` | + +## i18n + +`lineHeightCompensation` factors account for the different line-height needs of scripts, **Latin being the default and the reference for other scripts**. To determine which value to apply, a Reading System should use the following lookup against the publication's BCP-47 language tag: + +1. Find the key matching the publication's full BCP-47 language tag. +2. If no match, strip the region subtag and try again. +3. If no match, use `default` (or ignore, because the line-height compensation should be `1`). + +| Language | Base Font Family | Line Height Compensation | +| --- | --- | --- | +| `default` | `var(--RS__oldStyleTf)` | `1` | +| `am` | `Kefa, Nyala, Roboto, Noto, 'Noto Sans Ethiopic', serif` | `1.167` | +| `ar` | `'Geeza Pro', 'Arabic Typesetting', Roboto, Noto, 'Noto Naskh Arabic', 'Times New Roman', serif` | — | +| `bn` | `'Kohinoor Bangla', 'Bangla Sangam MN', Vrinda, Roboto, Noto, 'Noto Sans Bengali', sans-serif` | `1.067` | +| `bo` | `Kailasa, 'Microsoft Himalaya', Roboto, Noto, 'Noto Sans Tibetan', sans-serif` | — | +| `chr` | `'Plantagenet Cherokee', Roboto, Noto, 'Noto Sans Cherokee'` | `1.167` | +| `fa` | `'Geeza Pro', 'Arabic Typesetting', Roboto, Noto, 'Noto Naskh Arabic', 'Times New Roman', serif` | — | +| `gu` | `'Gujarati Sangam MN', 'Nirmala UI', Shruti, Roboto, Noto, 'Noto Sans Gujarati', sans-serif` | `1.167` | +| `he` | `'New Peninim MT', 'Arial Hebrew', Gisha, 'Times New Roman', Roboto, Noto, 'Noto Sans Hebrew', sans-serif` | `1.1` | +| `hi` | `'Kohinoor Devanagari', 'Devanagari Sangam MN', Kokila, 'Nirmala UI', Roboto, Noto, 'Noto Sans Devanagari', sans-serif` | `1.1` | +| `hy` | `Mshtakan, Sylfaen, Roboto, Noto, 'Noto Serif Armenian', serif` | — | +| `iu` | `'Euphemia UCAS', Euphemia, Roboto, Noto, 'Noto Sans Canadian Aboriginal', sans-serif` | — | +| `ja` | `YuGothic, 'Hiragino Maru Gothic ProN', 'Hiragino Sans', 'Yu Gothic UI', 'Meiryo UI', 'MS Gothic', Roboto, Noto, 'Noto Sans CJK JP', sans-serif` | `1.167` | +| `km` | `'Khmer Sangam MN', 'Leelawadee UI', 'Khmer UI', Roboto, Noto, 'Noto Sans Khmer', sans-serif` | `1.067` | +| `kn` | `'Kannada Sangam MN', 'Nirmala UI', Tunga, Roboto, Noto, 'Noto Sans Kannada', sans-serif` | `1.1` | +| `ko` | `'Nanum Gothic', 'Apple SD Gothic Neo', 'Malgun Gothic', Roboto, Noto, 'Noto Sans CJK KR', sans-serif` | `1.167` | +| `lo` | `'Lao Sangam MN', 'Leelawadee UI', 'Lao UI', Roboto, Noto, 'Noto Sans Lao', sans-serif` | — | +| `ml` | `'Malayalam Sangam MN', 'Nirmala UI', Kartika, Roboto, Noto, 'Noto Sans Malayalam', sans-serif` | `1.067` | +| `or` | `'Oriya Sangam MN', 'Nirmala UI', Kalinga, Roboto, Noto, 'Noto Sans Oriya', sans-serif` | `1.167` | +| `pa` | `'Gurmukhi MN', 'Nirmala UI', Kartika, Roboto, Noto, 'Noto Sans Gurmukhi', sans-serif` | `1.1` | +| `si` | `'Sinhala Sangam MN', 'Nirmala UI', 'Iskoola Pota', Roboto, Noto, 'Noto Sans Sinhala', sans-serif` | `1.167` | +| `ta` | `'Tamil Sangam MN', 'Nirmala UI', Latha, Roboto, Noto, 'Noto Sans Tamil', sans-serif` | `1.067` | +| `te` | `'Kohinoor Telugu', 'Telugu Sangam MN', 'Nirmala UI', Gautami, Roboto, Noto, 'Noto Sans Telugu', sans-serif` | — | +| `th` | `Thonburi, 'Leelawadee UI', 'Cordia New', Roboto, Noto, 'Noto Sans Thai', sans-serif` | `1.067` | +| `zh` | `'方体', 'PingFang SC', '黑体', 'Heiti SC', 'Microsoft JhengHei UI', 'Microsoft JhengHei', Roboto, Noto, 'Noto Sans CJK SC', sans-serif` | `1.167` | +| `zh-Hant` | `'方體', 'PingFang TC', '黑體', 'Heiti TC', 'Microsoft JhengHei UI', 'Microsoft JhengHei', Roboto, Noto, 'Noto Sans CJK TC', sans-serif` | `1.167` | +| `zh-TW` | `'方體', 'PingFang TC', '黑體', 'Heiti TC', 'Microsoft JhengHei UI', 'Microsoft JhengHei', Roboto, Noto, 'Noto Sans CJK TC', sans-serif` | `1.167` | +| `zh-HK` | `'方體', 'PingFang HK', '方體', 'PingFang TC', '黑體', 'Heiti TC', 'Microsoft JhengHei UI', 'Microsoft JhengHei', Roboto, Noto, 'Noto Sans CJK TC', sans-serif` | `1.167` | + +## Settings + +User settings vary by stylesheet variant. Each name below maps to a `--USER__` CSS variable. + +| Variant | Disabled | Added | +| --- | --- | --- | +| `default` | — | — | +| `rtl` | `--USER__bodyHyphens`, `--USER__letterSpacing` | — | +| `cjk-horizontal` | `--USER__textAlign`, `--USER__bodyHyphens`, `--USER__ligatures`, `--USER__paraIndent`, `--USER__wordSpacing` | `--USER__noRuby` | +| `cjk-vertical` | `--USER__colCount`, `--USER__textAlign`, `--USER__bodyHyphens`, `--USER__ligatures`, `--USER__paraIndent`, `--USER__wordSpacing` | `--USER__noRuby` | + +## Experiments + +### experimentalHeaderFiltering + +Attempts to filter out paragraphs that are implicitly headings or part of headers + +**Value:** `readium-experimentalHeaderFiltering-on` + +### experimentalZoom + +Attempts to filter out elements that are sized using viewport units and should not be scaled directly e.g. tables, images, iframes, etc. + +**Value:** `readium-experimentalZoom-on` diff --git a/css/vars/colors.json b/css/vars/colors.json index b17a806..b6a5e2e 100644 --- a/css/vars/colors.json +++ b/css/vars/colors.json @@ -1,8 +1,8 @@ { - "RS__backgroundColor": "#FFFFFF", - "RS__textColor": "#121212", - "RS__linkColor": "#0000EE", - "RS__visitedColor": "#551A8B", - "RS__selectionBackgroundColor": "#b4d8fe", - "RS__selectionTextColor": "inherit" + "backgroundColor": "#FFFFFF", + "textColor": "#121212", + "linkColor": "#0000EE", + "visitedColor": "#551A8B", + "selectionBackgroundColor": "#b4d8fe", + "selectionTextColor": "inherit" } \ No newline at end of file diff --git a/css/vars/experiments.json b/css/vars/experiments.json index e601d73..74baab4 100644 --- a/css/vars/experiments.json +++ b/css/vars/experiments.json @@ -5,7 +5,7 @@ "value": "readium-experimentalHeaderFiltering-on" }, "experimentalZoom": { - "description": "Attemps to filter out elements that are sized using viewport units and should not be scaled directly e.g. tables, images, iframes, etc.", + "description": "Attempts to filter out elements that are sized using viewport units and should not be scaled directly e.g. tables, images, iframes, etc.", "scope": "RS", "value": "readium-experimentalZoom-on" } diff --git a/css/vars/fontStacks.json b/css/vars/fontStacks.json index eb04703..c7cda3a 100644 --- a/css/vars/fontStacks.json +++ b/css/vars/fontStacks.json @@ -1,7 +1,11 @@ { - "RS__oldStyleTf": "'Iowan Old Style', Sitka, 'Sitka Text', Palatino, 'Book Antiqua', 'URW Palladio L', P052, serif", - "RS__modernTf": "Athelas, Constantia, Charter, 'Bitstream Charter', Cambria, 'Georgia Pro', Georgia, serif", - "RS__sansTf": "-ui-sans-serif, -apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI Variable', 'Segoe UI', Inter, Roboto, 'Helvetica Neue', 'Arial Nova', 'Liberation Sans', Arial, sans-serif", - "RS__humanistTf": "Seravek, Calibri, 'Gill Sans Nova', Roboto, Ubuntu, 'DejaVu Sans', source-sans-pro, sans-serif", - "RS__monospaceTf": "ui-monospace, 'Andale Mono', 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace" + "oldStyleTf": "'Iowan Old Style', Sitka, 'Sitka Text', Palatino, 'Book Antiqua', 'URW Palladio L', P052, serif", + "modernTf": "Athelas, Constantia, Charter, 'Bitstream Charter', Cambria, 'Georgia Pro', Georgia, serif", + "sansTf": "-ui-sans-serif, -apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI Variable', 'Segoe UI', Inter, Roboto, 'Helvetica Neue', 'Arial Nova', 'Liberation Sans', Arial, sans-serif", + "humanistTf": "Seravek, Calibri, 'Gill Sans Nova', Roboto, Ubuntu, 'DejaVu Sans', source-sans-pro, sans-serif", + "monospaceTf": "ui-monospace, 'Andale Mono', 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace", + "serif-ja": "'Hiragino Mincho ProN', 'Hiragino Mincho Pro', 'YuMincho', 'BIZ UDPMincho', 'Yu Mincho', 'MS P明朝', 'MS PMincho', serif", + "sans-serif-ja": "'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Hiragino Kaku Gothic Pro', 'ヒラギノ角ゴ W3', 'YuGothic', 'Yu Gothic Medium', 'BIZ UDPGothic', 'Yu Gothic', 'MS Pゴシック', 'MS PGothic', sans-serif", + "serif-ja-v": "'Hiragino Mincho ProN', 'Hiragino Mincho Pro', 'YuMincho', 'BIZ UDMincho', 'Yu Mincho', 'MS明朝', 'MS Mincho', serif", + "sans-serif-ja-v": "'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Hiragino Kaku Gothic Pro', 'ヒラギノ角ゴ W3', 'YuGothic', 'Yu Gothic Medium', 'BIZ UDGothic', 'Yu Gothic', 'MSゴシック', 'MS Gothic', sans-serif" } \ No newline at end of file diff --git a/css/vars/i18n.json b/css/vars/i18n.json new file mode 100644 index 0000000..5fcadf1 --- /dev/null +++ b/css/vars/i18n.json @@ -0,0 +1,107 @@ +{ + "default": { + "baseFontFamily": "var(--RS__oldStyleTf)", + "lineHeightCompensation": 1 + }, + "am": { + "baseFontFamily": "Kefa, Nyala, Roboto, Noto, 'Noto Sans Ethiopic', serif", + "lineHeightCompensation": 1.167 + }, + "ar": { + "baseFontFamily": "'Geeza Pro', 'Arabic Typesetting', Roboto, Noto, 'Noto Naskh Arabic', 'Times New Roman', serif" + }, + "bn": { + "baseFontFamily": "'Kohinoor Bangla', 'Bangla Sangam MN', Vrinda, Roboto, Noto, 'Noto Sans Bengali', sans-serif", + "lineHeightCompensation": 1.067 + }, + "bo": { + "baseFontFamily": "Kailasa, 'Microsoft Himalaya', Roboto, Noto, 'Noto Sans Tibetan', sans-serif" + }, + "chr": { + "baseFontFamily": "'Plantagenet Cherokee', Roboto, Noto, 'Noto Sans Cherokee'", + "lineHeightCompensation": 1.167 + }, + "fa": { + "baseFontFamily": "'Geeza Pro', 'Arabic Typesetting', Roboto, Noto, 'Noto Naskh Arabic', 'Times New Roman', serif" + }, + "gu": { + "baseFontFamily": "'Gujarati Sangam MN', 'Nirmala UI', Shruti, Roboto, Noto, 'Noto Sans Gujarati', sans-serif", + "lineHeightCompensation": 1.167 + }, + "he": { + "baseFontFamily": "'New Peninim MT', 'Arial Hebrew', Gisha, 'Times New Roman', Roboto, Noto, 'Noto Sans Hebrew', sans-serif", + "lineHeightCompensation": 1.1 + }, + "hi": { + "baseFontFamily": "'Kohinoor Devanagari', 'Devanagari Sangam MN', Kokila, 'Nirmala UI', Roboto, Noto, 'Noto Sans Devanagari', sans-serif", + "lineHeightCompensation": 1.1 + }, + "hy": { + "baseFontFamily": "Mshtakan, Sylfaen, Roboto, Noto, 'Noto Serif Armenian', serif" + }, + "iu": { + "baseFontFamily": "'Euphemia UCAS', Euphemia, Roboto, Noto, 'Noto Sans Canadian Aboriginal', sans-serif" + }, + "ja": { + "baseFontFamily": "YuGothic, 'Hiragino Maru Gothic ProN', 'Hiragino Sans', 'Yu Gothic UI', 'Meiryo UI', 'MS Gothic', Roboto, Noto, 'Noto Sans CJK JP', sans-serif", + "lineHeightCompensation": 1.167 + }, + "km": { + "baseFontFamily": "'Khmer Sangam MN', 'Leelawadee UI', 'Khmer UI', Roboto, Noto, 'Noto Sans Khmer', sans-serif", + "lineHeightCompensation": 1.067 + }, + "kn": { + "baseFontFamily": "'Kannada Sangam MN', 'Nirmala UI', Tunga, Roboto, Noto, 'Noto Sans Kannada', sans-serif", + "lineHeightCompensation": 1.1 + }, + "ko": { + "baseFontFamily": "'Nanum Gothic', 'Apple SD Gothic Neo', 'Malgun Gothic', Roboto, Noto, 'Noto Sans CJK KR', sans-serif", + "lineHeightCompensation": 1.167 + }, + "lo": { + "baseFontFamily": "'Lao Sangam MN', 'Leelawadee UI', 'Lao UI', Roboto, Noto, 'Noto Sans Lao', sans-serif" + }, + "ml": { + "baseFontFamily": "'Malayalam Sangam MN', 'Nirmala UI', Kartika, Roboto, Noto, 'Noto Sans Malayalam', sans-serif", + "lineHeightCompensation": 1.067 + }, + "or": { + "baseFontFamily": "'Oriya Sangam MN', 'Nirmala UI', Kalinga, Roboto, Noto, 'Noto Sans Oriya', sans-serif", + "lineHeightCompensation": 1.167 + }, + "pa": { + "baseFontFamily": "'Gurmukhi MN', 'Nirmala UI', Kartika, Roboto, Noto, 'Noto Sans Gurmukhi', sans-serif", + "lineHeightCompensation": 1.1 + }, + "si": { + "baseFontFamily": "'Sinhala Sangam MN', 'Nirmala UI', 'Iskoola Pota', Roboto, Noto, 'Noto Sans Sinhala', sans-serif", + "lineHeightCompensation": 1.167 + }, + "ta": { + "baseFontFamily": "'Tamil Sangam MN', 'Nirmala UI', Latha, Roboto, Noto, 'Noto Sans Tamil', sans-serif", + "lineHeightCompensation": 1.067 + }, + "te": { + "baseFontFamily": "'Kohinoor Telugu', 'Telugu Sangam MN', 'Nirmala UI', Gautami, Roboto, Noto, 'Noto Sans Telugu', sans-serif" + }, + "th": { + "baseFontFamily": "Thonburi, 'Leelawadee UI', 'Cordia New', Roboto, Noto, 'Noto Sans Thai', sans-serif", + "lineHeightCompensation": 1.067 + }, + "zh": { + "baseFontFamily": "'方体', 'PingFang SC', '黑体', 'Heiti SC', 'Microsoft JhengHei UI', 'Microsoft JhengHei', Roboto, Noto, 'Noto Sans CJK SC', sans-serif", + "lineHeightCompensation": 1.167 + }, + "zh-Hant": { + "baseFontFamily": "'方體', 'PingFang TC', '黑體', 'Heiti TC', 'Microsoft JhengHei UI', 'Microsoft JhengHei', Roboto, Noto, 'Noto Sans CJK TC', sans-serif", + "lineHeightCompensation": 1.167 + }, + "zh-TW": { + "baseFontFamily": "'方體', 'PingFang TC', '黑體', 'Heiti TC', 'Microsoft JhengHei UI', 'Microsoft JhengHei', Roboto, Noto, 'Noto Sans CJK TC', sans-serif", + "lineHeightCompensation": 1.167 + }, + "zh-HK": { + "baseFontFamily": "'方體', 'PingFang HK', '方體', 'PingFang TC', '黑體', 'Heiti TC', 'Microsoft JhengHei UI', 'Microsoft JhengHei', Roboto, Noto, 'Noto Sans CJK TC', sans-serif", + "lineHeightCompensation": 1.167 + } +} diff --git a/css/vars/pagination.json b/css/vars/pagination.json index 1f9c5e6..5c0507b 100644 --- a/css/vars/pagination.json +++ b/css/vars/pagination.json @@ -1,8 +1,8 @@ { - "RS__colWidth": "100vw", - "RS__colCount": 1, - "RS__colGap": 0, - "RS__defaultLineLength": "100%", - "RS__pageGutter": 0, - "RS__viewportWidth": "100%" + "colWidth": "100vw", + "colCount": 1, + "colGap": 0, + "defaultLineLength": "100%", + "pageGutter": 0, + "viewportWidth": "100%" } \ No newline at end of file diff --git a/css/vars/settings.json b/css/vars/settings.json new file mode 100644 index 0000000..37f02ca --- /dev/null +++ b/css/vars/settings.json @@ -0,0 +1,18 @@ +{ + "default": { + "disabled": [], + "added": [] + }, + "rtl": { + "disabled": ["bodyHyphens", "letterSpacing"], + "added": [] + }, + "cjk-horizontal": { + "disabled": ["textAlign", "bodyHyphens", "ligatures", "paraIndent", "wordSpacing"], + "added": ["noRuby"] + }, + "cjk-vertical": { + "disabled": ["colCount", "textAlign", "bodyHyphens", "ligatures", "paraIndent", "wordSpacing"], + "added": ["noRuby"] + } +} diff --git a/docs/CSS28-migration_guide.md b/docs/CSS28-migration_guide.md index eafc5fa..9fd844c 100644 --- a/docs/CSS28-migration_guide.md +++ b/docs/CSS28-migration_guide.md @@ -256,7 +256,7 @@ Typically, you would use zoom for all web publications, and the rest of the styl As of version `2.0.0-beta.23`, ReadiumCSS provides flags as a way to opt-in to and test improvements to existing features. That way they can also be disabled without having to wait on a quickfix in case they are creating new issues. - `--RS__experimentalHeaderFiltering: readium-experimentalHeaderFiltering-on`: attempts to filter out paragraphs that are implicitly headings or part of headers -- `--RS__experimentalZoom: readium-experimentalZoom-on`: attemps to filter out elements that are sized using viewport units and should not be scaled directly +- `--RS__experimentalZoom: readium-experimentalZoom-on`: attempts to filter out elements that are sized using viewport units and should not be scaled directly These flags are expected to be found on `:root`. @@ -280,4 +280,22 @@ If you need to apply padding to the scroll view, you can use the `--RS__scrollPa As of version `2.0.0` (stable), the default line-length when none is set by the user is `100%` instead of `40rem`. This is to prevent conflicts with the zoom factor. -The custom property has been kept so that consumers of ReadiumCSS can still customize the value if they wish, especially as they can opt out of the new font-size implementation. \ No newline at end of file +The custom property has been kept so that consumers of ReadiumCSS can still customize the value if they wish, especially as they can opt out of the new font-size implementation. + +## Exposition of i18n stacks and compensation + +As of version `2.0.3`, font-stacks and line-height compensation are exposed for languages e.g. `am`, `ja`, `zh`, etc. so that host apps can import the JSON and consume the data. `default` (Latin) is our reference for all other scripts, and can also be used as a fallback when using the map. + +A markdown document with tables generated from the JSON files in `vars` has also been added. + +## JSON properties do not longer have a prefix + +As of version `2.0.3`, vars are no longer prefixed with `RS__` in JSON files (colors, fontStacks, pagination). This prefix has to be removed from code if you were already using this data. + +``` +// Before +const backgroundColor = defaultColors.RS__backgroundColor; + +// After +const backgroundColor = defaultColors.backgroundColor; +``` \ No newline at end of file diff --git a/docs/ReadiumCSS_docs.epub b/docs/ReadiumCSS_docs.epub index 8be2d0d..405709f 100644 Binary files a/docs/ReadiumCSS_docs.epub and b/docs/ReadiumCSS_docs.epub differ diff --git a/docs/ReadiumCSS_docs/OEBPS/Text/Section-028.xhtml b/docs/ReadiumCSS_docs/OEBPS/Text/Section-028.xhtml index 6b570aa..9ee06b5 100644 --- a/docs/ReadiumCSS_docs/OEBPS/Text/Section-028.xhtml +++ b/docs/ReadiumCSS_docs/OEBPS/Text/Section-028.xhtml @@ -307,7 +307,7 @@ const backgroundColor = defaultColors.RS__backgroundColor;
--RS__experimentalHeaderFiltering: readium-experimentalHeaderFiltering-on: attempts to filter out paragraphs that are implicitly headings or part of headers--RS__experimentalZoom: readium-experimentalZoom-on: attemps to filter out elements that are sized using viewport units and should not be scaled directly--RS__experimentalZoom: readium-experimentalZoom-on: attempts to filter out elements that are sized using viewport units and should not be scaled directlyIf you need to apply padding to the scroll view, you can use the --RS__scrollPadding properties instead. This can be useful to get around safe area insets, or to add whitespace so that contents are not hidden behind UI elements.
The custom property has been kept so that consumers of ReadiumCSS can still customize the value if they wish, especially as they can opt out of the new font-size implementation.
As of version 2.0.3, font-stacks and line-height compensation are exposed for languages e.g. am, ja, zh, etc. so that host apps can import the JSON and consume the data. default (Latin) is our reference for all other scripts, and can also be used as a fallback when using the map.
A markdown document with tables generated from the JSON files in vars has also been added.
As of version 2.0.3, vars are no longer prefixed with RS__ in JSON files (colors, fontStacks, pagination). This prefix has to be removed from code if you were already using this data.
// Before
+const backgroundColor = defaultColors.RS__backgroundColor;
+
+// After
+const backgroundColor = defaultColors.backgroundColor;
+