Bundle fonts instead of using Google fonts, and patch in missing math symbols
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
This commit is contained in:
parent
431d4b0990
commit
0cdd2fbf64
46
assets/scss/fonts.scss
Normal file
46
assets/scss/fonts.scss
Normal file
@ -0,0 +1,46 @@
|
||||
@mixin font-inconsolata($weight) {
|
||||
@font-face {
|
||||
font-family: 'Inconsolata';
|
||||
font-display: swap;
|
||||
font-weight: $weight;
|
||||
src: local('Inconsolata'),
|
||||
url('../fonts/Inconsolata-VariableFont_wdth,wght.ttf');
|
||||
}
|
||||
}
|
||||
|
||||
@mixin font-lora {
|
||||
@font-face {
|
||||
font-family: 'Lora';
|
||||
font-display: swap;
|
||||
src: local('Lora'),
|
||||
url('../fonts/Lora-VariableFont_wght.ttf'),
|
||||
url('../fonts/Lora-Italic-VariableFont_wght.ttf');
|
||||
}
|
||||
}
|
||||
|
||||
@mixin font-raleway($weight) {
|
||||
@font-face {
|
||||
font-family: 'Raleway';
|
||||
font-display: swap;
|
||||
font-weight: $weight;
|
||||
src: local('Raleway'),
|
||||
url('../fonts/Raleway-VariableFont_wght.ttf'),
|
||||
url('../fonts/Raleway-Italic-VariableFont_wght.ttf');
|
||||
}
|
||||
}
|
||||
|
||||
@mixin font-stixgeneral {
|
||||
@font-face {
|
||||
font-family: 'STIXGeneral';
|
||||
font-display: swap;
|
||||
src: local('STIXGeneral-Regular'),
|
||||
url('../fonts/STIXGeneral-Regular.ttf');
|
||||
}
|
||||
}
|
||||
|
||||
@include font-inconsolata(400);
|
||||
@include font-inconsolata(700);
|
||||
@include font-lora();
|
||||
@include font-raleway(400);
|
||||
@include font-raleway(700);
|
||||
@include font-stixgeneral();
|
@ -11,7 +11,7 @@ $standard-border: $standard-border-width solid $border-color;
|
||||
|
||||
$font-heading: "Lora", serif;
|
||||
$font-body: "Raleway", serif;
|
||||
$font-code: "Inconsolata", monospace;
|
||||
$font-code: "Inconsolata", monospace, "STIXGeneral";
|
||||
|
||||
$warning-background-color: #ffee99;
|
||||
$warning-border-color: #f5c827;
|
||||
|
@ -15,7 +15,8 @@
|
||||
|
||||
<!-- Fonts -->
|
||||
{{ if not (.Site.Params.noCss) }}
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inconsolata:wght@400;700&family=Raleway:wght@400;700&family=Lora&display=block" media="screen">
|
||||
{{ $fonts := resources.Get "scss/fonts.scss" | resources.ToCSS | resources.Minify }}
|
||||
<link rel="stylesheet" href="{{ $fonts.Permalink }}" media="screen">
|
||||
{{ end }}
|
||||
|
||||
<!-- External CSS (normalize and KaTeX -->
|
||||
|
BIN
static/fonts/Inconsolata-VariableFont_wdth,wght.ttf
Normal file
BIN
static/fonts/Inconsolata-VariableFont_wdth,wght.ttf
Normal file
Binary file not shown.
BIN
static/fonts/Lora-Italic-VariableFont_wght.ttf
Normal file
BIN
static/fonts/Lora-Italic-VariableFont_wght.ttf
Normal file
Binary file not shown.
BIN
static/fonts/Lora-VariableFont_wght.ttf
Normal file
BIN
static/fonts/Lora-VariableFont_wght.ttf
Normal file
Binary file not shown.
BIN
static/fonts/Raleway-Italic-VariableFont_wght.ttf
Normal file
BIN
static/fonts/Raleway-Italic-VariableFont_wght.ttf
Normal file
Binary file not shown.
BIN
static/fonts/Raleway-VariableFont_wght.ttf
Normal file
BIN
static/fonts/Raleway-VariableFont_wght.ttf
Normal file
Binary file not shown.
BIN
static/fonts/STIXGeneral-Regular.ttf
Normal file
BIN
static/fonts/STIXGeneral-Regular.ttf
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user