Skip to content

Commit

Permalink
Changing font from woff to woff2
Browse files Browse the repository at this point in the history
  • Loading branch information
lmammino committed Jan 21, 2024
1 parent abc76bc commit 2a45b9b
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 7 deletions.
Binary file removed public/fonts/atkinson-bold.woff
Binary file not shown.
Binary file added public/fonts/atkinson-bold.woff2
Binary file not shown.
Binary file removed public/fonts/atkinson-regular.woff
Binary file not shown.
Binary file added public/fonts/atkinson-regular.woff2
Binary file not shown.
4 changes: 2 additions & 2 deletions src/components/BaseHead.astro
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ const seo: SEOProps = { ...defaultSEOProps(Astro), ...props }
<!-- Font preloads -->
<link
rel="preload"
href="/fonts/atkinson-regular.woff"
href="/fonts/atkinson-regular.woff2"
as="font"
type="font/woff"
crossorigin
/>
<link
rel="preload"
href="/fonts/atkinson-bold.woff"
href="/fonts/atkinson-bold.woff2"
as="font"
type="font/woff"
crossorigin
Expand Down
2 changes: 1 addition & 1 deletion src/layouts/CommonLayout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const { section, seo } = Astro.props
<head>
<BaseHead {...seo} />
</head>
<body class="overscroll-y-none flex flex-col">
<body class="flex flex-col">
<Header section={section} />
<main class="min-h-screen pb-32">
<slot />
Expand Down
15 changes: 11 additions & 4 deletions src/styles/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,27 @@
@tailwind components;
@tailwind utilities;

/* latin */
@font-face {
font-family: 'Atkinson';
src: url('/fonts/atkinson-regular.woff') format('woff');
font-weight: 400;
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/atkinson-regular.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: 'Atkinson';
src: url('/fonts/atkinson-bold.woff') format('woff');
font-weight: 700;
font-style: normal;
font-weight: 700;
font-display: swap;
src: url(/fonts/atkinson-bold.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 {
Expand Down

0 comments on commit 2a45b9b

Please sign in to comment.