diff --git a/package-lock.json b/package-lock.json index 9c3b844..bfa0e65 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,8 +10,6 @@ "dependencies": { "@astrojs/check": "^0.7.0", "@astrojs/node": "^8.2.5", - "@fontsource-variable/murecho": "^5.0.19", - "@fontsource-variable/vollkorn": "^5.0.21", "accept-language": "^3.0.18", "astro": "4.9.0", "astro-icon": "^1.1.0", @@ -2013,16 +2011,6 @@ "node": ">=12" } }, - "node_modules/@fontsource-variable/murecho": { - "version": "5.0.19", - "resolved": "https://registry.npmjs.org/@fontsource-variable/murecho/-/murecho-5.0.19.tgz", - "integrity": "sha512-Kfcqo+WEWePQuXdAbS8Q7kEYPU4bXZRLPYI8hcdqsKvFhG9qvQ2CHjRpABMeEj4jg+5Mp/VgS1lzDwL/JEa1jw==" - }, - "node_modules/@fontsource-variable/vollkorn": { - "version": "5.0.21", - "resolved": "https://registry.npmjs.org/@fontsource-variable/vollkorn/-/vollkorn-5.0.21.tgz", - "integrity": "sha512-i3TdT2Gtq4rirZIzyRGPiKCgQmX/Q0b2ya1yfIuQllTJMbce90PK3HG+DFzW95MQ6VfUsBVvWhwtxbGMWKRumA==" - }, "node_modules/@iconify-json/material-symbols": { "version": "1.1.80", "resolved": "https://registry.npmjs.org/@iconify-json/material-symbols/-/material-symbols-1.1.80.tgz", diff --git a/package.json b/package.json index c0ad96d..8b773e3 100644 --- a/package.json +++ b/package.json @@ -21,8 +21,6 @@ "dependencies": { "@astrojs/check": "^0.7.0", "@astrojs/node": "^8.2.5", - "@fontsource-variable/murecho": "^5.0.19", - "@fontsource-variable/vollkorn": "^5.0.21", "accept-language": "^3.0.18", "astro": "4.9.0", "astro-icon": "^1.1.0", diff --git a/public/fonts/Murecho-VariableFont_OFL.txt b/public/fonts/Murecho-VariableFont_OFL.txt new file mode 100644 index 0000000..e31131a --- /dev/null +++ b/public/fonts/Murecho-VariableFont_OFL.txt @@ -0,0 +1,93 @@ +Copyright 2021 The Murecho Project Authors (https://github.com/positype/Murecho-Project) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +https://openfontlicense.org + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/public/fonts/Murecho-VariableFont_wght.ttf b/public/fonts/Murecho-VariableFont_wght.ttf new file mode 100644 index 0000000..ee8f1ab Binary files /dev/null and b/public/fonts/Murecho-VariableFont_wght.ttf differ diff --git a/public/fonts/Murecho-VariableFont_wght.woff2 b/public/fonts/Murecho-VariableFont_wght.woff2 new file mode 100644 index 0000000..e6edf78 Binary files /dev/null and b/public/fonts/Murecho-VariableFont_wght.woff2 differ diff --git a/public/fonts/Vollkorn-VariableFont_OFL.txt b/public/fonts/Vollkorn-VariableFont_OFL.txt new file mode 100644 index 0000000..f72bad1 --- /dev/null +++ b/public/fonts/Vollkorn-VariableFont_OFL.txt @@ -0,0 +1,93 @@ +Copyright 2017 The Vollkorn Project Authors (https://github.com/FAlthausen/Vollkorn-Typeface) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +https://openfontlicense.org + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/public/fonts/Vollkorn-VariableFont_wght.ttf b/public/fonts/Vollkorn-VariableFont_wght.ttf new file mode 100644 index 0000000..188fd06 Binary files /dev/null and b/public/fonts/Vollkorn-VariableFont_wght.ttf differ diff --git a/public/fonts/Vollkorn-VariableFont_wght.woff2 b/public/fonts/Vollkorn-VariableFont_wght.woff2 new file mode 100644 index 0000000..992e99a Binary files /dev/null and b/public/fonts/Vollkorn-VariableFont_wght.woff2 differ diff --git a/src/components/AppLayout/components/AppLayoutTitle.astro b/src/components/AppLayout/components/AppLayoutTitle.astro index 248eca0..8c53e1a 100644 --- a/src/components/AppLayout/components/AppLayoutTitle.astro +++ b/src/components/AppLayout/components/AppLayoutTitle.astro @@ -27,7 +27,7 @@ const { title, subtitle, pretitle } = Astro.props; & > #pretitle { font-family: var(--font-sans-serifs); - font-weight: 400; + font-variation-settings: "wght" 430; margin-bottom: 0.8em; } @@ -38,7 +38,7 @@ const { title, subtitle, pretitle } = Astro.props; & > #subtitle { font-family: var(--font-serif); - font-weight: 600; + font-variation-settings: "wght" 700; margin-top: 0.5em; } } diff --git a/src/components/AppLayout/components/Footer.astro b/src/components/AppLayout/components/Footer.astro index 4cc5e5f..73011b3 100644 --- a/src/components/AppLayout/components/Footer.astro +++ b/src/components/AppLayout/components/Footer.astro @@ -148,7 +148,7 @@ const contactLabel = `${t("footer.socials.contact.title")} - ${t( } & > p { - font-weight: 700; + font-variation-settings: "wght" 700; font-size: 1.2em; white-space: pre; diff --git a/src/components/AppLayout/components/Html.astro b/src/components/AppLayout/components/Html.astro index e19500b..501e5ad 100644 --- a/src/components/AppLayout/components/Html.astro +++ b/src/components/AppLayout/components/Html.astro @@ -1,8 +1,6 @@ --- import UAParser from "ua-parser-js"; import { ViewTransitions } from "astro:transitions"; -import "@fontsource-variable/vollkorn"; -import "@fontsource-variable/murecho"; import { getI18n } from "src/i18n/i18n"; import AppLayoutSpinner from "./AppLayoutSpinner.astro"; import type { @@ -60,7 +58,7 @@ const { currentTheme } = Astro.locals; - + @@ -186,12 +184,6 @@ const { currentTheme } = Astro.locals; color-scheme: only light; } - font-weight: 430; - - strong { - font-weight: 600; - } - @media screen { &.dark-theme { --color-base-1000: #ebeae7; @@ -298,6 +290,64 @@ const { currentTheme } = Astro.locals; } } + /* FONTS */ + + @font-face { + font-family: "Vollkorn Variable"; + src: url("/fonts/Vollkorn-VariableFont_wght.woff2") format("woff2-variations"); + src: url("/fonts/Vollkorn-VariableFont_wght.woff2") format("woff2") tech("variations"); + font-weight: 400 900; + font-style: normal; + font-display: swap; + } + + @font-face { + font-family: "Murecho Variable"; + src: url("/fonts/Murecho-VariableFont_wght.woff2") format("woff2-variations"); + src: url("/fonts/Murecho-VariableFont_wght.woff2") format("woff2") tech("variations"); + font-weight: 100 900; + font-style: normal; + font-display: swap; + } + + html { + font-variation-settings: "wght" 430; + } + + h1 { + font-variation-settings: "wght" 900; + } + + h2 { + font-variation-settings: "wght" 800; + } + + h3, + h4 { + font-variation-settings: "wght" 700; + } + + h5, + h6 { + font-variation-settings: "wght" 600; + } + + strong { + font-variation-settings: "wght" 600; + } + + b { + font-variation-settings: "wght" 700; + } + + .font-serif { + font-family: "Vollkorn Variable", serif; + } + + :root { + --font-serif: "Vollkorn Variable", serif; + } + /* THEMING */ *::selection { @@ -347,19 +397,6 @@ const { currentTheme } = Astro.locals; margin: 0; } - h1, - h2 { - font-weight: 800; - } - - .font-serif { - font-family: "Vollkorn Variable", serif; - } - - :root { - --font-serif: "Vollkorn Variable", serif; - } - button { background-color: unset; font-size: 1em; diff --git a/src/components/Blocks/components/LineBlock.astro b/src/components/Blocks/components/LineBlock.astro index 9a87372..b5b430c 100644 --- a/src/components/Blocks/components/LineBlock.astro +++ b/src/components/Blocks/components/LineBlock.astro @@ -28,7 +28,7 @@ const { block } = Astro.props; p { color: var(--color-base-650); - font-weight: 500; + font-variation-settings: "wght" 500; } } diff --git a/src/components/Button.astro b/src/components/Button.astro index 74ed15b..debaa22 100644 --- a/src/components/Button.astro +++ b/src/components/Button.astro @@ -39,7 +39,7 @@ const { title, icon, class: className, ariaLabel, id } = Astro.props; place-content: center; gap: 1em; - font-weight: 700; + font-variation-settings: "wght" 700; font-size: 1em; cursor: pointer; diff --git a/src/components/ErrorMessage.astro b/src/components/ErrorMessage.astro index f77643c..4d46a35 100644 --- a/src/components/ErrorMessage.astro +++ b/src/components/ErrorMessage.astro @@ -29,7 +29,7 @@ const { title, description } = Astro.props; place-items: center; & > #title { - font-weight: 600; + font-variation-settings: "wght" 600; font-size: 120%; } } diff --git a/src/components/InlineMetadata.astro b/src/components/InlineMetadata.astro index 52b0e9f..5955b7d 100644 --- a/src/components/InlineMetadata.astro +++ b/src/components/InlineMetadata.astro @@ -21,7 +21,6 @@ if (values.length === 0) return;