perf: convert fonts to WOFF2 (10x smaller), fix preload to match, add html,body CSS font rule
All checks were successful
Build frontend / build (push) Successful in 42s
All checks were successful
Build frontend / build (push) Successful in 42s
This commit is contained in:
@ -3,74 +3,74 @@
|
|||||||
/* ─── Madani Arabic Font ─── */
|
/* ─── Madani Arabic Font ─── */
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'Madani Arabic';
|
font-family: 'Madani Arabic';
|
||||||
src: url('/fonts/Madani Arabic Thin.ttf') format('truetype');
|
src: url('/fonts/Madani Arabic Thin.woff2') format('woff2');
|
||||||
font-weight: 100;
|
font-weight: 100;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-display: swap;
|
font-display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'Madani Arabic';
|
font-family: 'Madani Arabic';
|
||||||
src: url('/fonts/Madani Arabic Extra Light.ttf') format('truetype');
|
src: url('/fonts/Madani Arabic Extra Light.woff2') format('woff2');
|
||||||
font-weight: 200;
|
font-weight: 200;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-display: swap;
|
font-display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'Madani Arabic';
|
font-family: 'Madani Arabic';
|
||||||
src: url('/fonts/Madani Arabic Light.ttf') format('truetype');
|
src: url('/fonts/Madani Arabic Light.woff2') format('woff2');
|
||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-display: swap;
|
font-display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'Madani Arabic';
|
font-family: 'Madani Arabic';
|
||||||
src: url('/fonts/Madani-Arabic-Regular.ttf') format('truetype');
|
src: url('/fonts/Madani-Arabic-Regular.woff2') format('woff2');
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-display: swap;
|
font-display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'Madani Arabic';
|
font-family: 'Madani Arabic';
|
||||||
src: url('/fonts/Madani Arabic Medium.ttf') format('truetype');
|
src: url('/fonts/Madani Arabic Medium.woff2') format('woff2');
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-display: swap;
|
font-display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'Madani Arabic';
|
font-family: 'Madani Arabic';
|
||||||
src: url('/fonts/Madani Arabic Semi Bold.ttf') format('truetype');
|
src: url('/fonts/Madani Arabic Semi Bold.woff2') format('woff2');
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-display: swap;
|
font-display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'Madani Arabic';
|
font-family: 'Madani Arabic';
|
||||||
src: url('/fonts/Madani-Arabic-Bold.ttf') format('truetype');
|
src: url('/fonts/Madani-Arabic-Bold.woff2') format('woff2');
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-display: swap;
|
font-display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'Madani Arabic';
|
font-family: 'Madani Arabic';
|
||||||
src: url('/fonts/Madani Arabic Extra Bold.ttf') format('truetype');
|
src: url('/fonts/Madani Arabic Extra Bold.woff2') format('woff2');
|
||||||
font-weight: 800;
|
font-weight: 800;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-display: swap;
|
font-display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'Madani Arabic';
|
font-family: 'Madani Arabic';
|
||||||
src: url('/fonts/Madani Arabic Black.ttf') format('truetype');
|
src: url('/fonts/Madani Arabic Black.woff2') format('woff2');
|
||||||
font-weight: 900;
|
font-weight: 900;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-display: swap;
|
font-display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
@ -92,6 +92,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
html, body {
|
||||||
|
font-family: 'Madani Arabic', 'Noto Sans Arabic', 'Cairo', Arial, sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
background: var(--background);
|
background: var(--background);
|
||||||
color: var(--foreground);
|
color: var(--foreground);
|
||||||
|
|||||||
@ -29,22 +29,22 @@ export default function Layout({ children }) {
|
|||||||
<link
|
<link
|
||||||
rel="preload"
|
rel="preload"
|
||||||
as="font"
|
as="font"
|
||||||
href="/fonts/Madani-Arabic-Regular.ttf"
|
href="/fonts/Madani-Arabic-Regular.woff2"
|
||||||
type="font/ttf"
|
type="font/woff2"
|
||||||
crossOrigin="anonymous"
|
crossOrigin="anonymous"
|
||||||
/>
|
/>
|
||||||
<link
|
<link
|
||||||
rel="preload"
|
rel="preload"
|
||||||
as="font"
|
as="font"
|
||||||
href="/fonts/Madani-Arabic-Bold.ttf"
|
href="/fonts/Madani-Arabic-Bold.woff2"
|
||||||
type="font/ttf"
|
type="font/woff2"
|
||||||
crossOrigin="anonymous"
|
crossOrigin="anonymous"
|
||||||
/>
|
/>
|
||||||
<link
|
<link
|
||||||
rel="preload"
|
rel="preload"
|
||||||
as="font"
|
as="font"
|
||||||
href="/fonts/Madani Arabic Medium.ttf"
|
href="/fonts/Madani Arabic Medium.woff2"
|
||||||
type="font/ttf"
|
type="font/woff2"
|
||||||
crossOrigin="anonymous"
|
crossOrigin="anonymous"
|
||||||
/>
|
/>
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
BIN
public/fonts/Madani Arabic Black.woff2
Normal file
BIN
public/fonts/Madani Arabic Black.woff2
Normal file
Binary file not shown.
BIN
public/fonts/Madani Arabic Extra Bold.woff2
Normal file
BIN
public/fonts/Madani Arabic Extra Bold.woff2
Normal file
Binary file not shown.
BIN
public/fonts/Madani Arabic Extra Light.woff2
Normal file
BIN
public/fonts/Madani Arabic Extra Light.woff2
Normal file
Binary file not shown.
BIN
public/fonts/Madani Arabic Light.woff2
Normal file
BIN
public/fonts/Madani Arabic Light.woff2
Normal file
Binary file not shown.
BIN
public/fonts/Madani Arabic Medium.woff2
Normal file
BIN
public/fonts/Madani Arabic Medium.woff2
Normal file
Binary file not shown.
BIN
public/fonts/Madani Arabic Semi Bold.woff2
Normal file
BIN
public/fonts/Madani Arabic Semi Bold.woff2
Normal file
Binary file not shown.
BIN
public/fonts/Madani Arabic Thin.woff2
Normal file
BIN
public/fonts/Madani Arabic Thin.woff2
Normal file
Binary file not shown.
BIN
public/fonts/Madani Arabic Variable.woff2
Normal file
BIN
public/fonts/Madani Arabic Variable.woff2
Normal file
Binary file not shown.
BIN
public/fonts/Madani-Arabic-Bold.woff2
Normal file
BIN
public/fonts/Madani-Arabic-Bold.woff2
Normal file
Binary file not shown.
BIN
public/fonts/Madani-Arabic-Regular.woff2
Normal file
BIN
public/fonts/Madani-Arabic-Regular.woff2
Normal file
Binary file not shown.
Reference in New Issue
Block a user