<?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: BM lm</title>
    <description>The latest articles on DEV Community by BM lm (@bm_lm_a5b33702d6aa3271c49).</description>
    <link>https://dev.to/bm_lm_a5b33702d6aa3271c49</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%2F4226480%2F04fd0530-03e5-430d-bcf4-ec29903f965a.jpg</url>
      <title>DEV Community: BM lm</title>
      <link>https://dev.to/bm_lm_a5b33702d6aa3271c49</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/bm_lm_a5b33702d6aa3271c49"/>
    <language>en</language>
    <item>
      <title>How font identification actually works (and why two fonts look identical)</title>
      <dc:creator>BM lm</dc:creator>
      <pubDate>Mon, 30 Nov 2026 07:15:04 +0000</pubDate>
      <link>https://dev.to/bm_lm_a5b33702d6aa3271c49/how-font-identification-actually-works-and-why-two-fonts-look-identical-1bdf</link>
      <guid>https://dev.to/bm_lm_a5b33702d6aa3271c49/how-font-identification-actually-works-and-why-two-fonts-look-identical-1bdf</guid>
      <description>&lt;p&gt;You see a font in a screenshot, a poster, a menu, and you need to know what it is. Most guides tell you to "just upload the image", which hides the interesting part: the hard problems are not detection, they are the near-duplicates.&lt;/p&gt;

&lt;p&gt;I have been building &lt;a href="https://typeye.com" rel="noopener noreferrer"&gt;Typeye&lt;/a&gt; for that exact job, so here is the honest engineering picture.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Cropping matters more than the model&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A whole page photo gives you inconsistent letter heights, perspective skew, and background noise. A tight crop of one word in a consistent weight is worth far more than a fancy classifier, because the classifier is comparing shapes and anything that changes the shape hurts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Skeleton beats pixels&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The useful step is thinning strokes down to a skeleton and describing each glyph by junctions and terminals: does the lowercase 'a' have a spur, is the 't' topped flat or angled, does the 'g' close. Those features survive scaling, anti-aliasing and JPEG mush. Raw pixel distance does not.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. The real problem is clones&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Half the fonts on a typical page are clones of something older: Nimbus Sans against Helvetica, Liberation Sans against Arial, dozens of neo-grotesques against the original Akzidenz. A correct answer is often "this is X, but it could equally be these four rebadged copies", and a tool that returns a single confident name is lying to you slightly. Showing a short family of visually indistinguishable candidates is more useful.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Licensing is the part nobody mentions&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Identifying a font and legally using it are different questions. Free lookalikes are usually OFL and safe; the commercial original often is not, and people find that out after they have shipped a logo.&lt;/p&gt;

&lt;p&gt;So my rule of thumb: crop tight, compare skeletons, expect a family of answers, then check the license before you ship.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>design</category>
      <category>softwaredevelopment</category>
    </item>
    <item>
      <title>I built a free interactive GTA 6 map with 6,600+ locations - here is what mapping Vice City taught me</title>
      <dc:creator>BM lm</dc:creator>
      <pubDate>Mon, 30 Nov 2026 04:00:11 +0000</pubDate>
      <link>https://dev.to/bm_lm_a5b33702d6aa3271c49/i-built-a-free-interactive-gta-6-map-with-6600-locations-here-is-what-mapping-vice-city-taught-54ig</link>
      <guid>https://dev.to/bm_lm_a5b33702d6aa3271c49/i-built-a-free-interactive-gta-6-map-with-6600-locations-here-is-what-mapping-vice-city-taught-54ig</guid>
      <description>&lt;p&gt;When GTA 6 finally shipped, the first thing I wanted was a proper map. Not a static image - something searchable, where you could filter by type and keep track of what you had already found. The official resources were scattered, so I ended up building the thing I wanted to exist.&lt;/p&gt;

&lt;h2&gt;
  
  
  The data problem
&lt;/h2&gt;

&lt;p&gt;The hardest part was not the map tiles. It was the places themselves. I ended up consolidating over 6,600 locations across 39 categories: missions, collectibles, shops, activities, landmarks. Every entry needed coordinates, a category, and a name that actually matches what players call it. Cleaning that data took way longer than writing the code.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the map does
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Search across all 6,600+ places by name or keyword&lt;/li&gt;
&lt;li&gt;Filter by any of the 39 categories&lt;/li&gt;
&lt;li&gt;Mark places as found - progress is stored locally, no account needed&lt;/li&gt;
&lt;li&gt;Share any view with a link: the filters and position live in the URL&lt;/li&gt;
&lt;li&gt;Works on mobile, no download, nothing to install&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Things I learned
&lt;/h2&gt;

&lt;p&gt;Rendering thousands of markers will melt a browser tab if you are careless. Viewport-based rendering and clustering were not optional. Also: URL state is underrated. Being able to send someone a link that shows exactly what you are looking at turns the map from a toy into something communities actually pass around.&lt;/p&gt;

&lt;p&gt;The whole thing is free, no account required: &lt;a href="https://trovepin.com" rel="noopener noreferrer"&gt;Trovepin - interactive GTA 6 map&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you are playing through Leonida right now and something is missing from the map, that feedback is exactly what I need. Happy building, fellow map nerds.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>sideprojects</category>
      <category>webdev</category>
    </item>
    <item>
      <title>letter-spacing and word-spacing: the CSS properties doing optical work</title>
      <dc:creator>BM lm</dc:creator>
      <pubDate>Tue, 10 Nov 2026 16:09:58 +0000</pubDate>
      <link>https://dev.to/bm_lm_a5b33702d6aa3271c49/letter-spacing-and-word-spacing-the-css-properties-doing-optical-work-48i7</link>
      <guid>https://dev.to/bm_lm_a5b33702d6aa3271c49/letter-spacing-and-word-spacing-the-css-properties-doing-optical-work-48i7</guid>
      <description>&lt;p&gt;letter-spacing and word-spacing: the CSS properties doing optical work&lt;/p&gt;

&lt;p&gt;Two properties control spacing between characters and words, and they are the difference between a headline that whispers and one that shouts. The rules by size:&lt;/p&gt;

&lt;h2&gt;
  
  
  The size-spacing inverse law
&lt;/h2&gt;

&lt;p&gt;As type gets bigger, tracking gets tighter (large letters need less space to read as separate); as it gets smaller, tracking opens. The scale:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Display (48px+): -0.02em to -0.03em&lt;/li&gt;
&lt;li&gt;Headings (24-48px): -0.01em to -0.02em&lt;/li&gt;
&lt;li&gt;Body: 0 (the font is designed for its body size)&lt;/li&gt;
&lt;li&gt;Small caps/overline labels: +0.05em to +0.1em (uppercase letters especially need air)&lt;/li&gt;
&lt;li&gt;Micro text (under 10px): +0.01em to +0.03em&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Em units, always: &lt;code&gt;letter-spacing: -0.02em&lt;/code&gt; scales with the font-size, staying proportional. Px letter-spacing breaks the moment the size changes - the classic design-token bug.&lt;/p&gt;

&lt;h2&gt;
  
  
  Uppercase demands tracking
&lt;/h2&gt;

&lt;p&gt;All-caps text reads ~10% slower than mixed case (no ascender/descender shapes) and needs +0.05em or more. Buttons, nav labels, overlines, and badge text in caps without tracking is the most common spacing sin in product UI. If the button label is uppercase and the letter-spacing is 0, the design system has a bug.&lt;/p&gt;

&lt;h2&gt;
  
  
  word-spacing: the paragraph setter
&lt;/h2&gt;

&lt;p&gt;For justified text, &lt;code&gt;word-spacing&lt;/code&gt; adjustments fix rivers (those accidental white channels). Combined with hyphens: auto, moderate word-spacing variance produces even color without the gaps justification leaves.&lt;/p&gt;

&lt;h2&gt;
  
  
  Negative tracking has a floor
&lt;/h2&gt;

&lt;p&gt;Below -0.04em, letters collide and reading speed collapses - the tight-display look has a hard limit. If the design wants tighter than that, the typeface is wrong (some display faces are drawn tight; tracking a body face to look like one never works).&lt;/p&gt;

&lt;h2&gt;
  
  
  The verification habit
&lt;/h2&gt;

&lt;p&gt;Spacing bugs interact with font substitutions: a fallback font has different built-in sidebearings, so your tuned -0.02em becomes -0.05em-equivalent overnight. When spacing looks suddenly wrong on a live page, identify what is actually rendering: screenshot and check on-device - &lt;a href="https://typeye.com" rel="noopener noreferrer"&gt;Typeye&lt;/a&gt; names the real typeface locally (&lt;a href="https://typeye.com" rel="noopener noreferrer"&gt;typeye.com&lt;/a&gt;) - then re-tune.&lt;/p&gt;

&lt;p&gt;letter-spacing is the cheapest optical polish in CSS: one em-based token per size step, and the whole product reads more deliberately.&lt;/p&gt;

</description>
      <category>css</category>
      <category>design</category>
      <category>frontend</category>
      <category>typography</category>
    </item>
    <item>
      <title>Chart typography: axis labels, annotations, and the 8px crime scene</title>
      <dc:creator>BM lm</dc:creator>
      <pubDate>Tue, 10 Nov 2026 16:07:27 +0000</pubDate>
      <link>https://dev.to/bm_lm_a5b33702d6aa3271c49/chart-typography-axis-labels-annotations-and-the-8px-crime-scene-4edf</link>
      <guid>https://dev.to/bm_lm_a5b33702d6aa3271c49/chart-typography-axis-labels-annotations-and-the-8px-crime-scene-4edf</guid>
      <description>&lt;p&gt;Chart typography: axis labels, annotations, and the 8px crime scene&lt;/p&gt;

&lt;p&gt;Charts are typography under constraints: every pixel of text competes with data for attention. Most chart libraries default to typography that fails those constraints. The rules:&lt;/p&gt;

&lt;h2&gt;
  
  
  Axis labels: the 10-11px band
&lt;/h2&gt;

&lt;p&gt;Axis labels want 10-11px - smaller than body text (they are reference material) but never below 10 (below that, numerals misread: 8s look like 6s at 8px). Tick labels in tabular figures so the axis column aligns. Rotate only as a last resort - rotated labels cost 20% of reading speed.&lt;/p&gt;

&lt;h2&gt;
  
  
  The chart title is a sentence
&lt;/h2&gt;

&lt;p&gt;"Sales by region" is a title. "Sales grew 23% in EMEA, led by Germany" is a takeaway - and takeaway titles measurably outperform topic titles in comprehension studies. The type treatment: same size as section headings, no bold-scream, one line.&lt;/p&gt;

&lt;h2&gt;
  
  
  Annotations outrank data ink
&lt;/h2&gt;

&lt;p&gt;The callout explaining the spike is why the chart exists. Type hierarchy: annotation text 12-13px with a clear link line to the data point; the annotation is the ONLY element allowed to interrupt the data area. Number your annotations when there are multiple (readers scan 1, 2, 3 in order).&lt;/p&gt;

&lt;h2&gt;
  
  
  Legends vs direct labeling
&lt;/h2&gt;

&lt;p&gt;Direct labeling (text next to each line) beats legends whenever lines are few enough (&amp;lt;6). Direct labels are typography doing data work; legends force color-matching, a task humans are bad at under time pressure. If a legend is unavoidable: order it to match the visual stacking order, or mapping errors double.&lt;/p&gt;

&lt;h2&gt;
  
  
  Fonts for charts
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;One family, usually the UI sans - charts inherit the page's type system.&lt;/li&gt;
&lt;li&gt;Tabular figures for any numeric column or axis.&lt;/li&gt;
&lt;li&gt;Avoid condensed faces for tick labels (numeral legibility dies); condensed works for category labels.&lt;/li&gt;
&lt;li&gt;When the chart library silently ships its own font (many embed one), the chart looks off-brand in a way nobody can name. Identify what the chart actually renders: screenshot it and check on-device - &lt;a href="https://typeye.com" rel="noopener noreferrer"&gt;Typeye&lt;/a&gt; names the embedded typeface locally (&lt;a href="https://typeye.com" rel="noopener noreferrer"&gt;typeye.com&lt;/a&gt;), no data leaving the machine.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The dashboard-scale problem
&lt;/h2&gt;

&lt;p&gt;A dashboard is 9 charts competing for attention. Typography is the arbiter: chart titles at one consistent size, takeaway subtitles below them, axes identical everywhere. The charts that break the type grid draw the eye - which is exactly the tool for emphasis, and exactly the accident when inconsistent.&lt;/p&gt;

&lt;p&gt;Chart typography is data accessibility. Ten deliberate decisions separate a chart people trust from a chart people squint at.&lt;/p&gt;

</description>
      <category>data</category>
      <category>design</category>
      <category>frontend</category>
    </item>
    <item>
      <title>Vertical rhythm without the religion: the pragmatic baseline</title>
      <dc:creator>BM lm</dc:creator>
      <pubDate>Tue, 10 Nov 2026 16:03:05 +0000</pubDate>
      <link>https://dev.to/bm_lm_a5b33702d6aa3271c49/vertical-rhythm-without-the-religion-the-pragmatic-baseline-1a9c</link>
      <guid>https://dev.to/bm_lm_a5b33702d6aa3271c49/vertical-rhythm-without-the-religion-the-pragmatic-baseline-1a9c</guid>
      <description>&lt;p&gt;Vertical rhythm: the baseline grid debate, settled pragmatically&lt;/p&gt;

&lt;p&gt;Print designers hand-align text to a baseline grid; web teams argue about whether to bother. Here is the pragmatic version that keeps the benefits without the ritual.&lt;/p&gt;

&lt;h2&gt;
  
  
  What rhythm actually buys
&lt;/h2&gt;

&lt;p&gt;Consistent vertical spacing makes pages feel composed instead of assembled. The mechanism: every vertical dimension (line-height, margins, paddings) is a multiple of a base unit (traditionally the body line-height). Eyes detect the regularity as "this looks designed."&lt;/p&gt;

&lt;h2&gt;
  
  
  The strict-grid era and why it died
&lt;/h2&gt;

&lt;p&gt;Perfect baseline alignment (every line of every paragraph on the same invisible grid) requires the old hacks: fixed line-heights everywhere, &lt;code&gt;line-height: 24px&lt;/code&gt; with 12px bodies, translation hacks to snap headings. The cost: rem units broke, user font-size preferences broke, and maintenance was misery. Strict grids died because they fought the platform.&lt;/p&gt;

&lt;h2&gt;
  
  
  The pragmatic rhythm that survived
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Pick a base unit from the type scale (e.g., 4px or the body line-height).&lt;/li&gt;
&lt;li&gt;Make all spacing tokens multiples of it - which your design tokens should be anyway (4px scale).&lt;/li&gt;
&lt;li&gt;Match line-height to the scale: body 24px = 6 units; h2 32px line-height = 8 units.&lt;/li&gt;
&lt;li&gt;Margins between blocks: multiples of the unit, with a deliberate jump (paragraph = 1 unit, section = 2-3 units).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Result: 90% of the visual benefit, none of the hacks. When someone proposes pixel-perfect baseline alignment in 2026, ask how they handle dynamic content and user zoom.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where rhythm visibly breaks
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Mixed components: a card's internal spacing not on the scale makes the whole grid feel off&lt;/li&gt;
&lt;li&gt;Line-height as a unit: &lt;code&gt;margin: 1.5&lt;/code&gt; (unitless line-height as margin) is a category error that quietly accumulates drift&lt;/li&gt;
&lt;li&gt;Localization: German and Japanese text reflow differently; strict vertical positions break while unit-based spacing survives&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The verification habit
&lt;/h2&gt;

&lt;p&gt;Rhythm bugs are visible in screenshots: sections that "almost" align. Typography audits catch a related silent failure here - when the rendered font differs from the token (a substitution changes metrics), every computed rhythm shifts slightly. Verify what renders: on-device screenshot identification (&lt;a href="https://typeye.com" rel="noopener noreferrer"&gt;Typeye&lt;/a&gt; - runs fully local) names the actual typeface in seconds.&lt;/p&gt;

&lt;p&gt;Rhythm is a token discipline now, not a grid ritual. Put the scale in the tokens and the spacing multiples follow for free.&lt;/p&gt;

</description>
      <category>css</category>
      <category>design</category>
      <category>frontend</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Debugging the font loading waterfall in DevTools: a field guide</title>
      <dc:creator>BM lm</dc:creator>
      <pubDate>Tue, 10 Nov 2026 16:00:09 +0000</pubDate>
      <link>https://dev.to/bm_lm_a5b33702d6aa3271c49/debugging-the-font-loading-waterfall-in-devtools-a-field-guide-3nmp</link>
      <guid>https://dev.to/bm_lm_a5b33702d6aa3271c49/debugging-the-font-loading-waterfall-in-devtools-a-field-guide-3nmp</guid>
      <description>&lt;p&gt;Fonts are the asset class with the worst loading story: requested late, discovered by CSS, blocking rendering invisibly. DevTools exposes the whole story - here is how to read it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The discovery chain (why fonts load late)
&lt;/h2&gt;

&lt;p&gt;HTML → CSS → parsed @font-face src → font download. The font request cannot START until the browser downloads AND parses the stylesheet that references it. A font behind a third CSS redirect can lose 3+ round trips. This is why preload exists:&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="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"preload"&lt;/span&gt; &lt;span class="na"&gt;href&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"/fonts/primary.woff2"&lt;/span&gt; &lt;span class="na"&gt;as&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"font"&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&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;(crossorigin is required even for same-origin fonts - without it, the preload is fetched twice and you made things worse.)&lt;/p&gt;

&lt;h2&gt;
  
  
  Reading the Network panel
&lt;/h2&gt;

&lt;p&gt;Filter to Font: check four columns.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Started at&lt;/strong&gt;: should be alongside the CSS request (preloaded) or after DOM ready (not preloaded).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Size / Time&lt;/strong&gt;: a 300KB font at 2G speed is 4+ seconds; subset to 15-30KB.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Priority&lt;/strong&gt;: High for preloaded, Low for discovery-loaded. Low = you lost the race.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Status&lt;/strong&gt;: a font request 404ing silently = substitution. No console error; the page just renders a different typeface.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The rendering verification
&lt;/h2&gt;

&lt;p&gt;Network says the right file loaded - but is the right font RENDERING? Font stacks fall through silently. DevTools' Computed → Rendered fonts shows what the browser actually used per element (Chrome calls this section out directly). If it shows Arial where your brand font should be, the stack fell through despite a 200 response - usually a format mismatch or unicode-range miss.&lt;/p&gt;

&lt;p&gt;Cross-checking screenshots is the portable version: capture the rendered page and identify the typeface on-device (&lt;a href="https://typeye.com" rel="noopener noreferrer"&gt;Typeye&lt;/a&gt; does it locally from a screenshot) - useful for production pages you can only view, not inspect.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Performance panel check
&lt;/h2&gt;

&lt;p&gt;Record a load: the font swap appears as a Layout Shift event (FOUT without size-adjust) or invisible text gap (font-display: block). Both traceable to the exact font - which makes the fix mechanical: preload the offending file and tune its fallback metrics.&lt;/p&gt;

&lt;p&gt;Ten minutes in DevTools answers: which fonts, what priority, what actually rendered, what shifted. Every font problem has a receipt in there.&lt;/p&gt;

</description>
      <category>css</category>
      <category>debugging</category>
      <category>frontend</category>
      <category>performance</category>
    </item>
    <item>
      <title>Fluid typography with clamp(): one line instead of six breakpoints</title>
      <dc:creator>BM lm</dc:creator>
      <pubDate>Tue, 10 Nov 2026 15:57:56 +0000</pubDate>
      <link>https://dev.to/bm_lm_a5b33702d6aa3271c49/fluid-typography-with-clamp-one-line-instead-of-six-breakpoints-5f9c</link>
      <guid>https://dev.to/bm_lm_a5b33702d6aa3271c49/fluid-typography-with-clamp-one-line-instead-of-six-breakpoints-5f9c</guid>
      <description>&lt;p&gt;Media-query typography means a hero is 48px on desktop, 36px on tablet, 28px on mobile - three rules, two jumps, and every tablet size in between gets a compromise. &lt;code&gt;clamp()&lt;/code&gt; replaces all of it with one line.&lt;/p&gt;

&lt;h2&gt;
  
  
  The syntax
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;h1&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;clamp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2rem&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;1.5rem&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mf"&gt;2.5vw&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;3.5rem&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="cm"&gt;/* min 32px, fluid middle, max 56px */&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;clamp(min, preferred, max)&lt;/code&gt;. The middle value is what makes it work: &lt;code&gt;1.5rem + 2.5vw&lt;/code&gt; scales with the viewport but never below 32px or above 56px. Between breakpoints, EVERY viewport width gets an appropriate size - not just the three you wrote queries for.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why the rem+vw combo matters
&lt;/h2&gt;

&lt;p&gt;Pure &lt;code&gt;5vw&lt;/code&gt; scales infinitely: on a 4K monitor your hero is 190px. The &lt;code&gt;Xrem + Yvw&lt;/code&gt; form sets the fluid slope (Yvw) and shifts where it starts (Xrem). The math for a target: if you want 32px at 375px viewport and 56px at 1440px:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;slope = (56 - 32) / (1440 - 375) = 0.0225 → 2.25vw
intercept = 32 - 2.25 * 375 / 100 = 23.6 → use rem for it
font-size: clamp(2rem, 1.475rem + 2.25vw, 3.5rem);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;(min = max = the 32/56 targets; the fluid middle hits both exactly.)&lt;/p&gt;

&lt;h2&gt;
  
  
  The accessibility check that most implementations fail
&lt;/h2&gt;

&lt;p&gt;vw-based sizes ignore user font-size preferences. If a user sets their browser default to 24px, vw sizes stay fixed. The fix: keep the rem component meaningful and cap the max at a size that respects the user's base (&lt;code&gt;calc()&lt;/code&gt; with rem keeps preference-awareness). Utopia.fyi's fluid calculator bakes this in - use it instead of hand-rolling the math.&lt;/p&gt;

&lt;h2&gt;
  
  
  The debugging reality
&lt;/h2&gt;

&lt;p&gt;Fluid type changes size at every scroll-resize, which means layout bugs surface at odd viewport widths nobody tested. The classic one: the font renders differently than the token says because a fallback substituted somewhere in the stack. Screenshot at the broken width and identify what actually rendered - &lt;a href="https://typeye.com" rel="noopener noreferrer"&gt;Typeye&lt;/a&gt; names the typeface from the screenshot, entirely on-device.&lt;/p&gt;

&lt;p&gt;Fluid type is the rare technique that is BOTH less code and better results. Convert one heading scale and the rest follows.&lt;/p&gt;

</description>
      <category>css</category>
      <category>frontend</category>
      <category>webdev</category>
    </item>
    <item>
      <title>font-feature-settings: your fonts ship features you're not using</title>
      <dc:creator>BM lm</dc:creator>
      <pubDate>Tue, 10 Nov 2026 15:55:37 +0000</pubDate>
      <link>https://dev.to/bm_lm_a5b33702d6aa3271c49/font-feature-settings-your-fonts-ship-features-youre-not-using-4f1p</link>
      <guid>https://dev.to/bm_lm_a5b33702d6aa3271c49/font-feature-settings-your-fonts-ship-features-youre-not-using-4f1p</guid>
      <description>&lt;p&gt;Modern fonts are software packages. They ship alternate glyphs, number styles, ligature sets, and small caps - all switched on with one CSS property that almost nobody uses.&lt;/p&gt;

&lt;h2&gt;
  
  
  The property and the syntax
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.fancy&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;font-feature-settings&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'ss01'&lt;/span&gt; &lt;span class="n"&gt;on&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'tnum'&lt;/span&gt; &lt;span class="n"&gt;on&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="cm"&gt;/* stylistic set 1 + tabular numerals */&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Four-character OpenType feature tags, comma-separated. Prefer the high-level properties where they exist (&lt;code&gt;font-variant-numeric: tabular-nums&lt;/code&gt; beats &lt;code&gt;'tnum' on&lt;/code&gt;), but the full feature set only opens through this property.&lt;/p&gt;

&lt;h2&gt;
  
  
  The features worth knowing
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;'tnum'&lt;/code&gt; - tabular figures (data tables, see every dashboard argument ever)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;'lnum'&lt;/code&gt; - lining figures; &lt;code&gt;'onum'&lt;/code&gt; - oldstyle figures (book typography)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;'ss01'&lt;/code&gt;-&lt;code&gt;'ss20'&lt;/code&gt; - stylistic sets (alternate a, g, and ampersand designs)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;'salt'&lt;/code&gt; - the single stylistic alternate&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;'dlig'&lt;/code&gt; - discretionary ligatures (fancy combos beyond the standard fi/fl)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;'case'&lt;/code&gt; - case-sensitive forms (punctuation that aligns with caps)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;'zero'&lt;/code&gt; - slashed zero (data contexts)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Discovering what your font actually ships
&lt;/h2&gt;

&lt;p&gt;Feature lists live in the font file and in foundry spec sheets. Tools like fontdrop.info visualize them; the foundry's specimen page usually demos them. This is also where audits get interesting: if a design references an alternate glyph but production shows the default, either the feature is off or - more commonly - the font rendering is not what the CSS says. Verify first: screenshot and identify on-device (&lt;a href="https://typeye.com" rel="noopener noreferrer"&gt;Typeye&lt;/a&gt; names the rendered typeface locally, so you know whether you are toggling features on the right font at all).&lt;/p&gt;

&lt;h2&gt;
  
  
  The practical starter kit
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nt"&gt;root&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;font-feature-settings&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'kern'&lt;/span&gt; &lt;span class="n"&gt;on&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'liga'&lt;/span&gt; &lt;span class="n"&gt;on&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="cm"&gt;/* usually defaults, be explicit */&lt;/span&gt;
&lt;span class="nc"&gt;.data-table&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;font-variant-numeric&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;tabular-nums&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.brand-mark&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;font-feature-settings&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'ss01'&lt;/span&gt; &lt;span class="n"&gt;on&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="cm"&gt;/* if your brand font has a signature set */&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check your brand font's spec sheet once. If it ships a distinctive stylistic set, you have free brand differentiation sitting unused in the file you already pay for.&lt;/p&gt;

</description>
      <category>css</category>
      <category>frontend</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Google Fonts vs self-hosting: the decision matrix nobody writes down</title>
      <dc:creator>BM lm</dc:creator>
      <pubDate>Tue, 10 Nov 2026 15:53:12 +0000</pubDate>
      <link>https://dev.to/bm_lm_a5b33702d6aa3271c49/google-fonts-vs-self-hosting-the-decision-matrix-nobody-writes-down-4bf9</link>
      <guid>https://dev.to/bm_lm_a5b33702d6aa3271c49/google-fonts-vs-self-hosting-the-decision-matrix-nobody-writes-down-4bf9</guid>
      <description>&lt;p&gt;The default is copying a Google Fonts &lt;code&gt;&amp;lt;link&amp;gt;&lt;/code&gt; tag and moving on. Sometimes that is right. Here is the actual decision matrix.&lt;/p&gt;

&lt;h2&gt;
  
  
  Google Fonts CDN: when it wins
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Cache hit probability.&lt;/strong&gt; fonts.gstatic.com is shared across millions of sites. If your visitor already visited ANY site using Inter via Google, it's cached. Self-hosted Inter on your site has a cold cache for every first visit.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero maintenance.&lt;/strong&gt; Subsets, unicode-range splitting, and version updates are handled for you.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prototypes and content sites&lt;/strong&gt; where a 50-100ms font fetch is irrelevant.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Self-hosting: when it wins
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GDPR.&lt;/strong&gt; German courts (the 2022 Munich ruling) have held that loading Google Fonts from Google's CDN transfers IP data without consent. EU-audience sites increasingly self-host for compliance alone.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Subsetting control.&lt;/strong&gt; You ship only the glyphs you use (pyftsubset or tools like next/font handle this automatically).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reliability.&lt;/strong&gt; Your font availability is coupled to your infrastructure only.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The third-party tax.&lt;/strong&gt; Every external origin adds DNS + TLS setup to the critical path.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The hybrid that usually wins
&lt;/h2&gt;

&lt;p&gt;Self-host + preload the primary weight:&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="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"preload"&lt;/span&gt; &lt;span class="na"&gt;href&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"/fonts/inter-400.woff2"&lt;/span&gt; &lt;span class="na"&gt;as&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"font"&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&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;plus &lt;code&gt;font-display: swap&lt;/code&gt; with tuned fallback metrics. You lose the shared cache, gain compliance and control - and a properly subset woff2 is often 15-30KB, smaller than the multi-range split Google serves.&lt;/p&gt;

&lt;h2&gt;
  
  
  The audit step
&lt;/h2&gt;

&lt;p&gt;Whatever you choose, verify what actually renders in production: font stacks with fallbacks mean substitutions happen silently when files 404 or licenses lapse. Screenshot and identify on-device - &lt;a href="https://typeye.com" rel="noopener noreferrer"&gt;Typeye&lt;/a&gt; names the rendered typeface from a screenshot entirely locally, so you can audit production pages without uploading anything.&lt;/p&gt;

&lt;h2&gt;
  
  
  The one-line answer
&lt;/h2&gt;

&lt;p&gt;EU audience or performance-critical app: self-host. Prototype or content blog: Google Fonts CDN is fine. Anything in between: self-host anyway, it's 20 minutes of work and one less external dependency.&lt;/p&gt;

</description>
      <category>css</category>
      <category>performance</category>
      <category>privacy</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Choosing a monospace font that doesn't hurt: ligatures, slashed zero, and the 1 vs l test</title>
      <dc:creator>BM lm</dc:creator>
      <pubDate>Tue, 10 Nov 2026 15:50:49 +0000</pubDate>
      <link>https://dev.to/bm_lm_a5b33702d6aa3271c49/choosing-a-monospace-font-that-doesnt-hurt-ligatures-slashed-zero-and-the-1-vs-l-test-9ch</link>
      <guid>https://dev.to/bm_lm_a5b33702d6aa3271c49/choosing-a-monospace-font-that-doesnt-hurt-ligatures-slashed-zero-and-the-1-vs-l-test-9ch</guid>
      <description>&lt;p&gt;You will look at your terminal font for thousands of hours this year. Most people use whatever the default is. Ten minutes of deliberate choice fixes that.&lt;/p&gt;

&lt;h2&gt;
  
  
  The discrimination tests
&lt;/h2&gt;

&lt;p&gt;Type these strings and check if you can tell them apart instantly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;l1I|  (lowercase L, one, capital i, pipe)
0O  (zero, capital O)
rn vs m  (in some fonts rn looks like m at small sizes)
;:  (semicolon, colon)
{}[]()  (bracket sanity)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If &lt;code&gt;l1I&lt;/code&gt; reads as four identical sticks, the font fails for code. Slashed or dotted zero is non-negotiable for configs and data work.&lt;/p&gt;

&lt;h2&gt;
  
  
  Ligatures: the great divider
&lt;/h2&gt;

&lt;p&gt;Programming ligatures render &lt;code&gt;!=&lt;/code&gt; as ≠, &lt;code&gt;=&amp;gt;&lt;/code&gt; as ⇒. Fans swear by them; opponents argue the glyphs lie about the characters underneath (searching for &lt;code&gt;!=&lt;/code&gt; in a ligature-rendered file is confusing).&lt;/p&gt;

&lt;p&gt;My take: ligatures on for terminal/editor, off for code shown in screenshots and docs (the audience may need to transcribe it). Fonts like JetBrains Mono have ligatures; Fira Code was the popularizer; Cascadia Code ships with them.&lt;/p&gt;

&lt;h2&gt;
  
  
  The rendering stack nobody thinks about
&lt;/h2&gt;

&lt;p&gt;Terminal font quality = font × terminal emulator × rendering engine (CoreText/DirectWrite/FreeType). The same font can look crisp in one emulator and muddy in another (hinting interpretation differs). Judge fonts in YOUR terminal, not in comparison screenshots.&lt;/p&gt;

&lt;h2&gt;
  
  
  When code appears in web UIs
&lt;/h2&gt;

&lt;p&gt;The same discipline applies to code blocks in docs and dashboards: &lt;code&gt;font-family: ui-monospace, 'JetBrains Mono', monospace&lt;/code&gt; covers native contexts with a web fallback. And when a rendered UI's "monospace" block shows something suspiciously proportional, identify what's actually rendering - screenshot through an on-device identifier like &lt;a href="https://typeye.com" rel="noopener noreferrer"&gt;Typeye&lt;/a&gt; and the CSS cascade lie is exposed instantly.&lt;/p&gt;

&lt;h2&gt;
  
  
  The shortlist
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;JetBrains Mono - tall x-height, excellent readability, ligatures&lt;/li&gt;
&lt;li&gt;Fira Code - the ligature classic&lt;/li&gt;
&lt;li&gt;Cascadia Code - Windows Terminal default, great hinting&lt;/li&gt;
&lt;li&gt;SF Mono / Menlo - macOS native, no downloads&lt;/li&gt;
&lt;li&gt;IBM Plex Mono - character without gimmicks&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Pick one, commit for a month, then evaluate. Font ADHD is real and unproductive.&lt;/p&gt;

</description>
      <category>coding</category>
      <category>programming</category>
      <category>tools</category>
    </item>
    <item>
      <title>Font subsetting with pyftsubset: ship only the glyphs your users see</title>
      <dc:creator>BM lm</dc:creator>
      <pubDate>Tue, 10 Nov 2026 15:48:26 +0000</pubDate>
      <link>https://dev.to/bm_lm_a5b33702d6aa3271c49/font-subsetting-with-pyftsubset-ship-only-the-glyphs-your-users-see-cpb</link>
      <guid>https://dev.to/bm_lm_a5b33702d6aa3271c49/font-subsetting-with-pyftsubset-ship-only-the-glyphs-your-users-see-cpb</guid>
      <description>&lt;p&gt;A CJK web font ships 65,000+ glyphs and weighs 10-20MB. Your page uses 200 of them. pyftsubset (from the fonttools package) is the fix - and it works for Latin fonts too.&lt;/p&gt;

&lt;h2&gt;
  
  
  Install and basic use
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip install fonttools brotli

pyftsubset myfont.ttf \
  --text=&lt;span class="s1"&gt;'Your actual content here'&lt;/span&gt; \
  --output-file=myfont-subset.woff2 \
  --flavor=woff2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is the whole pipeline. The &lt;code&gt;--text&lt;/code&gt; flag keeps exactly those glyphs; &lt;code&gt;--flavor=woff2&lt;/code&gt; compresses with Brotli (needs the brotli package).&lt;/p&gt;

&lt;h2&gt;
  
  
  Subsetting by Unicode ranges
&lt;/h2&gt;

&lt;p&gt;For languages you cannot enumerate (user-generated content), subset by range instead:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pyftsubset myfont.ttf \
  --unicodes=&lt;span class="s1"&gt;'U+0000-00FF,U+2000-206F'&lt;/span&gt; \
  --output-file=latin-subset.woff2 --flavor=woff2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;U+0000-00FF covers Latin + Western European; U+2000-206F adds the typographic punctuation block (curly quotes, en/em dashes).&lt;/p&gt;

&lt;h2&gt;
  
  
  The numbers
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Full Latin TTF: ~300KB → woff2 subset: ~15-30KB&lt;/li&gt;
&lt;li&gt;Keeping ligatures and kerning: add &lt;code&gt;--layout-features='kern,liga'&lt;/code&gt; (default keeps them; strip with &lt;code&gt;--layout-features=''&lt;/code&gt; for maximum savings)&lt;/li&gt;
&lt;li&gt;Variable fonts: &lt;code&gt;--instance='wght=400'&lt;/code&gt; pins one weight before subsetting&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The verification step
&lt;/h2&gt;

&lt;p&gt;After subsetting, verify what actually renders in your test page - subsetting bugs (missing glyphs falling back to system fonts) show up as a DIFFERENT typeface on screen. Screenshot and identify on-device with &lt;a href="https://typeye.com" rel="noopener noreferrer"&gt;Typeye&lt;/a&gt;; if the identifier names your system font instead of your subset, a glyph fell out of the subset range.&lt;/p&gt;

&lt;h2&gt;
  
  
  CI integration
&lt;/h2&gt;

&lt;p&gt;Run pyftsubset in your build pipeline, compare output size, and fail the build if a font grows unexpectedly. Fonts are the asset class nobody watches - this is the one-line guard.&lt;/p&gt;

&lt;p&gt;Ship the subset. Keep the full font as a build artifact, not a payload.&lt;/p&gt;

</description>
      <category>performance</category>
      <category>python</category>
      <category>tutorial</category>
      <category>webdev</category>
    </item>
    <item>
      <title>font-display explained: FOUT, FOIT, and the fallback metrics trick</title>
      <dc:creator>BM lm</dc:creator>
      <pubDate>Tue, 10 Nov 2026 15:43:45 +0000</pubDate>
      <link>https://dev.to/bm_lm_a5b33702d6aa3271c49/font-display-explained-fout-foit-and-the-fallback-metrics-trick-155k</link>
      <guid>https://dev.to/bm_lm_a5b33702d6aa3271c49/font-display-explained-fout-foit-and-the-fallback-metrics-trick-155k</guid>
      <description>&lt;p&gt;Every web font takes time to download. What the browser shows WHILE downloading is controlled by one CSS property - and choosing wrong is the difference between a smooth page and a jump-scaring layout.&lt;/p&gt;

&lt;h2&gt;
  
  
  The three behaviors
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;font-display: block&lt;/strong&gt; (FOIT era): hides text entirely for up to 3 seconds while the font loads. Invisible content, then a pop-in. The default in older setups and the worst reading experience.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;font-display: swap&lt;/strong&gt;: shows the fallback instantly, swaps when the real font arrives. Content is readable immediately - but the swap causes a visible flash and (without help) a layout shift.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;font-display: optional&lt;/strong&gt;: gives the font ~100ms. If it loads in time, use it; otherwise the fallback stays for the ENTIRE page view. Best for repeat visitors, worst for first visits (the font rarely wins the race on a cold cache).&lt;/p&gt;

&lt;h2&gt;
  
  
  The fallback metrics trick
&lt;/h2&gt;

&lt;p&gt;swap's problem is the size mismatch: the fallback (Arial) occupies different space than the real font (say, Foundry Grotesque), so text reflows when the swap happens. Modern CSS fixes this:&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="s1"&gt;'Foundry Grotesque'&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="s1"&gt;'foundry.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="s1"&gt;'woff2'&lt;/span&gt;&lt;span class="p"&gt;)&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="n"&gt;swap&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;ascent-override&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;95&lt;/span&gt;&lt;span class="kt"&gt;%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;descent-override&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;25&lt;/span&gt;&lt;span class="kt"&gt;%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;line-gap-override&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="kt"&gt;%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;size-adjust&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;102&lt;/span&gt;&lt;span class="kt"&gt;%&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;With size-adjust and the metric overrides tuned, the fallback renders in almost exactly the same footprint as the real font - the swap becomes invisible.&lt;/p&gt;

&lt;h2&gt;
  
  
  The audit step nobody does
&lt;/h2&gt;

&lt;p&gt;Before tuning metrics, you need to know what the fallback is being asked to imitate - which means knowing what the real font is. On teams with long-lived codebases, that knowledge is often gone. Screenshot the rendered page and identify it on-device: &lt;a href="https://typeye.com" rel="noopener noreferrer"&gt;Typeye&lt;/a&gt; names the typeface from a screenshot entirely in your browser, no uploads of production pages needed.&lt;/p&gt;

&lt;h2&gt;
  
  
  The default that wins
&lt;/h2&gt;

&lt;p&gt;swap + tuned fallback metrics. optional for fonts that are pure decoration. block almost never (it holds text hostage).&lt;/p&gt;

&lt;p&gt;One property, tuned deliberately, and the font-loading experience goes from jump-scare to invisible.&lt;/p&gt;

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