Skip to content

Instantly share code, notes, and snippets.

@atomjoy
Last active August 27, 2026 16:39
Show Gist options
  • Select an option

  • Save atomjoy/34e76cd85b661c4f0f46cc6089c0fa36 to your computer and use it in GitHub Desktop.

Select an option

Save atomjoy/34e76cd85b661c4f0f46cc6089c0fa36 to your computer and use it in GitHub Desktop.
Import Poppins fonts from local server.
/*
Download fonts here:
https://fontsource.org/fonts/poppins/install
unzip all font files from static directory to fonts/poppins
More fonts:
https://www.npmjs.com/package/@fontsource/poppins
https://github.com/fontsource/font-files/tree/main/fonts/google/poppins/files
*/
/*
Fonty serwowane z własnego serwera
latin-ext (w tym polskie znaki: ą, ć, ę, ł, ń, ó, ś, ź, ż)
latin (podstawowe litery alfabetu)
*/
@font-face {
font-family: 'Poppins';
font-style: normal;
font-weight: 100;
font-display: swap;
src: url('fonts/poppins/poppins-latin-ext-100-normal.woff2') format('woff2');
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
font-family: 'Poppins';
font-style: normal;
font-weight: 100;
font-display: swap;
src: url('fonts/poppins/poppins-latin-100-normal.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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
font-family: 'Poppins';
font-style: normal;
font-weight: 200;
font-display: swap;
src: url('fonts/poppins/poppins-latin-ext-200-normal.woff2') format('woff2');
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
font-family: 'Poppins';
font-style: normal;
font-weight: 200;
font-display: swap;
src: url('fonts/poppins/poppins-latin-200-normal.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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
font-family: 'Poppins';
font-style: normal;
font-weight: 300;
font-display: swap;
src: url('fonts/poppins/poppins-latin-ext-300-normal.woff2') format('woff2');
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
font-family: 'Poppins';
font-style: normal;
font-weight: 300;
font-display: swap;
src: url('fonts/poppins/poppins-latin-300-normal.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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
font-family: 'Poppins';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('fonts/poppins/poppins-latin-ext-400-normal.woff2') format('woff2');
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
font-family: 'Poppins';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('fonts/poppins/poppins-latin-400-normal.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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
font-family: 'Poppins';
font-style: normal;
font-weight: 500;
font-display: swap;
src: url('fonts/poppins/poppins-latin-ext-500-normal.woff2') format('woff2');
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
font-family: 'Poppins';
font-style: normal;
font-weight: 500;
font-display: swap;
src: url('fonts/poppins/poppins-latin-500-normal.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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
font-family: 'Poppins';
font-style: normal;
font-weight: 600;
font-display: swap;
src: url('fonts/poppins/poppins-latin-ext-600-normal.woff2') format('woff2');
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
font-family: 'Poppins';
font-style: normal;
font-weight: 600;
font-display: swap;
src: url('fonts/poppins/poppins-latin-600-normal.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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
font-family: 'Poppins';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('fonts/poppins/poppins-latin-ext-700-normal.woff2') format('woff2');
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
font-family: 'Poppins';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('fonts/poppins/poppins-latin-700-normal.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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
font-family: 'Poppins';
font-style: normal;
font-weight: 800;
font-display: swap;
src: url('fonts/poppins/poppins-latin-ext-800-normal.woff2') format('woff2');
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
font-family: 'Poppins';
font-style: normal;
font-weight: 800;
font-display: swap;
src: url('fonts/poppins/poppins-latin-800-normal.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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
font-family: 'Poppins';
font-style: normal;
font-weight: 900;
font-display: swap;
src: url('fonts/poppins/poppins-latin-ext-900-normal.woff2') format('woff2');
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
font-family: 'Poppins';
font-style: normal;
font-weight: 900;
font-display: swap;
src: url('fonts/poppins/poppins-latin-900-normal.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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<link rel="stylesheet" href="fonts.css" />
<style>
body {
font-family: 'Poppins';
font-weight: 400;
font-size: 16px;
}
h1 {
font-size: 20px;
}
</style>
</head>
<body>
<h1 style="font-weight: 100">Poppins - Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nisi consectetur veritatis iure nostrum, perferendis modi maxime, amet porro, totam corrupti dolore dolor. Quos rem dolor nemo! Doloremque vel qui molestias.</h1>
<h1 style="font-weight: 200">Poppins - Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nisi consectetur veritatis iure nostrum, perferendis modi maxime, amet porro, totam corrupti dolore dolor. Quos rem dolor nemo! Doloremque vel qui molestias.</h1>
<h1 style="font-weight: 300">Poppins - Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nisi consectetur veritatis iure nostrum, perferendis modi maxime, amet porro, totam corrupti dolore dolor. Quos rem dolor nemo! Doloremque vel qui molestias.</h1>
<h1 style="font-weight: 400">Poppins - Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nisi consectetur veritatis iure nostrum, perferendis modi maxime, amet porro, totam corrupti dolore dolor. Quos rem dolor nemo! Doloremque vel qui molestias.</h1>
<h1 style="font-weight: 500">Poppins - Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nisi consectetur veritatis iure nostrum, perferendis modi maxime, amet porro, totam corrupti dolore dolor. Quos rem dolor nemo! Doloremque vel qui molestias.</h1>
<h1 style="font-weight: 600">Poppins - Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nisi consectetur veritatis iure nostrum, perferendis modi maxime, amet porro, totam corrupti dolore dolor. Quos rem dolor nemo! Doloremque vel qui molestias.</h1>
<h1 style="font-weight: 700">Poppins - Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nisi consectetur veritatis iure nostrum, perferendis modi maxime, amet porro, totam corrupti dolore dolor. Quos rem dolor nemo! Doloremque vel qui molestias.</h1>
<h1 style="font-weight: 800">Poppins - Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nisi consectetur veritatis iure nostrum, perferendis modi maxime, amet porro, totam corrupti dolore dolor. Quos rem dolor nemo! Doloremque vel qui molestias.</h1>
<h1 style="font-weight: 900">Poppins - Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nisi consectetur veritatis iure nostrum, perferendis modi maxime, amet porro, totam corrupti dolore dolor. Quos rem dolor nemo! Doloremque vel qui molestias.</h1>
<p>
ą, ć, ę, ł, ń, ó, ś, ź, ż Lorem ipsum dolor sit amet consectetur adipisicing elit. Sit qui nihil, dolorem odio maiores ad tempore corporis soluta sapiente aperiam, incidunt quas unde consectetur illo! Quo beatae aspernatur quis at? Lorem ipsum dolor sit amet consectetur, adipisicing elit.
Eveniet vitae ullam ratione quo esse id accusamus dignissimos facilis ipsam earum! Laborum voluptate non nulla laboriosam nesciunt nam delectus repudiandae voluptates.
</p>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment