Подбор и реализация шрифтов для веб-проектов.

Звёзды2 926
Авторjeremylongshore
Установок3

Установка

SKILL.md

Web Typography

A practical guide to choosing, pairing, and implementing typefaces for the web. The best typography is invisible — it immerses readers in content rather than calling attention to itself.

Core Principle

Typography is the voice of your content. The typeface you choose sets tone before a single word is read — a legal site shouldn't feel playful; a children's app shouldn't feel corporate. Follow the "clear goblet" principle: typography should be like a crystal-clear wine glass, keeping focus on the wine (content), not the glass (type).

Scoring

Goal: 10/10. Score = number of the 10 Quick Diagnostic rows the implementation satisfies. Bands: 9-10 = body 16px+, measure under 75ch, line-height 1.4+, clear level contrast, font payload under 200KB, fallbacks set, survives 200% zoom; 5-6 = readable but missing measure control, fallbacks, or zoom resilience; <=3 = sub-16px body, no measure cap, FOIT, or unreadable hierarchy. Always state the current score and the specific diagnostic rows failing.

Two Contexts for Type

All typography falls into two categories:

ContextPurposePriorities
Type for a momentHeadlines, buttons, navigation, logosPersonality, impact, distinctiveness
Type to live withBody text, articles, documentationReadability, comfort, endurance

Workhorse typefaces excel at "type to live with" — versatile across sizes, weights, and contexts without drawing attention. Examples: Georgia, Source Sans, Freight Text, FF Meta.

Typography Framework

1. How We Read

Core concept: Understanding reading mechanics is the foundation for every typography decision. Eyes don't scan smoothly — they jump in bursts.

Why it works: Fighting these mechanics creates friction that drives readers away; aligning with them lets readers absorb content faster with less fatigue.

Key insights:

  • Saccades — eyes jump in 7-9 character bursts; line length and letter spacing directly affect saccade efficiency
  • Fixations — eyes pause briefly to absorb content; dense or poorly spaced text slows reading
  • Word shapes (bouma) — experienced readers recognize word silhouettes, not individual letters
  • Legibility vs. readability — legibility is whether characters can be distinguished (a typeface concern); readability is whether text can be comfortably read for extended periods (a typography concern: size, spacing, line length). A legible typeface can still be set unreadably

Product applications:

ContextApplicationExample
Long-form contentOptimize for sustained comfort16-18px body, 1.5-1.7 line height, 45-75 char lines
Dashboard UIOptimize for rapid scanningDistinct weight hierarchy, whitespace between data groups
Mobile readingAccount for distance and lightingLarger body (17-18px), higher contrast

Copy patterns:

.prose {
  font-size: 1.125rem;     /* 18px */
  line-height: 1.6;
  max-width: 65ch;          /* ~45-75 characters */
}

See: references/typeface-anatomy.md when you need to name letterform parts (x-height, counter, aperture) or place a face in a classification system to justify a choice.

2. Evaluating Typefaces

Core concept: A typeface must pass technical, structural, and practical quality checks before it earns a place in a project. Beautiful specimens fail on screen.

Why it works: Screen rendering, variable bandwidth, and diverse devices impose constraints print never faced. Rigorous evaluation prevents costly mid-project typeface swaps.

Key insights:

  • Technical quality — consistent stroke weights, even visual color across text blocks, good kerning pairs (AV, To, Ty), complete character set, multiple weights (minimum: regular, bold, italic)
  • Structural assessment — generous x-height (better screen readability), open counters and apertures (a, e, c), distinct letterforms (Il1, O0, rn vs. m)
  • Practical needs — test at actual use sizes on target screens, check file size, verify the license
  • Real content testing — Lorem ipsum hides problems with character frequency, word length, and paragraph rhythm

Product applications:

ContextApplicationExample
Body text selectionPrioritize x-height, open counters, even colorSource Serif Pro over Didot for long reads
UI/System textPrioritize small-size legibility and weight rangeInter or SF Pro for interface elements
Multilingual productVerify glyph coverage for target languagesNoto Sans for broad Unicode support

Copy patterns:

/* Stress-test at every actual use size */
body { font-size: 16px; }
.caption { font-size: 0.75rem; }
h1 { font-size: 3rem; }

Ethical boundary: Always verify the web license before shipping a font — desktop/print licenses rarely cover web embedding, and unlicensed use creates real legal liability.

See: references/evaluating-typefaces.md when vetting a candidate face — full quality checklist, red-flags table, and the structural criteria to inspect.

3. Choosing Typefaces

Core concept: Start with purpose, not aesthetics. The content's tone, reading context, and duration should drive selection — not personal preference or trends.

Why it works: Purpose-driven choices feel inevitable rather than arbitrary, and survive stakeholder review because they can be justified with reasoning rather than taste.

Key insights:

  • Define the job first — body text, headlines, and UI elements may each need different faces
  • Match tone to content — a financial report needs a different voice than a bakery menu
  • Check the family — confirm needed weights, italics, and styles exist before committing
  • Safe starting points — body serif: Georgia, Source Serif Pro, Charter; body sans: system fonts, Source Sans Pro, Inter, IBM Plex Sans

Product applications:

ContextApplicationExample
Content-heavy siteWorkhorse serif or sans for sustained readingSource Serif Pro or Charter for articles
SaaS dashboardClean sans with strong tabular figuresInter or IBM Plex Sans for data-rich UIs
Accessibility-focusedFaces designed for maximum legibilityAtkinson Hyperlegible for vision-impaired users

Copy patterns:

/* Web font with system fallback stack */
body {
  font-family: 'Source Sans Pro', -apple-system,
               BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

See: references/evaluating-typefaces.md when narrowing finalists or weighing free vs. paid faces — the side-by-side comparison method and quality-option shortlists.

4. Pairing Typefaces

Core concept: Successful pairings create clear contrast — faces should be obviously different, not confusingly similar. One to two typefaces maximum.

Why it works: Clear structural contrast (serif + sans, light + bold, humanist + geometric) gives each face a distinct role. Faces that are too similar create tension without purpose — readers sense something is "off" without knowing why.

Key insights:

  • Contrast types — structure (serif + sans), weight (light + regular), era (humanist + geometric), width (condensed + normal)
  • Same designer strategy — faces by one designer often share harmonizing DNA (FF Meta + FF Meta Serif)
  • Superfamilies — families designed to work together eliminate guesswork (Roboto + Roboto Slab)
  • Pairing failures — two near-identical faces, both faces competing for attention, one face overwhelming the other

Product applications:

ContextApplicationExample
Editorial siteSerif headlines + sans bodyPlayfair Display + Source Sans Pro
DocumentationMonospace code + sans prose from one familyIBM Plex Mono + IBM Plex Sans
Minimal brandSingle family with weight variationInter at varying weights and sizes

Copy patterns:

/* Classic serif + sans-serif pairing */
h1, h2, h3 { font-family: 'Playfair Display', Georgia, serif; }
body { font-family: 'Source Sans Pro', -apple-system, sans-serif; }

See: references/pairing-strategies.md when picking a second face — proven combinations, the contrast-type table, and same-designer/superfamily shortcuts.

5. Typographic Measurements

Core concept: Three measurements — font size, line length, and line height — form the foundation of comfortable reading. Getting these right matters more than typeface choice.

Why it works: These measurements govern how the eye tracks across and down text: optimal line length matches the saccade pattern, adequate line height prevents the eye from jumping to the wrong line on the return sweep, and sufficient size makes letterforms recognizable on screen.

Key insights:

  • Body size — 16px minimum; err larger (18px) for reading-heavy sites; mobile users hold phones farther than designers assume
  • Line length (measure) — 45-75 characters ideal, 66 optimal; enforce with ch units or max-width
  • Line height — 1.4-1.8 for body; longer lines need more; headlines need tighter (1.1-1.25)
  • Heading scale — consistent ratio (1.2-1.5) between levels creates hierarchy without extremes

Product applications:

ContextApplicationExample
Blog / article65ch max-width, 1.6 line height.prose { max-width: 65ch; line-height: 1.6; }
DashboardTighter line height for dense dataline-height: 1.3; for table cells and labels
Landing pageGenerous sizing for scanabilityfont-size: 1.25rem; line-height: 1.7;

Copy patterns:

.prose {
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.6;
  max-width: 65ch;
}
/* Line height by context */
h1, h2 { line-height: 1.1; }      /* headlines: 1.1-1.25 */
.ui-text { line-height: 1.35; }   /* UI: 1.3-1.4 */
.body-text { line-height: 1.6; }  /* body: 1.5-1.7 */

See: references/responsive-typography.md when writing the clamp() formulas — how to derive min/preferred/max and viewport-based measurement strategies.

6. Building Type Hierarchies

Core concept: Hierarchy tells readers what matters most. Create distinction through controlled variation in size, weight, and color — but don't pull all three levers at once.

Why it works: Deliberate, consistent differences between levels let readers grasp page structure at a glance; without hierarchy everything competes and nothing wins.

Key insights:

  • Three levers — size, weight, color; vary one or two between adjacent levels, never all three
  • The squint test — squinting at a page should still reveal the hierarchy
  • Consistent scale — a modular ratio (1.2-1.5) between heading levels creates rhythm; arbitrary sizes create noise
  • Don't skip levels — jumping H1 to H3 breaks the reader's mental model

Product applications:

ContextApplicationExample
Content pageSize + weight across 4-5 levelsH1 2.5rem/700, H2 1.75rem/600, Body 1rem/400
DashboardWeight + color for data vs. labelsBold #111 values, regular #666 labels
Form UISubtle weight shift for labelsLabel: 600 weight, input: 400 weight

Copy patterns:

h1 { font-size: clamp(2rem, 1.5rem + 2vw, 3rem); font-weight: 700; color: #111; }
h2 { font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem); font-weight: 600; color: #111; }
body { font-size: 1rem; font-weight: 400; color: #333; }
.secondary { font-size: 0.875rem; color: #666; }
/* Headings: more space above than below */
h1, h2, h3 { margin: 1.5em 0 0.5em; line-height: 1.2; }

Ethical boundary: Don't bury fees, disclaimers, or opt-outs in small or low-contrast type to demote what users need to see — hierarchy that hides material information weaponizes typography against the reader.

See: references/css-implementation.md when implementing the CSS — full hierarchy patterns, @font-face loading, font-variation-settings axes, and subsetting with pyftsubset.

7. Responsive Typography and Web Font Performance

Core concept: Type must adapt to screens, and web fonts must load efficiently. Fluid typography with clamp() eliminates breakpoint jumps; strategic font loading prevents layout shift and slow renders.

Why it works: A fixed font size cannot serve both a 320px phone and a 1440px desktop. Web fonts are render-blocking by default — unoptimized loading causes Flash of Invisible Text (FOIT) or Flash of Unstyled Text (FOUT).

Key insights:

  • Fluid typography — clamp(min, preferred, max) scales smoothly between viewports, no media queries needed for type
  • Breakpoint adjustments — mobile needs slightly larger body (17-18px) and a tighter heading scale; desktop can push display sizes while keeping line-length limits
  • Loading strategy — font-display: swap shows fallback text immediately; preload critical fonts; subset to needed characters
  • Performance budget — under 200KB total font payload; prefer WOFF2; a variable font can replace 4-6 static weight files

Product applications:

ContextApplicationExample
Content siteFluid sizes with clamp()font-size: clamp(1rem, 0.9rem + 0.5vw, 1.25rem)
E-commercePreload hero font, lazy-load secondary weights<link rel="preload" href="font.woff2" as="font">
Global productSubset per language to cut payloadLatin subset for English, CJK subset for Asian pages

Copy patterns:

h1 { font-size: clamp(2rem, 1.5rem + 2vw, 3.5rem); }

@font-face {
  font-family: 'Custom Font';
  src: url('/fonts/custom.woff2') format('woff2');
  font-display: swap;
  unicode-range: U+0000-00FF; /* Latin subset */
}
/* In <head>: <link rel="preload" href="/fonts/custom.woff2" as="font" type="font/woff2" crossorigin> */

Ethical boundary: Не оптимизируйте пользователей — подмножество, которое отбрасывает символы, нужные неанглоязычным читателям, или удаление курсивных/полужирных начертаний, необходимых для акцента, — это обмен инклюзивности на скорость.

Распространённые ошибки

ОшибкаПочему это не работаетИсправление
Текст кажется сжатымСлишком маленький межстрочный интервал утомляет читателейУвеличьте line-height до 1.6+; добавьте отступы между абзацами
Строки слишком длинныеПосле 75 символов глаз теряет обратный переходmax-width: 65ch на контейнерах текста
Заголовки выглядят оторваннымиИзбыток пространства над заголовком нарушает связь с содержимымУменьшите пространство над заголовком; сохраните пространство под ним
Текст выглядит размытымПроблемы со сглаживанием шрифта или субпиксельным рендерингомПроверьте сглаживание шрифта; попробуйте другое начертание; увеличьте размер
Шрифты загружаются медленноНеоптимизированные файлы блокируют рендерингПодмножество; font-display: swap; предзагрузка критических шрифтов
Основной текст слишком мелкийТелефоны держат дальше, чем предполагалось; напрягает глаза пожилых людейУвеличьте до 18px; тестируйте на реальном расстоянии
Иерархия неяснаНедостаточный контраст между уровнямиУвеличьте различия в размере/начертании
Шрифты конфликтуютСочетание без чёткого контраста создаёт напряжениеОдно семейство или обеспечьте структурный контраст (serif + sans)
Тестирование на Lorem ipsumТекст-заполнитель скрывает проблемы ритма и частотностиТестируйте на реальном, репрезентативном контенте

Быстрая диагностика

ВопросIf NoДействие
Основной текст 16px или больше?Слишком мелкий для комфортного чтенияМинимум 16px; предпочтительно 18px для страниц с интенсивным чтением
Длина строки меньше 75 символов?Глаз теряет позицию при обратном переходеmax-width: 65ch на контейнерах прозы
Межстрочный интервал 1.4+ для основного текста?Строки кажутся сжатыми, чтение замедляетсяУвеличьте до 1.5-1.7
Есть чёткий контраст между уровнями шрифта?Иерархия невидима, сканирование не работаетУвеличьте различия в размере или начертании
Протестировано в реальных размерах на реальных экранах?Сюрпризы рендеринга в продакшенеТестируйте каждый используемый размер на целевых устройствах
Общий вес шрифтов менее 200KB?Медленная загрузка вредит UX и SEOПодмножество, WOFF2, рассмотрите вариативные шрифты
Указаны резервные шрифты?FOIT оставляет пустой текстСистемные резервные шрифты в каждом font-family
Работает ли страница при масштабе 200%?Нарушение доступности для слабовидящихИсправьте переполнение и обрезку при 200%
Заголовки свободны от висячих слов?Завершающие слова выглядят незаконченнымиtext-wrap: balance или ручные переносы
Ссылки визуально различимы?Пользователи не могут найти интерактивные элементыРазличие по цвету и/или подчёркиванию

Дополнительное чтение

  • "On Web Typography" Джейсона Санта-Марии (A Book Apart, 2014)

Об авторе

Джейсон Санта-Мария — графический дизайнер и педагог, работавший креативным директором в Typekit (ныне Adobe Fonts) и соучредивший A Book Apart. Он преподаёт в Школе визуальных искусств в Нью-Йорке, а On Web Typography объединяет его опыт на стыке традиционного типографического ремесла и реалий дизайна для экранов.

Вставить в README

Ссылка на карточку для вашего README — без картинок и счётчиков.

[DarkPlay: web-typography](https://darkplay.ru/ai/skills/jeremylongshore-claude-code-plugins-plus-skills-web-typography)

Похожие скиллы и другие разделы каталога

Популярное в разделе «Скиллы»

Самые востребованные скиллов раздела по установкам и звёздам.

find-skillsvercel-labs · Помогает находить и устанавливать навыки агентов по запросам вроде «как сделать X»…
4 400 000 устан.
grill-memattpocock · Настойчивое интервью для доработки плана или дизайна.
1 600 000 устан.
hyperframesheygen-com · Обязательная точка входа для любых задач по видео, анимации и motion-графике в…
1 600 000 устан.
hyperframes-cliheygen-com · Цикл разработки HyperFrames CLI: init, add, render, preview, publish и другие команды.
1 600 000 устан.
agent-browservercel-labs · CLI для автоматизации браузера для ИИ-агентов: навигация по страницам, заполнение форм…
1 600 000 устан.
media-useheygen-com · Agent Media OS: единый навык для медиа в HyperFrames — BGM, SFX, изображения, голос, LUT.
1 500 000 устан.
hyperframes-registryheygen-com · Установка и подключение блоков реестра в композиции HyperFrames через add и catalog.
1 400 000 устан.
grill-with-docsmattpocock · Настойчивое интервью для доработки плана или дизайна, попутно создающее документацию (ADR…
1 300 000 устан.
improve-codebase-architecturemattpocock · Поиск в кодовой базе возможностей для углубления, визуальный HTML-отчёт о них и детальный…
1 300 000 устан.
tddmattpocock · Разработка через тестирование (TDD): red-green-refactor и интеграционные тесты.
1 300 000 устан.
Похожее в других разделах каталога

Соседние разделы каталога: возможно, нужный инструмент живёт там.

ui-ux-pro-maxnextlevelbuilder · Профессиональные знания по UI/UX-дизайну для ИИ-ассистентов программирования. Включает…
151 010 ★
waza-uitw93 · Создаёт выразительный UI продакшн-уровня для страниц, компонентов, типографики и…
8 комп.
claude2figmaanthropics · Проверка соответствия дизайн-системе для Claude Code и Figma: токены, компоненты, авто-QA.
38 комп.
designwithclaudeanthropics · 29 специализированных агентов по дизайну в виде slash-команд: визуальная иерархия…
38 комп.
hig-compliance-auditoranthropics · Аудит кода и дизайн-систем на соответствие Apple Human Interface Guidelines для SwiftUI…
38 комп.
jp-web-design-guardrailsanthropics · Правила для создания веб-интерфейсов под японский рынок: типографика CJK, высота строк…
38 комп.
pdf-forgeanthropics · Профессиональная генерация PDF на Tailwind CSS: слайды 16:9 и документы A4 с…
38 комп.
ru-textanthropics · Плагин качества русского текста. Автоматически активируется при выводе на русском и…
38 комп.
tailwind-design-systemanthropics · Построение и рефакторинг дизайн-системы для Tailwind CSS и Next.js.
38 комп.
videozeroanthropics · Создаёт 2D-анимации и объясняющие видео с кинетической типографикой и графиками в…
38 комп.

Лучшие ИИ-инструменты для генерации видео

Генерация видео

Подборка нейросетей для генерации и монтажа видео. Инструменты, которые превращают текст в готовые ролики, экономят часы на съемках и постпродакшне. Подходит для SMM-специалистов,

VEED.IOVeed
По запросу
5.0
MootionMootion
По запросу
5.0
FlyviFlyvi
Есть бесплатный тариф
4.9
Google Veo 3.1Google
Платно
4.9
Sora (OpenAI)OpenAI
Платно
4.9
PikaPika
Платно
4.9
captions space
Есть бесплатный тариф
4.8
Клайп
Есть бесплатный тариф
4.8
viralpulse.appViralpulse
По запросу
4.8
Viral Maker AIViral-maker
Есть бесплатный тариф
4.8

Лучшие ИИ-инструменты для генерации текста и копирайтинга

Генерация текста и копирайтинг

Подборка нейросетей для генерации текстов и копирайтинга. Сервисы, которые помогают создавать статьи, посты и рекламные объявления с нуля или по черновику, экономя часы рутинной ра

NeuroscribeNeuroscribe
Есть бесплатный тариф
5.0
GoGPTGogpt
По запросу
5.0
ChatsonicChatsonic
По запросу
4.9
НейроТекстерNeuro-texter
По запросу
4.9
ChatGPTOpenAI
По подписке
4.9
Редактум
Есть бесплатный тариф
4.8
ChadGPTChadgpt
По запросу
4.8
Cosmo ScribeCosmoscribe
Есть бесплатный тариф
4.8
Memo HelperCopilot33
По запросу
4.8
LibraChatLibrachat
Есть бесплатный тариф
4.8

Лучшие ИИ-инструменты для генерации изображений

Генерация изображений

Подборка нейросетей для генерации изображений от фотореализма до концепт-арта. Сервисы, которые экономят часы ручной работы, создавая визуал для блогов, рекламы и дизайна за минуты

MagviMagvi
По запросу
5.0
DALL-E 3OpenAI
По подписке
5.0
SupaLabSupalab
По запросу
5.0
Freestyling.aiFreestyling
Есть бесплатный тариф
4.9
ArtGeneration.meArtgeneration
Есть бесплатный тариф
4.9
BigjpgBigjpg
По запросу
4.9
Художник от VKVK
Бесплатно
4.9
Wonderink — ИИ-книги
Есть бесплатный тариф
4.8
Avato AI12ai
По запросу
4.8
Virton AIVirton
По запросу
4.8