Skip to content
BENIBIX Learn

Web Font

Design🔤 TypographyType Selection

Also known as Webfont, @font-face, WOFF2

A font file sent with a web page. Text then shows in that exact font.

Think of it like

It is like taking your own pens to school. You do not need to borrow one.

Example

A shop's site loads its brand font from its own server. On every phone, the headings look just like the printed catalog.

Why it matters

Web fonts let a brand look the same on every device, at the cost of some load time.

Definition

A web font is a font file a website sends to the browser, so text shows in that exact font. Without it, the browser can only use fonts already on the reader's device. The file is loaded with a CSS rule called @font-face. The usual format today is WOFF2, which is small. Each extra font file adds a little load time.

Example code

css
@font-face {
  font-family: "Brand Sans";
  src: url("/fonts/brand-sans.woff2") format("woff2");
  font-display: swap;
}
font-display: swap shows backup text at once, then switches when the font arrives.

Common mistake

Loading many weights you never use. Each one slows the first view of the page.

Key takeaways

  1. 1
    Sent with the page. Not just fonts on the device.
  2. 2
    WOFF2 is the format. Small and widely supported.
  3. 3
    Load only what you use. Each file costs time.

Learn it properly