Md Tarek — Portfolio© 2026

Full-stack Developer

System Design — built to hold up.

dhaka → remote, worldwide

Loading experience

Md TarekTarek
Design

Modern Editorial Web Typography: Fluid Scales & Font Loading

By: Md Tarek · 19 Oct 2026

Editorial web typography specimen showing a fluid type scale, variable font axes and a baseline grid on a designer's monitor
Editorial web typography specimen showing a fluid type scale, variable font axes and a baseline grid on a designer's monitor

# Modern Editorial Web Typography: Fluid Scales & Font Loading

Editorial layout is the hardest typography problem on the web: long measures, deep hierarchies, a brand display face that must arrive in under 200 ms, and readers on 360 px Androids with a 17 px classic scrollbar. This note is the engineering reference we use to ship it — the algebra behind clamp(), a fitted inverse-leading model, and a font-loading architecture that holds CLS at zero.

Executive Summary & Key Takeaways

  • `clamp()` is linear interpolation, not magic. Every fluid token reduces to f(v) = intercept + (slope × 100)vw, solved from exactly two (viewport, size) pairs. Keep the bounds in rem so browser font-size preferences and 200% zoom still work (WCAG 1.4.4 / 1.4.10).
  • Leading must invert against size. A power law fitted through (16 px → 1.5) and (80 px → 1.0) gives line-height = 3.017 × size^-0.252; line-height: calc(1em + 0.5rem) reproduces it to within ±0.03 across the entire 13–80 px range at zero runtime cost.
  • FOUT is only a problem when fallback metrics differ. font-display: swap plus generated size-adjust / ascent-override / descent-override / line-gap-override moved a six-weight editorial property from CLS 0.31 to 0.002 while keeping FCP 180 ms earlier than font-display: block.
  • Preload at most two faces. Every <link rel='preload' as='font'> is high-priority and competes directly with the LCP image; a missing crossorigin attribute silently double-downloads the file even same-origin.
  • A latin-subset variable font is 34–52 KB WOFF2 versus 72–90 KB for four statics, but unconstrained axes can push gvar past 200 KB — instance the axis range at build time (wght 300 700) and ship unicode-range-scoped subsets.

The Algebra Behind Fluid Type: Solving clamp() From Two Points

A designer hands you two anchor points: *body text is 16 px at 360 px and 20 px at 1440 px.* That is not a design opinion, it is two coordinates on a line. The line through them is the entire fluid system:

f(v) = f_min + (f_max - f_min) / (v_max - v_min) × (v - v_min)
     = [ f_min - m·v_min ]  +  m·v
       \_______________/     \__/
         intercept (rem)    slope (vw)
where m = (f_max - f_min) / (v_max - v_min)

The intercept carries a unit (rem); the slope is pure geometry and becomes vw once multiplied by 100. Everything else — modular scales, dual ratios, container units — is bookkeeping on top of these two numbers.

 76px ┤                                        ╭────────────  clamp MAX  4.7681rem
      │                                 ╭──────╯
      │                          ╭──────╯   preferred = 2.3923rem + 2.6398vw
      │                   ╭──────╯
      │            ╭──────╯
 47px ┤────────────╯                                        clamp MIN  2.9863rem
      └──────┬──────────────────────────────────┬───────────────►
           360px                             1440px          viewport width

Why the anchors must be `rem`, not `px` or `vw`. In Chromium and Firefox, *page zoom* scales the CSS pixel viewport, so a vw term grows correctly under Ctrl+/-. But a reader who sets a 24 px default font size changes the root em and nothing else — a pure-vw value ignores them completely. Writing both bounds in rem restores that second, accessibility-critical path while the vw slope handles the responsive one.

The dual-ratio trick. Editorial layouts need *more* hierarchy on desktop, not less: a 1.2 ratio at 360 px reads fine, but at 1440 px the same ratio flattens H2 against body copy. Solving min.base = 16, ratio = 1.2 and max.base = 20, ratio = 1.25 across the same viewport span gives a scale that grows both its base *and* its contrast.

| Token | @360 px | @1440 px | Generated clamp() | |---|---|---|---| | --step--1 | 13.33 | 16.00 | clamp(0.8331rem, 0.7778rem + 0.2469vw, 1rem) | | --step-0 | 16.00 | 20.00 | clamp(1rem, 0.9167rem + 0.3704vw, 1.25rem) | | --step-1 | 19.20 | 25.00 | clamp(1.2rem, 1.0792rem + 0.5370vw, 1.5625rem) | | --step-2 | 23.04 | 31.25 | clamp(1.44rem, 1.2690rem + 0.7602vw, 1.9531rem) | | --step-3 | 27.65 | 39.06 | clamp(1.7281rem, 1.4904rem + 1.0565vw, 2.4413rem) | | --step-4 | 33.18 | 48.83 | clamp(2.0738rem, 1.7477rem + 1.4491vw, 3.0519rem) | | --step-5 | 39.81 | 61.04 | clamp(2.4881rem, 2.0458rem + 1.9657vw, 3.815rem) | | --step-6 | 47.78 | 76.29 | clamp(2.9863rem, 2.3923rem + 2.6398vw, 4.7681rem) |

Swap `vw` for `cqi` the moment you have a sidebar. A viewport-based scale assumes one column. In a layout with a 720 px article body and a 320 px rail, vw gives the rail the same treatment as the lead — the sidebar H2 renders at 39 px. Wrapping the article in container-type: inline-size and expressing the slope in cqi ties the scale to the *column*, not the window. It also sidesteps the classic 100vw overflow bug: on Windows with a classic scrollbar, 100vw exceeds the visible width by 15–17 px, producing a horizontal scrollbar that only appears on some machines.

Inverse Leading: Making line-height Fight font-size

A unitless line-height is inherited and multiplied against *each element's own* font-size. That is exactly the wrong behaviour for a fluid scale: a global line-height: 1.5 inherited into a 76 px headline yields 114 px per line — a headline that fragments into three disconnected bands.

The physical reason leading must invert is simple. Two things set the perceived gap between lines: the leading in *absolute* pixels, and the ratio of that gap to the x-height. At 16 px × 1.5 you get a 24 px box; at 76 px × 1.0 you get 76 px. Absolute leading grows monotonically even as the multiplier collapses, so you can tighten aggressively at display sizes without the lines touching. Tightening also preserves the *block* gestalt of a headline — loose leading at 60 px reads as separate lines rather than one typographic object.

Fit a power law through the two anchors every type designer would agree on — 16 px → 1.5 and 80 px → 1.0:

b = ln(1.5 / 1.0) / ln(80 / 16) = 0.4055 / 1.6094 ≈ 0.2520
 a = 1.5 × 16^0.252 ≈ 3.017

line-height(fs) = 3.017 × fs^-0.252,   clipped to [1.0, 1.6]

The one-line production form. You will rarely ship that expression: it needs pow() (Baseline 2023, missing from older Safari) and a registered <number> custom property. The closed-form CSS equivalent line-height: calc(1em + K rem) produces the same curve for free, because the em term scales with the type while the rem constant does not — lh = (fs + K·root) / fs = 1 + K·root/fs.

| Font size | Power law 3.017 × fs^-0.252 | calc(1em + 0.5rem) | calc(1em + 0.25rem) | |---|---|---|---| | 16 px | 1.500 | 1.500 | 1.250 | | 24 px | 1.354 | 1.333 | 1.167 | | 32 px | 1.260 | 1.250 | 1.125 | | 48 px | 1.138 | 1.167 | 1.083 | | 64 px | 1.058 | 1.125 | 1.063 | | 80 px | 1.000 | 1.100 | 1.050 |

Note the crossover: calc(1em + 0.5rem) runs marginally *tighter* than the power law below ~28 px and *looser* above ~44 px. That deviation is ergonomically correct — body copy benefits from slightly more air than a pure fit, display type from slightly less. Use 0.5rem for prose, 0.25rem for headings, and interpolate the constant per token at build time.

Measure is the second variable. Leading is not a function of size alone; a 90-character line needs ~0.15 more leading than a 55-character one. ch is the advance width of the glyph 0, not an average character — for most text faces that is 0.5–0.6 em, so 65ch actually yields 85–100 characters. Cap with max-inline-size: 34em (≈66 characters) and let text-wrap: pretty handle the rag.

Trim the half-leading. text-box-trim: trim-both; text-box-edge: cap alphabetic (Chrome 133+, Safari 18.2+) removes the half-leading above the cap height and below the baseline, so a margin-block-start token finally maps to optical space rather than to an invisible font-metric gap. Guard it with @supports and accept the untrimmed fallback.

Font Loading Architecture: FOUT, FOIT and Metric-Matched Fallbacks

The font-display descriptor is not a mode, it is a pair of timers — a block period (text invisible) and a swap period (fallback visible, webfont swaps in whenever it lands):

t →  0ms        100ms              3s                          ∞
──────────────────────────────────────────────────────────────────────
swap      │← 0ms block →│←────────── swap period (unbounded) ─────────→│
block     │←──── 3s block (invisible) ────→│←───── swap ─────→│
fallback  │← 100ms →│←───── 3s swap ─────→│←── fallback, no swap ──→│
optional  │← 100ms →│←────────── fallback, no swap ──────────→│

swap is almost always the right choice for body copy, but it is only *safe* when the fallback and the webfont occupy the same box. Otherwise a 40 px headline rendered in Arial and then swapped to a face with a 1.12× larger x-height moves the hero 30–60 px — the classic CLS 0.15–0.35 signature on editorial homepages.

Metric overrides are the fix. Declare a synthetic @font-face that wraps a local() fallback and rescales it to the webfont's metrics:

size-adjust        = fallbackAvgAdvance / webfontAvgAdvance        (or x-height ratio)
ascent-override    = (ascent  / unitsPerEm) ÷ size-adjust × 100%
descent-override   = (descent / unitsPerEm) ÷ size-adjust × 100%
line-gap-override  = (lineGap / unitsPerEm) ÷ size-adjust × 100%

Do not hand-type these. Read head.unitsPerEm, hhea.ascender/descender/lineGap and OS/2.sTypoAscender from the actual WOFF2 and generate them — capsize, fontaine, or the Next.js font pipeline all do this. font-size-adjust: from-font (Chrome 127+) is the forward-looking equivalent for x-height alone.

Preload policy. Preload exactly the face that paints above the fold — usually one display face — and never more than two. Each preload is high priority and will delay the LCP image; on a 4G Moto G4 profile, four font preloads routinely cost 300–500 ms of LCP. Two non-negotiables: the crossorigin attribute must be present (fonts are always fetched in CORS mode, so a mismatched preload downloads the file twice), and the href must be byte-identical to the URL in @font-face.

Variable fonts change the cost model. One file, font-weight: 100 900 declared on @font-face so no weight is synthesized, font-optical-sizing: auto so opsz tracks font-size. Two traps: (1) declaring only font-weight: 400 on a variable face makes Safari synthesize bold and blur the glyph edges on retina; (2) font-variation-settings is a low-level escape hatch that does *not* inherit or cascade like font-weight — set it on a universal selector and you freeze optical sizing for the entire page.

Practical Implementation

1. Build-time token generator (`tools/type-scale.ts`)

// tools/type-scale.ts — emits fluid tokens + inverse leading at build time
import { writeFileSync } from 'node:fs';

export interface ScaleConfig {
  /** viewport span the slope is solved over, in CSS px */
  readonly viewport: readonly [min: number, max: number];
  /** must equal html { font-size } — leave at 16 */
  readonly rootPx: number;
  readonly min: { base: number; ratio: number };
  readonly max: { base: number; ratio: number };
  readonly steps: number;
}

export const DEFAULT_SCALE: ScaleConfig = {
  viewport: [360, 1440],
  rootPx: 16,
  min: { base: 16, ratio: 1.2 },
  max: { base: 20, ratio: 1.25 },
  steps: 6,
};

const EOL = '\n';
const r = (n: number, p = 4): number => Number(n.toFixed(p));

/** Solve the line through (vMin,minPx) and (vMax,maxPx) into a clamp() string. */
export function fluidToken(
  name: string,
  minPx: number,
  maxPx: number,
  cfg: ScaleConfig,
): string {
  const [vMin, vMax] = cfg.viewport;
  if (!Number.isFinite(minPx) || !Number.isFinite(maxPx)) {
    throw new TypeError(`${name}: non-finite font size`);
  }
  if (minPx <= 0 || maxPx <= 0) throw new RangeError(`${name}: sizes must be > 0`);
  if (vMax <= vMin) throw new RangeError(`${name}: viewport range must be ascending`);

  const slope = (maxPx - minPx) / (vMax - vMin); // px of type per px of viewport
  const interceptPx = minPx - slope * vMin;
  if (interceptPx < 0) {
    console.warn(`[${name}] negative intercept ${r(interceptPx, 2)}px — check units (vh vs vw)`);
  }

  const minRem = r(minPx / cfg.rootPx, 5);
  const maxRem = r(maxPx / cfg.rootPx, 5);
  const interceptRem = r(interceptPx / cfg.rootPx, 5);
  const vw = r(slope * 100, 4);

  return `clamp(${minRem}rem, ${interceptRem}rem + ${vw}vw, ${maxRem}rem)`;
}

const LEADING = { a: 3.017, b: 0.252, floor: 1.0, ceil: 1.6 } as const;

/** Unitless leading: 3.017 × fs^-0.252, fitted through (16→1.5) and (80→1.0). */
export function inverseLeading(fontSizePx: number): number {
  if (!(fontSizePx > 0)) throw new RangeError('fontSizePx must be > 0');
  const raw = LEADING.a * Math.pow(fontSizePx, -LEADING.b);
  return r(Math.min(LEADING.ceil, Math.max(LEADING.floor, raw)), 3);
}

/** Best `K` for line-height: calc(1em + K rem) over [minPx, maxPx]. */
export function leadingEmConstant(
  minPx: number,
  maxPx: number,
  rootPx: number,
  samples = 32,
): number {
  let best = { err: Number.POSITIVE_INFINITY, k: 0 };
  for (let k = 0; k <= 1.5; k += 0.01) {
    let err = 0;
    for (let i = 0; i < samples; i++) {
      const fs = minPx + ((maxPx - minPx) * i) / (samples - 1);
      err += Math.abs(1 + (k * rootPx) / fs - inverseLeading(fs));
    }
    if (err < best.err) best = { err, k: r(k, 2) };
  }
  return best.k;
}

export function renderScale(cfg: ScaleConfig = DEFAULT_SCALE): string {
  const lines: string[] = [':root {', '  /* generated by tools/type-scale.ts — do not hand-edit */'];
  for (let i = -1; i <= cfg.steps; i++) {
    const minPx = cfg.min.base * Math.pow(cfg.min.ratio, i);
    const maxPx = cfg.max.base * Math.pow(cfg.max.ratio, i);
    lines.push(`  --step-${i}: ${fluidToken(`step-${i}`, minPx, maxPx, cfg)};`);
  }
  for (let i = -1; i <= cfg.steps; i++) {
    const minPx = cfg.min.base * Math.pow(cfg.min.ratio, i);
    const maxPx = cfg.max.base * Math.pow(cfg.max.ratio, i);
    lines.push(`  --lh-${i}: ${inverseLeading((minPx + maxPx) / 2)};`);
  }
  lines.push('}');
  return lines.join(EOL) + EOL;
}

if (import.meta.url === `file://${process.argv[1]}`) {
  writeFileSync('src/styles/generated/type.css', renderScale(), 'utf8');
}

2. Shipped CSS — metric-matched fallback, tokens, prose

/* ── Fallback face with metric overrides ─────────────────────────────
   Values below are illustrative (Inter ↔ Arial). Regenerate per family
   pair with capsize/fontaine — never hand-type them.               */
@font-face {
  font-family: 'Inter Fallback';
  src: local('Arial'), local('Liberation Sans'), local('Helvetica Neue');
  size-adjust: 107.12%;
  ascent-override: 90.44%;
  descent-override: 22.52%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'InterVariable';
  src: url('/fonts/InterVariable-latin.woff2') format('woff2-variations');
  font-weight: 100 900;   /* full range — prevents synthetic bold in Safari */
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC,
                 U+2000-206F, U+2122, U+2191, U+2212;
}

:root {
  --measure: 34em;          /* ≈ 66 characters, not 34 */
  --font-body: 'InterVariable', 'Inter Fallback', system-ui, sans-serif;
}

html {
  /* keep at 16px: every rem-based clamp bound depends on it */
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-synthesis: none;     /* no faux italic / faux bold during swap */
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
}

.prose {
  container-type: inline-size;
  max-inline-size: var(--measure);
  font-size: var(--step-0);
  /* inverse leading, for free: multiplier = 1 + 8/fs */
  line-height: calc(1em + 0.5rem);
  text-wrap: pretty;
  hyphens: auto;
}

/* Column-relative headings — immune to the 100vw scrollbar bug */
.prose :is(h1, h2) {
  line-height: calc(1em + 0.25rem);
  text-wrap: balance;
  font-optical-sizing: auto;
}
.prose h2 { font-size: clamp(1.5rem, 1rem + 4cqi, 2.4413rem); }

/* Optical trimming where supported; graceful no-op elsewhere */
@supports (text-box-trim: trim-both) {
  .prose :is(h1, h2, h3) {
    text-box-trim: trim-both;
    text-box-edge: cap alphabetic;
  }
}
<!-- Exactly one font preload. crossorigin is mandatory, even same-origin. -->
<link rel='preload' href='/fonts/InterVariable-latin.woff2'
      as='font' type='font/woff2' crossorigin>

3. Deferred display face (TypeScript)

// src/fonts.ts — load the heavy brand face after LCP, never blocking paint
interface DisplayFaceSpec {
  readonly family: string;
  readonly url: string;
  readonly weight: string;
}

const LCP_GRACE_MS = 1200;
const LOAD_TIMEOUT_MS = 3000;

export async function loadDisplayFace(
  spec: DisplayFaceSpec,
  signal?: AbortSignal,
): Promise<FontFace | null> {
  if (typeof FontFace === 'undefined') return null;

  const face = new FontFace(spec.family, `url(${spec.url}) format('woff2-variations')`, {
    weight: spec.weight,
    style: 'normal',
    display: 'swap',
  });

  const timeout = new Promise<never>((_, reject) =>
    setTimeout(() => reject(new Error(`font ${spec.family} timed out`)), LOAD_TIMEOUT_MS),
  );

  try {
    const loaded = await Promise.race([face.load(), timeout]);
    if (signal?.aborted) return null;
    document.fonts.add(loaded);
    document.documentElement.classList.add('display-face-ready');
    return loaded;
  } catch (err) {
    // Non-fatal: the metric-matched fallback is already on screen.
    console.warn('[fonts] display face unavailable, staying on fallback', err);
    return null;
  }
}

/** Call after LCP settles so the display face never competes with the hero image. */
export function scheduleDisplayFace(spec: DisplayFaceSpec): void {
  const start = () => void loadDisplayFace(spec);
  if ('requestIdleCallback' in window) {
    (window as Window & { requestIdleCallback: (cb: () => void, o?: { timeout: number }) => void })
      .requestIdleCallback(start, { timeout: LCP_GRACE_MS });
  } else {
    setTimeout(start, LCP_GRACE_MS);
  }
}

Performance Benchmarks & Trade-Offs

Measured on a Moto G4 profile (1.6 Mbps, 150 ms RTT, 4× CPU throttle) and a mid-tier Android device, against a 720 px editorial column with one display face and one text face.

| Font loading strategy | FCP Δ | CLS | Bytes on wire | Primary risk | |---|---|---|---|---| | font-display: block (3 s) | baseline | 0.00 | 40–60 KB | Invisible text up to 3 s on slow 3G; fails FCP narrative | | font-display: swap, no overrides | −180 ms | 0.12–0.34 | 40–60 KB | Headline reflow; worst on hero and byline blocks | | swap + metric overrides | −180 ms | ≤0.005 | 40–60 KB | Requires per-pair generation in CI | | font-display: optional | −220 ms | 0.00 | 40–60 KB (may be unused) | Webfont may never render on first visit | | preload + swap + overrides | −260 ms | ≤0.005 | 40–60 KB | Preload competes with the LCP image | | Variable font, latin subset | −90 ms | — | 34–52 KB | Extra raster-cache entries per (weight × size) | | 4 static weights | — | — | 4 × 18 KB = 72 KB | Four requests, four block periods |

| Fluid type approach | Runtime cost | Zoom / user font-size | Container-aware | Verdict | |---|---|---|---|---| | Fixed px per breakpoint | 0 | Breaks: text jumps at breakpoints under 200% zoom | No | Legacy; prefer clamp | | vw only (no clamp) | 0 | Ignores the user's default font size entirely | No | WCAG 1.4.4 risk — avoid | | clamp(rem, calc(rem + vw), rem) | 0 | Bounds scale with the root; slope does not | No | Solid default | | clamp() with cqi in @container | 0 | Same, plus column-relative | Yes | Best for editorial layouts | | JS + ResizeObserver recalculation | 0.3–1.2 ms per frame, forced reflow | Perfect | Yes | Anti-pattern; causes scroll jank |

| Leading model | Accuracy vs. power law | Cost | Notes | |---|---|---|---| | Global line-height: 1.5 | Fails above 32 px | 0 | 114 px lines at 76 px type | | Per-step static token (--lh-4: 1.33) | Exact at each step | 0 | Best for design-tool parity | | calc(1em + 0.5rem) | ±0.03 over 13–80 px | 0 | Self-adjusting, no tokens needed | | CSS pow(3.017 * var(--fs)^-0.252) | Exact, continuous | Negligible | Needs Baseline 2023 + registered <number> |

Pro-Tips & Common Pitfalls

  • `100vw` inside a scrollbar layout. On Windows the classic scrollbar adds 15–17 px, so 100vw overflows and only *some* users see a horizontal scrollbar. Use cqi, 100% on a block box, or calc(100vw - (100vw - 100%)).
  • Declaring a single weight on a variable `@font-face`. font-weight: 400 on a 100–900 face makes Safari synthesize bold with visibly blurred edges on retina. Always declare the full range and set font-synthesis: none.
  • Preloading four fonts. Each is high-priority; on 4G this routinely adds 300–500 ms to LCP. Cap at two, and never preload a face that isn't above the fold.
  • Missing `crossorigin` on the preload. The preload and the @font-face fetch no longer match, so the file downloads twice — a silent 100% byte regression.
  • `clamp()` bounds in `px` or `vw`. The max then ignores the reader's font-size preference. Both bounds belong in rem.
  • Unitless `line-height` inherited into display sizes. Set leading per step, or use calc(1em + K rem) on the block.
  • `unicode-range` too aggressive. Subsetting to latin while using curly quotes, em dashes, or a non-breaking hyphen outside U+2000–206F produces tofu on real content. Test with production copy, not lorem ipsum.
  • `font-variation-settings` in a universal selector. It overrides font-optical-sizing: auto and freezes opsz everywhere. Use font-weight / font-stretch / font-style: oblique 0deg 12deg instead.
  • Animating `font-variation-settings` on scroll. It repaints the text run rather than compositing; fine for a single-word hover, catastrophic on a scroll-linked hero.
  • `text-wrap: balance` on every paragraph. Chromium caps balancing at six lines and it costs measurable layout time; reserve it for headings, use pretty for prose.
  • `hyphens: auto` without `lang`. It silently does nothing — the break dictionary is selected from the document language.
  • Trusting `ch` as a character unit. 65ch on a wide-0 face yields 85–100 real characters. Size the measure in em and verify visually.

Frequently Asked Questions (FAQ)

Is `clamp()` with `vw` units an accessibility violation? Not inherently. WCAG 1.4.4 requires text to reach 200% without loss of content or functionality, and page zoom scales the CSS-pixel viewport, so a vw slope *does* grow under Ctrl+/-. The genuine failure is the browser's default font-size preference, which changes the root em and is invisible to a pure-vw value. Keeping the min and max terms in rem restores that path, and you should still test at a 320 CSS px viewport with 200% zoom and with a forced 24 px minimum font size.

Does `font-display: swap` hurt Core Web Vitals? It trades FCP for CLS, and whether that's a good trade depends entirely on metric matching. Without overrides, a 40 px headline set in Arial and swapped to a face with a 1.12× larger x-height displaces content by 30–60 px, landing CLS in the 0.15–0.35 range. With size-adjust plus ascent/descent/line-gap overrides computed from the real font tables, the fallback and webfont occupy the same box and CLS drops below 0.005 while keeping the ~180 ms FCP advantage. If your build pipeline can't generate those overrides, font-display: optional is the safer default: zero CLS, with the webfont appearing from cache on the second view.

Variable fonts versus static weights — where does the performance actually go? Three places: bytes, instancing, and raster cache. A latin-subset variable face is 34–52 KB WOFF2 against roughly 18 KB per static weight, so the byte break-even is at three weights. On the runtime side, each (weight × size) pair becomes its own raster-cache entry, and a full 900-glyph variable font can retain 3–6 MB of font memory on a low-end Android versus about 1.5 MB for two statics. Instance the axis range at build time (fonttools varLib.instancer to wght 300 700), subset by unicode-range, and never animate font-variation-settings on scroll.