0%

CSS for Customized Fonts

This is an example of introducing the font “Noto Serif CJK SC” into Typora Paper theme. Then font-family: "Noto Serif CJK SC" can be used in later CSS codes.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
@font-face {
font-family: "Noto Serif CJK SC";
font-style: normal;
font-weight: normal;
src: local("Noto Serif CJK SC"), url("./paper/NotoSerifCJKsc-Regular.otf") format("otf");
}

@font-face {
font-family: "Noto Serif CJK SC";
font-style: normal;
font-weight: bold;
src: local("Noto Serif CJK SC Bold"), url("./paper/NotoSerifCJKsc-Bold.otf") format("otf");
}

@font-face {
font-family: "Noto Serif CJK SC";
font-style: normal;
font-weight: black;
src: local("Noto Serif CJK SC Black"), url("./paper/NotoSerifCJKsc-Black.otf") format("otf");
}

@font-face {
font-family: "Noto Serif CJK SC";
font-style: normal;
font-weight: medium;
src: local("Noto Serif CJK SC Medium"), url("./paper/NotoSerifCJKsc-Medium.otf") format("otf");
}