Skip to content

Commit

Permalink
fix: drop gfonts; load .ttf files from scss, not missing woff2 from c…
Browse files Browse the repository at this point in the history
…ss (#393)

* fix: drop gfonts; load .ttf files from scss, not missing woff2 from css

* delete roboto regular that is now loaded from submodule

* Update src/styles.scss

* prettier

* load fonts before tailwind

* fix bad merge

---------

Co-authored-by: Konstantin <konstantin.klein+github@hochfrequenz.de>
Co-authored-by: kevin <kevin.krechan@hochfrequenz.de>
  • Loading branch information
3 people authored Jan 27, 2025
1 parent 3b61426 commit 108c276
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 43 deletions.
Binary file removed src/assets/Roboto-Regular.ttf
Binary file not shown.
5 changes: 0 additions & 5 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@
<title>AHB Tabellen</title>
<base href="/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Roboto+Mono&family=Roboto:wght@400;500;700&display=swap"
rel="stylesheet" />
<link rel="icon" type="image/x-icon" href="/assets/favicon/favicon.ico" sizes="32x32" />
<link rel="icon" href="/assets/favicon/hf_logo.svg" type="image/svg+xml" />
<link rel="apple-touch-icon" href="/assets/favicon/apple-touch-icon.png" />
Expand Down
34 changes: 1 addition & 33 deletions src/styles.css
Original file line number Diff line number Diff line change
@@ -1,36 +1,4 @@
/* Define local Roboto fonts */
@font-face {
font-family: 'Roboto';
font-weight: 400;
font-style: normal;
font-display: swap;
font-stretch: normal;
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F,
U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
src: url('/assets/companystylesheet/fonts/Roboto/Roboto-Regular.woff2') format('woff2');
}

@font-face {
font-family: 'Roboto';
font-weight: 500;
font-style: normal;
font-display: swap;
font-stretch: normal;
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F,
U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
src: url('/assets/companystylesheet/fonts/Roboto/Roboto-Medium.woff2') format('woff2');
}

@font-face {
font-family: 'Roboto';
font-weight: 700;
font-style: normal;
font-display: swap;
font-stretch: normal;
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F,
U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
src: url('/assets/companystylesheet/fonts/Roboto/Roboto-Bold.woff2') format('woff2');
}
/* fonts are loaded from styles.scss */

/* Add Roboto as the default font */
body {
Expand Down
40 changes: 35 additions & 5 deletions src/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,45 @@
--grell-grau: #c4cac1;
--weiches-schwarz: #25141d;
}
@tailwind base;
@tailwind components;
@tailwind utilities;

/* Font declarations */
@font-face {
font-family: 'Roboto';
src: url('/assets/companystylesheet/fonts/Roboto/Roboto-Regular.ttf') format('truetype');
font-weight: 400;
font-style: normal;
font-display: swap;
font-stretch: normal;
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, 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: 'Roboto';
src: url('/assets/Roboto-Regular.ttf') format('truetype');
font-weight: normal;
src: url('/assets/companystylesheet/fonts/Roboto/Roboto-Medium.ttf') format('truetype');
font-weight: 500;
font-style: normal;
font-display: swap;
font-stretch: normal;
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, 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: 'Roboto';
src: url('/assets/companystylesheet/fonts/Roboto/Roboto-Bold.ttf') format('truetype');
font-weight: 700; /* because font-weight for tailwind font-bold is 700*/
font-style: normal;
font-display: swap;
font-stretch: normal;
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F,
U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@tailwind base;
@tailwind components;
@tailwind utilities;

body {
font-family: 'Roboto', sans-serif;
}
Expand Down

0 comments on commit 108c276

Please sign in to comment.