From b58bd1b71170e483f727e4000dfe23f046372c3a Mon Sep 17 00:00:00 2001 From: Thomas Osmonson Date: Thu, 13 Aug 2020 09:17:50 -0500 Subject: [PATCH] fix: fonts --- public/static/fonts.css | 32 ---------------------------- src/pages/_document.tsx | 47 ++++++++++++++++++++++++++++++++++++----- 2 files changed, 42 insertions(+), 37 deletions(-) delete mode 100644 public/static/fonts.css diff --git a/public/static/fonts.css b/public/static/fonts.css deleted file mode 100644 index 67f67616..00000000 --- a/public/static/fonts.css +++ /dev/null @@ -1,32 +0,0 @@ -@font-face { - font-family: 'Soehne Mono'; - src: url('/static/fonts/soehne-mono-web-buch.woff2') format('woff2'), - url('/static/fonts/soehne-mono-web-buch.woff') format('woff'); - font-weight: 400; - font-display: swap; - font-style: normal; -} -@font-face { - font-family: 'Soehne'; - src: url('/static/fonts/soehne-web-buch.woff2') format('woff2'), - url('/static/fonts/soehne-web-buch.woff') format('woff'); - font-weight: 400; - font-display: swap; - font-style: normal; -} -@font-face { - font-family: 'Soehne'; - src: url('/static/fonts/soehne-web-kraftig_1.woff2') format('woff2'), - url('/static/fonts/soehne-web-kraftig_1.woff') format('woff'); - font-weight: 500; - font-display: swap; - font-style: normal; -} -@font-face { - font-family: 'Soehne'; - src: url('/static/fonts/soehne-web-halbfett_1.woff2') format('woff2'), - url('/static/fonts/soehne-web-halbfett_1.woff') format('woff'); - font-weight: 600; - font-display: swap; - font-style: normal; -} diff --git a/src/pages/_document.tsx b/src/pages/_document.tsx index bb04ae6d..73a20d54 100755 --- a/src/pages/_document.tsx +++ b/src/pages/_document.tsx @@ -1,3 +1,4 @@ +import React from 'react'; import Document, { DocumentContext, DocumentProps, @@ -38,8 +39,7 @@ export default class MyDocument extends Document { render() { return ( - - + { type="font/woff2" crossOrigin="true" /> - - +