Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add locally hosted Poppins font with font-face setup #43

Merged
merged 1 commit into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Binary file added src/asset/resource/font/Poppins-Bold-latin.woff2
Binary file not shown.
Binary file not shown.
Binary file not shown.
28 changes: 28 additions & 0 deletions src/scss/_poppins.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*!
* Poppins font hosted locally
* Licensed under the Open Font License (OFL) v1.1
* https://scripts.sil.org/OFL
*/

@mixin font-face($family, $style, $weight, $src, $unicode-range) {
@font-face {
font-family: $family;
font-style: $style;
font-weight: $weight;
font-display: swap;
src: url($src) format('woff2');
unicode-range: $unicode-range;
}
}

/* latin-ext */
@include font-face('Poppins', normal, 400, '../asset/resource/font/Poppins-Regular-latin-ext.woff2', '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');

/* latin */
@include font-face('Poppins', normal, 400, '../asset/resource/font/Poppins-Regular-latin-ext.woff2', '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');

/* latin-ext */
@include font-face('Poppins', normal, 700, '../asset/resource/font/Poppins-Bold-latin-ext.woff2', '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');

/* latin */
@include font-face('Poppins', normal, 700, '../asset/resource/font/Poppins-Bold-latin-ext.woff2', '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');
1 change: 1 addition & 0 deletions src/scss/index.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@import "poppins";
@import "fontawesome";

// Variables
Expand Down
3 changes: 0 additions & 3 deletions src/views/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
<meta property="og:description" content="Discover the professional profile of Balázs Varga. View links to LinkedIn, GitHub, Bluesky, and blog content." />
<meta property="og:image" content="../asset/resource/profile.png" />
<meta property="og:image:alt" content="Balázs Varga's profile picture" />
<link rel="preconnect" href="https://fonts.gstatic.com/" crossorigin />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;700&display=swap" rel="stylesheet" />
</head>
<body>
<div class="clazz-container">
Expand Down