diff options
| author | Philip Wittamore <philip@wittamore.com> | 2026-07-12 11:08:50 +0200 |
|---|---|---|
| committer | Philip Wittamore <philip@wittamore.com> | 2026-07-12 11:08:50 +0200 |
| commit | 420ceb49b53a8fa9d8ba8443e42e50cd7bd7cea9 (patch) | |
| tree | 3009f0564d75e3f7d1ca38507e7ebb92deaded07 /articles/2025/Reducing-web-font-size.html | |
update
Diffstat (limited to 'articles/2025/Reducing-web-font-size.html')
| -rwxr-xr-x | articles/2025/Reducing-web-font-size.html | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/articles/2025/Reducing-web-font-size.html b/articles/2025/Reducing-web-font-size.html new file mode 100755 index 0000000..e03b92f --- /dev/null +++ b/articles/2025/Reducing-web-font-size.html @@ -0,0 +1,39 @@ +<!doctype html> +<html lang="EN"> + <head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <link rel="stylesheet" href="/style.css"> + <title>Reducing web font size</title> + </head> + <body> + <header> + <h1>Bloggings</h1> + <a href="/index.php">Back</a> + + </header> + +<main> +<article> +<h2>Reducing web font size</h2> +<h3>2025-04-06</h3> +<h4>I stumbled on a marvellous post</h4> +<p>I started using the Jetbrains font for this blog, but adding the font in the css file makes it +pretty heavy, and I've been considering removing it. BUT...</p> +<p>I stumbled on <a href="https://neilzone.co.uk/2024/05/faffing-with-fonts-to-reduce-my-web-page-size-by-two-thirds/">this post</a> +and tried Neil's suggestion on the JetbrainsMono-Regular truetype font, and the font filesize was reduced from 274k to 66Kb</p> +<code>pipx install fonttools +pyftsubset JetbrainsMono-Regular.ttf --output-file=JetbrainsMono-Regular-reduced.ttf --unicodes=U+0020-007E</code> +<p>So I decided to try it on the JetBrainsMono Regular Nerdfont, a whopping 2.4Mb, but the result was even better, 18Kb!</p> +<code>.rw-r--r-- 66k philip 6 avril 23:04 JetBrainsMono-reduced.ttf +.rw-r--r-- 18k philip 6 avril 23:20 JetBrainsMonoNerd-reduced.ttf +</code> +<p>Understanding why will take a bit of forensics, in the mean time this blog has become much lighter.</p> +<h3>Update</h3> +<p>I wound up just using the default monospace for the main text, and Ultra (reduced) for the title .</p> + +</article> +</main> +<footer> +<p> </p><p>ยง</p></footer> +</body></html> |
