<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: FontHubs</title>
    <description>The latest articles on DEV Community by FontHubs (@fonthubs).</description>
    <link>https://dev.to/fonthubs</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4225346%2F78fdc7f9-c7d8-40b0-8bcc-00e354bf905b.png</url>
      <title>DEV Community: FontHubs</title>
      <link>https://dev.to/fonthubs</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/fonthubs"/>
    <language>en</language>
    <item>
      <title>Your Web Fonts Are Slowing Your Site Down — Here's How to Fix It</title>
      <dc:creator>FontHubs</dc:creator>
      <pubDate>Wed, 04 Nov 2026 07:20:47 +0000</pubDate>
      <link>https://dev.to/fonthubs/your-web-fonts-are-slowing-your-site-down-heres-how-to-fix-it-195l</link>
      <guid>https://dev.to/fonthubs/your-web-fonts-are-slowing-your-site-down-heres-how-to-fix-it-195l</guid>
      <description>&lt;p&gt;Fonts are often the last thing developers optimize and the first thing users notice. A page can have perfect images, minimal JavaScript, and still feel slow because the browser is blocked waiting for a 300 KB font file. Here is a practical checklist that fixes most of it.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Serve WOFF2, and only WOFF2 if you can
&lt;/h2&gt;

&lt;p&gt;WOFF2 compresses roughly 30% better than WOFF. Unless you need to support truly ancient browsers, shipping a single WOFF2 file per weight is the simplest win. Drop the TTF, EOT, and SVG versions from your font stack — they are dead weight in 2026.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Use font-display: swap
&lt;/h2&gt;

&lt;p&gt;Without it, browsers hide text until the font loads (FOIT) or show nothing at all for seconds. Add one line to your @font-face:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="k"&gt;@font-face&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;font-family&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;'MyFont'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;src&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;url&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;'/fonts/myfont.woff2'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="nf"&gt;format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;'woff2'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nl"&gt;font-display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;swap&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Swap shows fallback text immediately and swaps in the real font when it arrives. Users read instantly; the layout shift is a fair trade and can be reduced with size-adjust (see below).&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Preload only the fonts above the fold
&lt;/h2&gt;

&lt;p&gt;Preload tells the browser to fetch a font early instead of discovering it late in the CSS cascade. Only preload the one or two weights actually used in the hero section:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"preload"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"/fonts/myfont.woff2"&lt;/span&gt; &lt;span class="na"&gt;as=&lt;/span&gt;&lt;span class="s"&gt;"font"&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"font/woff2"&lt;/span&gt; &lt;span class="na"&gt;crossorigin&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Preloading every weight defeats the purpose — it competes with your critical resources.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Subset your fonts
&lt;/h2&gt;

&lt;p&gt;Most fonts ship with glyphs for languages your page never uses. Subsetting keeps only the character ranges you need (e.g. latin) and can cut a font file by half or more. Tools like glyphhanger or fonttools make this a one-command job, and it is worth doing for every font you self-host.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Reduce layout shift with size-adjust
&lt;/h2&gt;

&lt;p&gt;The classic complaint about font-display: swap is the visible jump when the webfont replaces the fallback. The size-adjust descriptor lets you scale the fallback font to match the webfont's metrics, so the swap is nearly invisible:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="k"&gt;@font-face&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;font-family&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;'Fallback'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;src&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;local&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;'Arial'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="py"&gt;size-adjust&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;105%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  6. Self-host instead of hot-linking
&lt;/h2&gt;

&lt;p&gt;Self-hosting removes a third-party round trip and gives you full control over caching headers. Set a long cache lifetime (a year is standard) with immutable, since font files are versioned by filename.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where to get fonts
&lt;/h2&gt;

&lt;p&gt;If you are looking for free fonts to test all of this with, &lt;a href="https://fonthubs.com" rel="noopener noreferrer"&gt;FontHubs&lt;/a&gt; offers free downloadable font families you can self-host and subset. Pick one family, run through the checklist above, and measure the before/after in Lighthouse — the difference is usually obvious on the first run.&lt;/p&gt;

&lt;h2&gt;
  
  
  Checklist
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;WOFF2 only&lt;/li&gt;
&lt;li&gt;font-display: swap&lt;/li&gt;
&lt;li&gt;Preload hero fonts only&lt;/li&gt;
&lt;li&gt;Subset to the ranges you use&lt;/li&gt;
&lt;li&gt;size-adjust the fallback&lt;/li&gt;
&lt;li&gt;Self-host with long caching&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Do these six and fonts stop being a performance problem.&lt;/p&gt;

</description>
      <category>css</category>
      <category>frontend</category>
      <category>performance</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
