Skip to content

scillidan/fonts

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fonts

Used as webfont CDN.

Tools

Make your own

Fork https://github.com/xz/fonts.

git clone https://github.com/<User>/fonts
cd fonts

Modify package.json by yourself.

You can delete fonts that you don't need.

Download some fonts.

webify --no-eot --no-svg <font>.ttf
cat <font>.ttf | ttf2woff2 > <font>.woff2
mkdir -p serve\src\<font>
mv <font>.<font>.woff* serve\src\<font>\
touch serve\<font>.css
@font-face {
    font-family: 'Font Name';
    src: url('src/<font>/<font>.woff2') format('woff2'),
         url('src/<font>/<font>.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

Refer to noticia-text.css to define font-style or font-weight.

git add .
git commit -m "Add <font>"
git push

Goto https://github.com/<User>/fonts/releases → Draft a new release → Choose a tag → Input a tag liked 0.x.x → Publish release.

Usage

Edit style.css:

@import url("https://cdn.jsdelivr.net/gh/<User>/fonts@master/serve/<font>.css");

body {
  font-family: 'Font Name', sans-serif;
}

Table

font-family source license @import
Sarasa Mono SC github sarasa-mono-sc.css
Huiwen-mincho maoken See 「字体授权」 huiwen-mincho.css
Fusion Kai github fusion-kai-g.css
fusion-kai-t.css
fusion-kai-j.css
LXGW WenKai GB github lxgw-wenkai-gb.css
lxgw-wenkai-mono-gb.css
Smiley Sans github smiley-sans.css
Noticia Text 1001fonts OFL noticia-text.css
EB Garamond 12 1001fonts OFL eb-garamond-12.css
Hittle github GPLv2 hittite.css
Markazi Text 1001fonts OFL markazi-text.css