mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge pull request #4781 from dmitrylyzo/system-fonts-build
This commit is contained in:
commit
ebbe655258
4 changed files with 30 additions and 23 deletions
|
@ -92,9 +92,13 @@ function onGlobalizeInit() {
|
||||||
if (browser.tv && !browser.android) {
|
if (browser.tv && !browser.android) {
|
||||||
console.debug('using system fonts with explicit sizes');
|
console.debug('using system fonts with explicit sizes');
|
||||||
import('./styles/fonts.sized.scss');
|
import('./styles/fonts.sized.scss');
|
||||||
|
} else if (__USE_SYSTEM_FONTS__) { // eslint-disable-line no-undef
|
||||||
|
console.debug('using system fonts');
|
||||||
|
import('./styles/fonts.scss');
|
||||||
} else {
|
} else {
|
||||||
console.debug('using default fonts');
|
console.debug('using default fonts');
|
||||||
import('./styles/fonts.scss');
|
import('./styles/fonts.scss');
|
||||||
|
import('./styles/fonts.noto.scss');
|
||||||
}
|
}
|
||||||
|
|
||||||
import('./styles/librarybrowser.scss');
|
import('./styles/librarybrowser.scss');
|
||||||
|
|
25
src/styles/fonts.noto.scss
Normal file
25
src/styles/fonts.noto.scss
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
@import "../styles/noto-sans/index.scss";
|
||||||
|
|
||||||
|
html {
|
||||||
|
font-family: "Noto Sans", "Noto Sans HK", "Noto Sans JP", "Noto Sans KR", "Noto Sans SC", "Noto Sans TC", sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
html[lang|="ja"] {
|
||||||
|
font-family: "Noto Sans", "Noto Sans JP", "Noto Sans HK", "Noto Sans KR", "Noto Sans SC", "Noto Sans TC", sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
html[lang|="ko"] {
|
||||||
|
font-family: "Noto Sans", "Noto Sans KR", "Noto Sans HK", "Noto Sans JP", "Noto Sans SC", "Noto Sans TC", sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
html[lang|="zh-CN"] {
|
||||||
|
font-family: "Noto Sans", "Noto Sans SC", "Noto Sans HK", "Noto Sans JP", "Noto Sans KR", "Noto Sans TC", sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
html[lang|="zh-TW"] {
|
||||||
|
font-family: "Noto Sans", "Noto Sans TC", "Noto Sans HK", "Noto Sans JP", "Noto Sans KR", "Noto Sans SC", sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
html[lang|="zh-HK"] {
|
||||||
|
font-family: "Noto Sans", "Noto Sans HK", "Noto Sans JP", "Noto Sans KR", "Noto Sans SC", "Noto Sans TC", sans-serif;
|
||||||
|
}
|
|
@ -1,5 +1,3 @@
|
||||||
@import "../styles/noto-sans/index.scss";
|
|
||||||
|
|
||||||
@mixin font($weight: null, $size: null) {
|
@mixin font($weight: null, $size: null) {
|
||||||
font-weight: $weight;
|
font-weight: $weight;
|
||||||
font-size: $size;
|
font-size: $size;
|
||||||
|
@ -7,32 +5,11 @@
|
||||||
|
|
||||||
html {
|
html {
|
||||||
@include font($size: 93%);
|
@include font($size: 93%);
|
||||||
font-family: "Noto Sans", "Noto Sans HK", "Noto Sans JP", "Noto Sans KR", "Noto Sans SC", "Noto Sans TC", sans-serif;
|
|
||||||
text-size-adjust: 100%;
|
text-size-adjust: 100%;
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
text-rendering: optimizeLegibility;
|
text-rendering: optimizeLegibility;
|
||||||
}
|
}
|
||||||
|
|
||||||
html[lang|="ja"] {
|
|
||||||
font-family: "Noto Sans", "Noto Sans JP", "Noto Sans HK", "Noto Sans KR", "Noto Sans SC", "Noto Sans TC", sans-serif;
|
|
||||||
}
|
|
||||||
|
|
||||||
html[lang|="ko"] {
|
|
||||||
font-family: "Noto Sans", "Noto Sans KR", "Noto Sans HK", "Noto Sans JP", "Noto Sans SC", "Noto Sans TC", sans-serif;
|
|
||||||
}
|
|
||||||
|
|
||||||
html[lang|="zh-CN"] {
|
|
||||||
font-family: "Noto Sans", "Noto Sans SC", "Noto Sans HK", "Noto Sans JP", "Noto Sans KR", "Noto Sans TC", sans-serif;
|
|
||||||
}
|
|
||||||
|
|
||||||
html[lang|="zh-TW"] {
|
|
||||||
font-family: "Noto Sans", "Noto Sans TC", "Noto Sans HK", "Noto Sans JP", "Noto Sans KR", "Noto Sans SC", sans-serif;
|
|
||||||
}
|
|
||||||
|
|
||||||
html[lang|="zh-HK"] {
|
|
||||||
font-family: "Noto Sans", "Noto Sans HK", "Noto Sans JP", "Noto Sans KR", "Noto Sans SC", "Noto Sans TC", sans-serif;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
@include font(400, 1.8em);
|
@include font(400, 1.8em);
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,6 +47,7 @@ const config = {
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
new DefinePlugin({
|
new DefinePlugin({
|
||||||
|
__USE_SYSTEM_FONTS__: JSON.stringify(!!process.env.USE_SYSTEM_FONTS),
|
||||||
__WEBPACK_SERVE__: JSON.stringify(!!process.env.WEBPACK_SERVE)
|
__WEBPACK_SERVE__: JSON.stringify(!!process.env.WEBPACK_SERVE)
|
||||||
}),
|
}),
|
||||||
new CleanWebpackPlugin(),
|
new CleanWebpackPlugin(),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue