<?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 UI Breaks in German (and Wraps Weirdly in Chinese): Designing for Text Expansion</title>
      <dc:creator>FontHubs</dc:creator>
      <pubDate>Mon, 23 Nov 2026 02:25:41 +0000</pubDate>
      <link>https://dev.to/fonthubs/your-ui-breaks-in-german-and-wraps-weirdly-in-chinese-designing-for-text-expansion-5747</link>
      <guid>https://dev.to/fonthubs/your-ui-breaks-in-german-and-wraps-weirdly-in-chinese-designing-for-text-expansion-5747</guid>
      <description>&lt;p&gt;Your English UI fits perfectly. The button says "Download", the card title sits on one line, and the sidebar looks tidy.&lt;/p&gt;

&lt;p&gt;Then someone switches the language.&lt;/p&gt;

&lt;p&gt;German turns "Download" into "Herunterladen". A short settings label becomes a full sentence. Chinese may take less horizontal space, but it breaks lines by different rules — and if your font falls back mid-sentence, the whole paragraph suddenly changes height.&lt;/p&gt;

&lt;p&gt;This is not a translation problem. It is a layout and font problem, and you can test for it before your users find it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why translated text changes size
&lt;/h2&gt;

&lt;p&gt;A useful rule of thumb: expect many European languages to expand English strings by roughly 30–40%, especially for short UI labels. Short strings expand the most, because there is no room to abbreviate.&lt;/p&gt;

&lt;p&gt;Three things change at once:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Length&lt;/strong&gt; — words get longer, or a compact English phrase needs several words in another language.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Line breaking&lt;/strong&gt; — Chinese and Japanese do not break lines at spaces the way English does, and some words in German or Finnish resist breaking at all.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Font metrics&lt;/strong&gt; — if a character is missing from your first font, the browser quietly substitutes another font for just that character. The substitute may be taller, wider, or heavier, so one line grows while its neighbours do not.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That third point is the one developers miss. The layout did not break because the translation was long. It broke because two fonts with different metrics ended up sharing one line.&lt;/p&gt;

&lt;h2&gt;
  
  
  Rule 1: Never give UI text a fixed height
&lt;/h2&gt;

&lt;p&gt;Fixed heights are where expansion goes to die.&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="cm"&gt;/* Fragile */&lt;/span&gt;
&lt;span class="nc"&gt;.button&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;36px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;overflow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;hidden&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="cm"&gt;/* Resilient */&lt;/span&gt;
&lt;span class="nc"&gt;.button&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;min-height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;36px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;padding-block&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.5rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;white-space&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;normal&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;Let buttons, tabs, chips, and table headers grow vertically. A two-line button in German looks far better than a one-line button with the end of the word cut off.&lt;/p&gt;

&lt;p&gt;The same applies to cards: design for the tallest plausible content, not the English content you happen to have today.&lt;/p&gt;

&lt;h2&gt;
  
  
  Rule 2: Test with pseudo-localization, not hope
&lt;/h2&gt;

&lt;p&gt;You do not need finished translations to find expansion bugs. Pseudo-localization stretches your existing strings and wraps them in markers, so long text and missing characters show up immediately.&lt;/p&gt;

&lt;p&gt;A simple version in JavaScript:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;pseudo&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;str&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;
  &lt;span class="sb"&gt;`[${str.replace(/[aeiou]/gi, (c) =&amp;gt; c + c)} ${"·".repeat(Math.ceil(str.length / 3))}]`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nb"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;pseudo&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Download report"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="c1"&gt;// [Doownlooaad reepoort ·····]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run your app in this mode and click through the main flows. Anywhere text is clipped, overlaps, or pushes an icon off-screen is a bug you just found for free — before paying for a single translated word.&lt;/p&gt;

&lt;h2&gt;
  
  
  Rule 3: Check your font stack per language, not per page
&lt;/h2&gt;

&lt;p&gt;A font stack that works for English may silently fail for another script. Before shipping a language, test three strings in your actual UI font:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A long, unbreakable word (German compound nouns are a good stress test)&lt;/li&gt;
&lt;li&gt;A mixed string: Latin brand names inside a Chinese or Japanese sentence&lt;/li&gt;
&lt;li&gt;Punctuation and numbers in the target language, not copied from English&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Preview candidate fonts side by side with your own test strings — a &lt;a href="https://www.fonthubs.com/tools/compare" rel="noopener noreferrer"&gt;font comparison tool&lt;/a&gt; makes this quick — and look specifically at line height and character width, not just whether the font "looks nice". If the fallback font is noticeably taller, your paragraphs will ripple every time the script changes.&lt;/p&gt;

&lt;p&gt;Also set &lt;code&gt;lang&lt;/code&gt; attributes correctly. Browsers use them to pick line-breaking rules and font fallbacks:&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;p&lt;/span&gt; &lt;span class="na"&gt;lang&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"de"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Die Datei wurde heruntergeladen.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;lang&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"zh-CN"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;文件已下载完成。&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Without &lt;code&gt;lang&lt;/code&gt;, the browser guesses — and it guesses using your page's default language, not the string's.&lt;/p&gt;

&lt;h2&gt;
  
  
  Rule 4: Let text wrap the way the language wants
&lt;/h2&gt;

&lt;p&gt;Two CSS properties prevent most of the ugly cases:&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="nc"&gt;.label&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;overflow-wrap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;anywhere&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="cm"&gt;/* last resort for unbreakable strings */&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.prose&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nf"&gt;lang&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;zh&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;.prose&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nf"&gt;lang&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;ja&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;line-break&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;strict&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;word-break&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;normal&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;Use &lt;code&gt;overflow-wrap: anywhere&lt;/code&gt; sparingly — on labels, URLs, and table cells — not on body copy, where it can split words in places readers find jarring.&lt;/p&gt;

&lt;p&gt;And never justify CJK body text the way you justify English. Justification stretches the spaces between characters, and in a script without word spaces it produces uneven, gappy lines that are harder to read.&lt;/p&gt;

&lt;h2&gt;
  
  
  A 10-minute pre-launch checklist
&lt;/h2&gt;

&lt;p&gt;Before adding any new language, run through this list:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[ ] Pseudo-localize the top 5 screens and fix every clipped label&lt;/li&gt;
&lt;li&gt;[ ] Remove fixed heights from buttons, tabs, and nav items&lt;/li&gt;
&lt;li&gt;[ ] Confirm your font actually covers every script you ship — no silent fallbacks mid-sentence&lt;/li&gt;
&lt;li&gt;[ ] Set &lt;code&gt;lang&lt;/code&gt; on every translated block, including mixed-language pages&lt;/li&gt;
&lt;li&gt;[ ] Test one long German string, one Chinese paragraph, and one mixed-script sentence at mobile width&lt;/li&gt;
&lt;li&gt;[ ] Check numbers, dates, and punctuation in the target language's own format&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The takeaway
&lt;/h2&gt;

&lt;p&gt;Internationalization bugs rarely look like internationalization bugs. They look like a button that wraps, a card that overflows, or a paragraph where one line is mysteriously taller than the rest.&lt;/p&gt;

&lt;p&gt;Design for expansion, test with pseudo-localization, and treat your font stack as part of the layout system — not decoration added at the end. Your German and Chinese users will never notice. That is exactly the point.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Have a favourite pseudo-localization horror story — a label that overflowed in exactly the wrong place? I'd love to hear it in the comments.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>css</category>
      <category>i18n</category>
      <category>typography</category>
    </item>
    <item>
      <title>Your Code Font Is Lying to You: 5 Things to Check in a Monospace Font</title>
      <dc:creator>FontHubs</dc:creator>
      <pubDate>Mon, 16 Nov 2026 02:25:46 +0000</pubDate>
      <link>https://dev.to/fonthubs/your-code-font-is-lying-to-you-5-things-to-check-in-a-monospace-font-1m33</link>
      <guid>https://dev.to/fonthubs/your-code-font-is-lying-to-you-5-things-to-check-in-a-monospace-font-1m33</guid>
      <description>&lt;p&gt;Most developers pick a code font once, from a screenshot, and then live with it for years. The problem is that screenshots hide the things that actually slow you down while reading code: ambiguous characters, ligatures that change meaning at a glance, and weights that fall apart at 13px.&lt;/p&gt;

&lt;p&gt;Here is a five-minute check you can run on any monospace font before you commit to it. Paste this test string into your editor at your real working size:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="mo"&gt;0O&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt; &lt;span class="mi"&gt;1lI&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="o"&gt;++&lt;/span&gt; &lt;span class="o"&gt;--&lt;/span&gt; &lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="o"&gt;::&lt;/span&gt; &lt;span class="c1"&gt;// /* */&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;total&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;items&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;count&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="kc"&gt;null&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;
  
  
  1. Can you tell 0, O, and o apart instantly?
&lt;/h2&gt;

&lt;p&gt;In a good coding font, zero is not just a narrower O. Look for a slash, a dot, or a distinct shape inside the zero, a rounder capital O, and a smaller, simpler lowercase o. If you have to pause on &lt;code&gt;0O&lt;/code&gt; in a token, an ID, or a hex colour, that pause will happen hundreds of times a day. This single test rules out more fonts than any aesthetic preference.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Do 1, l, I, and | stay separate?
&lt;/h2&gt;

&lt;p&gt;One, lowercase L, capital i, and the pipe character are the classic source of misread code — especially in shell commands, regex, and generated IDs. Check them side by side in the test string. A coding font should give the one a base or flag, keep lowercase l slightly curved or tailed, and make capital I clearly barred. If &lt;code&gt;1lI|&lt;/code&gt; reads as four copies of the same stroke, pick another font.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Ligatures: helpful shorthand or hidden meaning?
&lt;/h2&gt;

&lt;p&gt;Fonts like Fira Code, JetBrains Mono, and Cascadia Code can join &lt;code&gt;=&amp;gt;&lt;/code&gt;, &lt;code&gt;!=&lt;/code&gt;, and &lt;code&gt;-&amp;gt;&lt;/code&gt; into single glyphs. Many people find this cleaner. But ligatures can also mask what is actually in the file: &lt;code&gt;===&lt;/code&gt; versus &lt;code&gt;==&lt;/code&gt;, or a long arrow that is really two characters, matters when you are diffing or teaching. There is no right answer — but decide deliberately, and check whether your editor lets you turn ligatures off (&lt;code&gt;"editor.fontLigatures": false&lt;/code&gt; in VS Code) for the font you choose.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Does it survive your real size and weight?
&lt;/h2&gt;

&lt;p&gt;Do not judge a font at 20px in a preview. Set it to the size you actually code at — for many people 12–14px — in regular weight, on your actual monitor. Thin strokes that look elegant large can grey out small; bold syntax highlighting can clog if the bold weight is much wider than the regular. Read a dense function, not a pangram. If comments in a muted colour become hard work, the font will tire you long before the code does.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Is the width really fixed — everywhere?
&lt;/h2&gt;

&lt;p&gt;Monospace only helps if every character, including bold and italic variants, advances by the same amount. Misaligned columns in a table, a log file, or an ASCII diagram are often a font problem, not a data problem. Test bold and italic words inside an aligned block: if the columns drift, the font's styled weights are not truly monospaced.&lt;/p&gt;

&lt;h2&gt;
  
  
  A quick way to compare
&lt;/h2&gt;

&lt;p&gt;Do not rely on memory when switching. Put two or three candidates side by side with the same test string, at the same size, and read real code in each for a minute. A &lt;a href="https://www.fonthubs.com/tools/compare" rel="noopener noreferrer"&gt;side-by-side font comparison&lt;/a&gt; makes the confusable characters and the small-size differences much easier to spot than flipping your editor setting back and forth.&lt;/p&gt;

&lt;p&gt;Your code font is the one interface you read all day. Five minutes spent checking confusables, ligatures, real-size rendering, and true fixed width will save you a small misreading every few minutes — and those add up faster than any theme change.&lt;/p&gt;




</description>
      <category>webdev</category>
      <category>typography</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Serving CJK Web Fonts Without Killing Performance: A Practical Guide</title>
      <dc:creator>FontHubs</dc:creator>
      <pubDate>Mon, 09 Nov 2026 02:23:53 +0000</pubDate>
      <link>https://dev.to/fonthubs/serving-cjk-web-fonts-without-killing-performance-a-practical-guide-487c</link>
      <guid>https://dev.to/fonthubs/serving-cjk-web-fonts-without-killing-performance-a-practical-guide-487c</guid>
      <description>&lt;p&gt;If you have ever tried to use a real Chinese, Japanese, or Korean typeface on the web, you already know the problem: a single CJK font file can be 5–15 MB. A Latin font might be 30–80 KB. Ship the CJK file the naive way and your page weight explodes, your Largest Contentful Paint tanks, and visitors on mobile leave before the text even renders.&lt;/p&gt;

&lt;p&gt;The good news is that CJK fonts are very solvable — you just cannot treat them like Latin fonts. Here is the approach that works in production.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why CJK fonts are so large
&lt;/h2&gt;

&lt;p&gt;A Latin font needs a few hundred glyphs. A usable Simplified Chinese font needs 7,000+ common characters, and a full-coverage one can contain 20,000–30,000 glyphs. File size scales with glyph count, so no amount of compression alone will make a full CJK font small. WOFF2 helps (typically 30–40% smaller than TTF), but a 10 MB TTF still becomes a 6–7 MB WOFF2. You have to reduce &lt;em&gt;which glyphs each visitor downloads&lt;/em&gt;, not just compress the file.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Split by unicode-range
&lt;/h2&gt;

&lt;p&gt;The single most effective technique is font slicing: split one large font into 50–100 small subset files, each covering a contiguous unicode-range, and declare them all under one &lt;code&gt;font-family&lt;/code&gt; in CSS.&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;'My CJK'&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/cjk-010.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="py"&gt;unicode-range&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;U&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="m"&gt;4&lt;/span&gt;&lt;span class="n"&gt;E00-4FFF&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;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;'My CJK'&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/cjk-011.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="py"&gt;unicode-range&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;U&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="m"&gt;5000-5&lt;/span&gt;&lt;span class="n"&gt;FFF&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;The browser is smart here: it only downloads the slices that contain characters actually used on the current page. A typical article page might trigger 8–15 slices at 30–60 KB each instead of one 6 MB file. Tools like &lt;code&gt;cn-font-split&lt;/code&gt; and Google Fonts' own text-subsetting pipeline automate the slicing.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Always pair with a strong system fallback stack
&lt;/h2&gt;

&lt;p&gt;Never let CJK text block on a web font. Use &lt;code&gt;font-display: swap&lt;/code&gt; and a fallback stack that looks decent on every platform:&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="nt"&gt;body&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;'My CJK'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;'PingFang SC'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;'Hiragino Sans GB'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;'Microsoft YaHei'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;'Noto Sans SC'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;sans-serif&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;On most Chinese users' devices, PingFang (Apple) or Microsoft YaHei (Windows) will render instantly while the web font slices load in. If the web font never arrives, the page is still perfectly readable — this is progressive enhancement, not failure.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Subset for your actual content when you can
&lt;/h2&gt;

&lt;p&gt;If large parts of your site are static — a landing page headline, a logo lockup, navigation labels — generate a tiny custom subset containing only those characters. A 200-character headline subset is often under 10 KB and can even be inlined as a data URI or preloaded. Reserve the full sliced font for user-generated or long-form content where you cannot predict the characters.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Preload sparingly, cache aggressively
&lt;/h2&gt;

&lt;p&gt;Do not preload a whole CJK font. At most, preload the one or two slices covering your headline characters. For the rest, rely on long-lived caching: font files never change under a given URL, so serve them with &lt;code&gt;Cache-Control: public, max-age=31536000, immutable&lt;/code&gt; and version the filename when you update the typeface. Repeat visits then cost almost zero font bytes.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Check the licence before you split or self-host
&lt;/h2&gt;

&lt;p&gt;Not every free-to-download font is free to subset, modify, or self-host. Open licences like SIL Open Font License 1.1 generally allow subsetting and web embedding, but some freeware licences restrict redistribution of modified files — and a sliced font &lt;em&gt;is&lt;/em&gt; a redistributed modified file. Before you ship, read the licence for modification and embedding clauses. If you are browsing downloadable Chinese fonts on a library like &lt;a href="https://fonthubs.com" rel="noopener noreferrer"&gt;FontHubs&lt;/a&gt;, check each family's licence field first, and prefer OFL-licensed families for sliced self-hosting.&lt;/p&gt;

&lt;h2&gt;
  
  
  A quick checklist
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Convert to WOFF2, then slice by unicode-range — compression alone is not enough&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;font-display: swap&lt;/code&gt; plus a native CJK fallback stack&lt;/li&gt;
&lt;li&gt;Subset static headlines down to the exact characters used&lt;/li&gt;
&lt;li&gt;Preload at most 1–2 slices; cache font files immutably for a year&lt;/li&gt;
&lt;li&gt;Verify the licence allows subsetting and self-hosting&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Done this way, a site can offer a distinctive CJK typeface at a real cost of a few hundred kilobytes per page — comparable to a hero image — instead of a multi-megabyte penalty. The typeface stops being a performance excuse and becomes a design choice you can actually afford.&lt;/p&gt;

</description>
      <category>css</category>
      <category>frontend</category>
      <category>performance</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Readability First: How to Pick Fonts People Can Actually Read</title>
      <dc:creator>FontHubs</dc:creator>
      <pubDate>Wed, 04 Nov 2026 22:52:19 +0000</pubDate>
      <link>https://dev.to/fonthubs/readability-first-how-to-pick-fonts-people-can-actually-read-4c76</link>
      <guid>https://dev.to/fonthubs/readability-first-how-to-pick-fonts-people-can-actually-read-4c76</guid>
      <description>&lt;p&gt;A beautiful typeface that nobody can read comfortably is a failed typeface. When you pick fonts for a website, an app, or a document, readability is not the boring constraint — it is the whole job. Here is a practical checklist I use before committing to a font.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Look at the x-height, not just the style
&lt;/h2&gt;

&lt;p&gt;Two fonts set at the same 16px can look like completely different sizes. The reason is x-height: the height of lowercase letters like &lt;code&gt;a&lt;/code&gt;, &lt;code&gt;e&lt;/code&gt;, and &lt;code&gt;x&lt;/code&gt;. Fonts with a generous x-height look larger and stay legible at small sizes, which is why they dominate body text on the web. When comparing candidates, set them at the same size and read a paragraph of real text, not just the alphabet. If you have to squint, the font is telling you something.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Check the characters people actually confuse
&lt;/h2&gt;

&lt;p&gt;Readability breaks down on specific letters: capital &lt;code&gt;I&lt;/code&gt;, lowercase &lt;code&gt;l&lt;/code&gt;, and the digit &lt;code&gt;1&lt;/code&gt;; &lt;code&gt;0&lt;/code&gt; versus &lt;code&gt;O&lt;/code&gt;; &lt;code&gt;rn&lt;/code&gt; that reads as &lt;code&gt;m&lt;/code&gt;. Open apertures (the openings in &lt;code&gt;c&lt;/code&gt;, &lt;code&gt;e&lt;/code&gt;, and &lt;code&gt;a&lt;/code&gt;) also help letters stay distinct at small sizes. A quick test: type "Il1 O0 rn" in the candidate font at 14px. If you cannot tell them apart instantly, your readers will struggle in passwords, codes, and data tables.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Size, line height, and line length do more than the font itself
&lt;/h2&gt;

&lt;p&gt;Even the most readable typeface fails in a bad layout. As a starting point:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Body text at 16–18px, never below 14px for long-form reading.&lt;/li&gt;
&lt;li&gt;Line height around 1.5–1.7, so lines do not crowd each other.&lt;/li&gt;
&lt;li&gt;Line length around 45–75 characters, so the eye can find the next line without effort.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These three settings are free, and they often improve readability more than swapping fonts.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Contrast is part of typography
&lt;/h2&gt;

&lt;p&gt;Light gray text on a white background might look elegant in a design mockup, but it is hard work for real eyes — especially on mobile in sunlight, and for readers with low vision. Aim for a contrast ratio of at least 4.5:1 for body text, and reserve low-contrast treatments for large headings or decorative elements that nobody needs to read to use the page.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Be careful with all-caps and long italics
&lt;/h2&gt;

&lt;p&gt;All-caps text removes the word shapes our eyes use to recognize words quickly, so it reads measurably slower. It works for short labels and headings; it punishes paragraphs. Long passages in italic have a similar cost, particularly on screens. Use both sparingly, and never for instructions or error messages that people read under stress.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Test at the smallest size you will actually ship
&lt;/h2&gt;

&lt;p&gt;Designers usually judge fonts at large display sizes, but readers meet them at 14px on a phone. Before you decide, preview the font at your real body size, in a real paragraph, on a real device. Check bold and regular weights separately — some fonts have a beautiful regular weight and a bold weight that turns to mush.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. One font for reading, one for personality
&lt;/h2&gt;

&lt;p&gt;You do not need five fonts to have character. A reliable pattern: one highly legible font for body text, and one more expressive font for headings. Keep the body font boring in the best sense — open, even, and quiet — and let the headings carry the mood.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try before you commit
&lt;/h2&gt;

&lt;p&gt;The fastest way to apply all of this is to preview candidates side by side in real paragraphs at your real sizes, instead of judging them from their specimen posters. You can browse and preview thousands of open fonts in the FontHubs font library (&lt;a href="https://www.fonthubs.com/fonts" rel="noopener noreferrer"&gt;https://www.fonthubs.com/fonts&lt;/a&gt;) and check each one at small sizes before you download anything.&lt;/p&gt;

&lt;p&gt;Good typography is invisible in the best way: readers forget about the font entirely and just keep reading. That is the test worth passing.&lt;/p&gt;

</description>
      <category>fonts</category>
      <category>typography</category>
      <category>webdev</category>
      <category>a11y</category>
    </item>
    <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>
