Self-host fonts for improved performance

- Download JetBrains Mono and Pretendard fonts (woff2)
- Add fonts.css with @font-face declarations
- Remove Google Fonts external dependencies
- Update CSP to remove fonts.googleapis.com
- Update all HTML files to use local fonts

Improves FCP/LCP by eliminating external font requests.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
kappa
2026-01-21 00:02:56 +09:00
parent e33aadcae3
commit b9df16241d
11 changed files with 50 additions and 16 deletions

44
fonts.css Normal file
View File

@@ -0,0 +1,44 @@
/* JetBrains Mono - Regular (400) */
@font-face {
font-family: 'JetBrains Mono';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/jetbrains-mono-400.woff2') format('woff2');
}
/* JetBrains Mono - Bold (700) */
@font-face {
font-family: 'JetBrains Mono';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/jetbrains-mono-700.woff2') format('woff2');
}
/* Pretendard - Regular (400) */
@font-face {
font-family: 'Pretendard';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/fonts/pretendard-400.woff2') format('woff2');
}
/* Pretendard - SemiBold (600) */
@font-face {
font-family: 'Pretendard';
font-style: normal;
font-weight: 600;
font-display: swap;
src: url('/fonts/pretendard-600.woff2') format('woff2');
}
/* Pretendard - Bold (700) */
@font-face {
font-family: 'Pretendard';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('/fonts/pretendard-700.woff2') format('woff2');
}

Binary file not shown.

Binary file not shown.

BIN
fonts/pretendard-400.woff2 Normal file

Binary file not shown.

BIN
fonts/pretendard-600.woff2 Normal file

Binary file not shown.

BIN
fonts/pretendard-700.woff2 Normal file

Binary file not shown.

View File

@@ -3,7 +3,7 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self' https://cdn.jsdelivr.net 'unsafe-inline' 'unsafe-eval'; style-src 'self' https://fonts.googleapis.com 'unsafe-inline'; font-src 'self' https://fonts.gstatic.com; img-src 'self' data:; connect-src 'self';"> <meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self' https://cdn.jsdelivr.net 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; font-src 'self'; img-src 'self' data:; connect-src 'self';">
<title>Anvil Hosting - 개발자를 위한 컨테이너 클라우드</title> <title>Anvil Hosting - 개발자를 위한 컨테이너 클라우드</title>
<!-- SEO Meta Tags --> <!-- SEO Meta Tags -->
@@ -35,11 +35,7 @@
<link rel="stylesheet" href="style.css"> <link rel="stylesheet" href="style.css">
<!-- Fonts --> <!-- Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="stylesheet" href="fonts.css">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="preload" as="style" href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&family=Pretendard:wght@400;600;700&display=swap">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&family=Pretendard:wght@400;600;700&display=swap" media="print" onload="this.media='all'">
<noscript><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&family=Pretendard:wght@400;600;700&display=swap"></noscript>
<!-- App JavaScript (must load before Alpine.js) --> <!-- App JavaScript (must load before Alpine.js) -->
<script defer src="app.js"></script> <script defer src="app.js"></script>

View File

@@ -9,9 +9,7 @@
<link rel="stylesheet" href="style.css"> <link rel="stylesheet" href="style.css">
<!-- Fonts --> <!-- Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="stylesheet" href="fonts.css">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&family=Pretendard:wght@400;600;700&display=swap">
<!-- Favicon --> <!-- Favicon -->
<link rel="icon" type="image/svg+xml" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><rect fill='%230ea5e9' rx='20' width='100' height='100'/><text x='50' y='70' font-size='60' text-anchor='middle' fill='white' font-family='sans-serif' font-weight='bold'>A</text></svg>"> <link rel="icon" type="image/svg+xml" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><rect fill='%230ea5e9' rx='20' width='100' height='100'/><text x='50' y='70' font-size='60' text-anchor='middle' fill='white' font-family='sans-serif' font-weight='bold'>A</text></svg>">

View File

@@ -2,7 +2,7 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url> <url>
<loc>https://hosting.anvil.it.com/</loc> <loc>https://hosting.anvil.it.com/</loc>
<lastmod>2026-01-20</lastmod> <lastmod>2026-01-21</lastmod>
<changefreq>weekly</changefreq> <changefreq>weekly</changefreq>
<priority>1.0</priority> <priority>1.0</priority>
</url> </url>

View File

@@ -9,9 +9,7 @@
<link rel="stylesheet" href="style.css"> <link rel="stylesheet" href="style.css">
<!-- Fonts --> <!-- Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="stylesheet" href="fonts.css">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&family=Pretendard:wght@400;600;700&display=swap">
<!-- Favicon --> <!-- Favicon -->
<link rel="icon" type="image/svg+xml" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><rect fill='%230ea5e9' rx='20' width='100' height='100'/><text x='50' y='70' font-size='60' text-anchor='middle' fill='white' font-family='sans-serif' font-weight='bold'>A</text></svg>"> <link rel="icon" type="image/svg+xml" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><rect fill='%230ea5e9' rx='20' width='100' height='100'/><text x='50' y='70' font-size='60' text-anchor='middle' fill='white' font-family='sans-serif' font-weight='bold'>A</text></svg>">

View File

@@ -9,9 +9,7 @@
<link rel="stylesheet" href="style.css"> <link rel="stylesheet" href="style.css">
<!-- Fonts --> <!-- Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="stylesheet" href="fonts.css">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&family=Pretendard:wght@400;600;700&display=swap">
<!-- Favicon --> <!-- Favicon -->
<link rel="icon" type="image/svg+xml" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><rect fill='%230ea5e9' rx='20' width='100' height='100'/><text x='50' y='70' font-size='60' text-anchor='middle' fill='white' font-family='sans-serif' font-weight='bold'>A</text></svg>"> <link rel="icon" type="image/svg+xml" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><rect fill='%230ea5e9' rx='20' width='100' height='100'/><text x='50' y='70' font-size='60' text-anchor='middle' fill='white' font-family='sans-serif' font-weight='bold'>A</text></svg>">