Change fonts default, provide the required fonts

This commit is contained in:
Antoine Le Gonidec 2024-07-24 12:56:45 +02:00
parent 49854e277f
commit 87fee319cf
Signed by: vv221
GPG key ID: 636B78F91CEB80D8
14 changed files with 90 additions and 1 deletions

64
css/fonts-cabin.css Normal file
View file

@ -0,0 +1,64 @@
@font-face {
font-family: 'Cabin';
font-style: italic;
font-weight: 400;
font-stretch: normal;
font-display: swap;
src: url(/Themes/MMF/fonts/Cabin-Italic.woff2) format('woff2');
}
@font-face {
font-family: 'Cabin';
font-style: italic;
font-weight: 500;
font-stretch: normal;
font-display: swap;
src: url(/Themes/MMF/fonts/Cabin-MediumItalic.woff2) format('woff2');
}
@font-face {
font-family: 'Cabin';
font-style: italic;
font-weight: 600;
font-stretch: normal;
font-display: swap;
src: url(/Themes/MMF/fonts/Cabin-SemiBoldItalic.woff2) format('woff2');
}
@font-face {
font-family: 'Cabin';
font-style: italic;
font-weight: 700;
font-stretch: normal;
font-display: swap;
src: url(/Themes/MMF/fonts/Cabin-BoldItalic.woff2) format('woff2');
}
@font-face {
font-family: 'Cabin';
font-style: normal;
font-weight: 400;
font-stretch: normal;
font-display: swap;
src: url(/Themes/MMF/fonts/Cabin-Regular.woff2) format('woff2');
}
@font-face {
font-family: 'Cabin';
font-style: normal;
font-weight: 500;
font-stretch: normal;
font-display: swap;
src: url(/Themes/MMF/fonts/Cabin-Medium.woff2) format('woff2');
}
@font-face {
font-family: 'Cabin';
font-style: normal;
font-weight: 600;
font-stretch: normal;
font-display: swap;
src: url(/Themes/MMF/fonts/Cabin-SemiBold.woff2) format('woff2');
}
@font-face {
font-family: 'Cabin';
font-style: normal;
font-weight: 700;
font-stretch: normal;
font-display: swap;
src: url(/Themes/MMF/fonts/Cabin-Bold.woff2) format('woff2');
}

16
css/fonts-oswald.css Normal file
View file

@ -0,0 +1,16 @@
@font-face {
font-family: 'Oswald';
font-style: normal;
font-weight: 200 700;
font-display: swap;
src: url(/Themes/MMF/fonts/Oswald-Latin.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
font-family: 'Oswald';
font-style: normal;
font-weight: 200 700;
font-display: swap;
src: url(/Themes/MMF/fonts/Oswald-Latin-ext.woff2) format('woff2');
unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

View file

@ -30,7 +30,7 @@ html {
body {
background: var(--bgcolor);
font-size: 100%;
font-family: "Luciole","Ubuntu","Cantarell","Segoe UI","Roboto","Oxygen","Fira Sans","Droid Sans","Helvetica Neue","Helvetica","Arial",sans-serif;
font-family: "Cabin",sans-serif;
color: var(--dark-color);
position: relative;
height: 100%;
@ -42,6 +42,9 @@ body {
background: #99d4ff;
color: rgba(0, 0, 0, 0.6);
}
h1, h2, h3, h4, h5, h6 {
font-family: "Oswald",sans-serif;
}
/* General reset */
* {

BIN
fonts/Cabin-Bold.woff2 Normal file

Binary file not shown.

Binary file not shown.

BIN
fonts/Cabin-Italic.woff2 Normal file

Binary file not shown.

BIN
fonts/Cabin-Medium.woff2 Normal file

Binary file not shown.

Binary file not shown.

BIN
fonts/Cabin-Regular.woff2 Normal file

Binary file not shown.

BIN
fonts/Cabin-SemiBold.woff2 Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
fonts/Oswald-Latin.woff2 Normal file

Binary file not shown.

View file

@ -181,6 +181,12 @@ function template_html_above()
echo '
<link rel="index" href="', $scripturl, '?board=', $context['current_board'], '.0">';
// Include stylesheets for custom fonts.
// TODO: The theme path could probably be un-hardcoded.
echo '
<link rel="stylesheet" href="/Themes/MMF/css/fonts-cabin.css" />
<link rel="stylesheet" href="/Themes/MMF/css/fonts-oswald.css" />';
// Output any remaining HTML headers. (from mods, maybe?)
echo $context['html_headers'];