设计与多媒体

Fonts

Choose and implement web typography avoiding common rendering, pairing, and hierarchy mistakes.

它能做什么

Display fonts (Abril Fatface, Bebas Neue, Lobster) are for headings 24px+ only—using them for body text destroys readability If a font looks decorative or has extreme thick/thin contrast, it's display—not for paragraphs Text fonts (Inter, Roboto, Georgia) are designed for 12-18px—use these for body…

技能文档

Display vs Text Fonts

  • Display fonts (Abril Fatface, Bebas Neue, Lobster) are for headings 24px+ only—using them for body text destroys readability
  • If a font looks decorative or has extreme thick/thin contrast, it's display—not for paragraphs
  • Text fonts (Inter, Roboto, Georgia) are designed for 12-18px—use these for body copy

Pairing Traps

  • Two fonts too similar look like a mistake—if you can't tell them apart instantly, use one font
  • Contrast in category works: serif heading + sans-serif body, or different weights of same family
  • Two decorative fonts clash—never pair Lobster with Pacifico
  • Safe pairs: same superfamily (Roboto + Roboto Slab) or proven combos (Playfair Display + Source Sans Pro)

Weight and Rendering

  • Thin weights (100-300) render poorly on Windows—avoid for body text, use 400+ for cross-platform
  • Light fonts on dark backgrounds look thinner—bump weight up one level for dark mode
  • Faux bold (browser-generated) looks wrong—only use weights the font actually includes
  • Check font has italic—faux italic (slanted roman) is noticeably worse than true italic

Line Height and Length

  • Body text needs 1.4-1.6 line-height—1.0 or 1.2 makes paragraphs unreadable walls
  • Headings need tighter line-height (1.1-1.3)—large text with 1.5 line-height has awkward gaps
  • Line length 45-75 characters max—wider than 75 chars causes readers to lose their place
  • Set max-width on text containers in ch units: max-width: 65ch

All Caps

  • ALL CAPS needs increased letter-spacing—without it, letters collide and look cramped
  • text-transform: uppercase + letter-spacing: 0.05em minimum
  • Never use all caps for more than a few words—extended caps text is significantly harder to read
  • Small caps (font-variant: small-caps) only if font supports it—faux small caps look amateurish

Widows and Orphans

  • Single word alone on last line of paragraph looks broken—adjust text or container width
  • text-wrap: balance (CSS) distributes lines more evenly in headings
  • text-wrap: pretty for body text—prevents orphans in browsers that support it
  • Manual fix: non-breaking space ( ) between last two words

Loading and Performance

  • font-display: swap prevents invisible text—without it, text is blank until font loads
  • Subset fonts to characters you need—Latin-only saves 60%+ over full Unicode
  • WOFF2 is the only format you need—universal support, best compression
  • Preload critical fonts: ``

System Font Stack

font-family: system-ui, -apple-system, BlinkMacSystemFont, 
  'Segoe UI', Roboto, sans-serif;
  • Zero load time, native look per platform—use for UI-heavy apps
  • system-ui is now widely supported—simpler than listing all fallbacks
  • Always end with generic fallback (sans-serif, serif, monospace)

Hierarchy Mistakes

  • Using too many font sizes—stick to a type scale (1.25 or 1.333 ratio), not random sizes
  • Headings not distinct enough from body—skip at least one scale step between h1 and body
  • Overusing bold—if everything is emphasized, nothing is emphasized
  • Color as only differentiator—size and weight should establish hierarchy before color

相关技能

Build polished, conversion-aware frontends with strong visual taste, clear hierarchy, and production-grade HTML/CSS/JS. Landing pages, dashboards, components...

59 次安装2 星标

围绕 CSS 机制排查问题并编写组件样式表,而不是凭感觉试错。

作者 Iván97 次安装5 星标

用可量化的层级、间距、字号、配色与版式规则,绘制并诊断视觉作品。

作者 Iván137 次安装5 星标

诊断并交付能在生产环境编译生效的 Tailwind v3/v4 标记、主题与构建配置

129 次安装5 星标

Use when users need visual direction, interface hierarchy, layout decisions, design specifications, or prototypes before implementing a Web or mini program UI.

61 次安装

让 Markdown 在 GitHub、MDX、Pandoc、文档站、Slack、Notion 等解析器中正确渲染,并定位修复具体损坏位置。

296 次安装7 星标

Iván 的更多技能

浏览全部技能

执行 Git 操作(提交、分支、合并、变基、冲突解决与恢复)时强制套用安全规则。

作者 Iván527 次安装31 星标

用可量化的层级、间距、字号、配色与版式规则,绘制并诊断视觉作品。

作者 Iván137 次安装5 星标

围绕 CSS 机制排查问题并编写组件样式表,而不是凭感觉试错。

作者 Iván97 次安装5 星标

以系统方式规划并执行自学:从出口测试倒推课程,加入间隔复习与刻意练习,产出可验证的迁移证据。

作者 Iván93 次安装3 星标

针对你的 Azure 订阅,做架构设计、故障排查、安全加固与成本优化

作者 Iván86 次安装2 星标

按配置的 JDK 版本诊断 Java 与 JVM 问题(从 NPE 到容器 OOM),给出可直接套用的代码与配置。

作者 Iván130 次安装9 星标