Browse Source

add Noto sans + both fonts font-faces

axolotle 2 years ago
parent
commit
eeaee11ed1

+ 1 - 0
package.json

@@ -11,6 +11,7 @@
     "lint:fix": "vue-cli-service lint"
   },
   "dependencies": {
+    "@fontsource/noto-sans": "^4.3.0",
     "axios": "^0.21.1",
     "bootstrap-vue": "^2.21.2",
     "core-js": "^3.6.5",

+ 3 - 0
src/assets/scss/abstracts/_variables.scss

@@ -28,3 +28,6 @@ $families: (
 }
 
 $text-card-header-height: 4rem;
+
+
+$font-family-sans-serif: 'Noto Sans';

+ 20 - 0
src/assets/scss/fonts/_noto-sans.scss

@@ -0,0 +1,20 @@
+$location: '~@fontsource/noto-sans/files';
+$font-name: 'Noto Sans';
+$font-slug: 'noto-sans-latin';
+$font-styles: (
+  (normal, 400),
+  (italic, 400),
+  (normal, 700),
+  (italic, 700)
+);
+
+@each $style, $weight in $font-styles {
+  @font-face {
+    font-family: $font-name;
+    font-style: $style;
+    font-display: swap;
+    font-weight: $weight;
+    src: url('#{$location}/#{$font-slug}-#{$weight}-#{$style}.woff2') format('woff2'),
+         url('#{$location}/#{$font-slug}-#{$weight}-#{$style}.woff') format('woff');
+  }
+}

+ 18 - 0
src/assets/scss/fonts/_redaction.scss

@@ -0,0 +1,18 @@
+$location: '~@/assets/fonts/redaction';
+$font-name: 'Redaction';
+$font-slug: 'redaction';
+$font-styles: (
+  (normal, 400),
+  (italic, 400),
+  (normal, 700),
+);
+
+@each $style, $weight in $font-styles {
+  @font-face {
+    font-family: $font-name;
+    font-style: $style;
+    font-display: swap;
+    font-weight: $weight;
+    src: url('#{$location}/#{$font-slug}-#{$weight}-#{$style}.woff2') format('woff2');
+  }
+}