Skip to content

Commit

Permalink
Merge pull request jellyfin#2234 from thornbill/no-no-noto
Browse files Browse the repository at this point in the history
Use Noto Sans from Fontsource
  • Loading branch information
thornbill committed Dec 16, 2020
2 parents 9f0b5bf + b9469f2 commit d66d26b
Show file tree
Hide file tree
Showing 15 changed files with 6,800 additions and 7 deletions.
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,15 @@
"epubjs": "^0.3.85",
"fast-text-encoding": "^1.0.3",
"flv.js": "^1.5.0",
"fontsource-noto-sans": "^3.1.5",
"fontsource-noto-sans-hk": "^3.1.5",
"fontsource-noto-sans-jp": "^3.1.5",
"fontsource-noto-sans-kr": "^3.1.5",
"fontsource-noto-sans-sc": "^3.1.5",
"headroom.js": "^0.12.0",
"hls.js": "^0.14.17",
"intersection-observer": "^0.12.0",
"jellyfin-apiclient": "^1.5.0",
"jellyfin-noto": "https://github.com/jellyfin/jellyfin-noto",
"jquery": "^3.5.1",
"jstree": "^3.3.10",
"libarchive.js": "^1.3.0",
Expand Down
4 changes: 3 additions & 1 deletion src/assets/css/fonts.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
@import "../../styles/noto-sans/index.scss";

@mixin font($weight: null, $size: null) {
font-family: "Noto Sans", sans-serif;
font-family: "Noto Sans", "Noto Sans HK", "Noto Sans JP", "Noto Sans KR", "Noto Sans SC", sans-serif;
font-weight: $weight;
font-size: $size;
}
Expand Down
1 change: 0 additions & 1 deletion src/scripts/site.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import 'intersection-observer';
import 'classlist.js';
import 'whatwg-fetch';
import 'resize-observer-polyfill';
import 'jellyfin-noto/font-faces.css';
import '../assets/css/site.scss';
import { Events } from 'jellyfin-apiclient';
import ServerConnections from '../components/ServerConnections';
Expand Down
47 changes: 47 additions & 0 deletions src/styles/noto-sans/base-400-normal.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/* noto-sans-cyrillic-ext-400-normal */
@include fontFace(
$url: "~fontsource-noto-sans/files/noto-sans-cyrillic-ext-400-normal.woff2",
$range: (U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F)
);

/* noto-sans-cyrillic-400-normal */
@include fontFace(
$url: "~fontsource-noto-sans/files/noto-sans-cyrillic-400-normal.woff2",
$range: (U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116)
);

/* noto-sans-devanagari-400-normal */
@include fontFace(
$url: "~fontsource-noto-sans/files/noto-sans-devanagari-400-normal.woff2",
$range: (U+0900-097F, U+1CD0-1CF6, U+1CF8-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FB)
);

/* noto-sans-greek-ext-400-normal */
@include fontFace(
$url: "~fontsource-noto-sans/files/noto-sans-greek-ext-400-normal.woff2",
$range: (U+1F00-1FFF)
);

/* noto-sans-greek-400-normal */
@include fontFace(
$url: "~fontsource-noto-sans/files/noto-sans-greek-400-normal.woff2",
$range: (U+0370-03FF)
);

/* noto-sans-vietnamese-400-normal */
@include fontFace(
$url: "~fontsource-noto-sans/files/noto-sans-vietnamese-400-normal.woff2",
$range: (U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB)
);

/* noto-sans-latin-ext-400-normal */
@include fontFace(
$url: "~fontsource-noto-sans/files/noto-sans-latin-ext-400-normal.woff2",
$range: (U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF)
);

/* noto-sans-latin-400-normal */
@include fontFace(
$url: "~fontsource-noto-sans/files/noto-sans-latin-400-normal.woff2",
$range: (U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD)
);
55 changes: 55 additions & 0 deletions src/styles/noto-sans/base-700-normal.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/* noto-sans-cyrillic-ext-700-normal */
@include fontFace(
$weight: 700,
$url: "~fontsource-noto-sans/files/noto-sans-cyrillic-ext-700-normal.woff2",
$range: (U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F)
);

/* noto-sans-cyrillic-700-normal */
@include fontFace(
$weight: 700,
$url: "~fontsource-noto-sans/files/noto-sans-cyrillic-700-normal.woff2",
$range: (U+0700-045F, U+0490-0491, U+04B0-04B1, U+2116)
);

/* noto-sans-devanagari-700-normal */
@include fontFace(
$weight: 700,
$url: "~fontsource-noto-sans/files/noto-sans-devanagari-700-normal.woff2",
$range: (U+0900-097F, U+1CD0-1CF6, U+1CF8-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FB)
);

/* noto-sans-greek-ext-700-normal */
@include fontFace(
$weight: 700,
$url: "~fontsource-noto-sans/files/noto-sans-greek-ext-700-normal.woff2",
$range: (U+1F00-1FFF)
);

/* noto-sans-greek-700-normal */
@include fontFace(
$weight: 700,
$url: "~fontsource-noto-sans/files/noto-sans-greek-700-normal.woff2",
$range: (U+0370-03FF)
);

/* noto-sans-vietnamese-700-normal */
@include fontFace(
$weight: 700,
$url: "~fontsource-noto-sans/files/noto-sans-vietnamese-700-normal.woff2",
$range: (U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB)
);

/* noto-sans-latin-ext-700-normal */
@include fontFace(
$weight: 700,
$url: "~fontsource-noto-sans/files/noto-sans-latin-ext-700-normal.woff2",
$range: (U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF)
);

/* noto-sans-latin-700-normal */
@include fontFace(
$weight: 700,
$url: "~fontsource-noto-sans/files/noto-sans-latin-700-normal.woff2",
$range: (U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD)
);

0 comments on commit d66d26b

Please sign in to comment.