CSS unicode-range
CSS @font-face descriptor specifying which Unicode code points a font should cover. Enables downloading only the font subset needed for the page content, improving load performance.
What is the CSS unicode-range Descriptor?
The CSS unicode-range descriptor, used inside @font-face rules, specifies the range of Unicode code points for which a font resource should be downloaded and applied. It is a critical performance optimization tool: when a browser encounters a @font-face declaration with a unicode-range descriptor, it only downloads the font file if the page actually contains characters that fall within the declared range. If the page has no such characters, the font is never fetched.
Without unicode-range, a page that includes multiple @font-face declarations for Latin, Greek, Cyrillic, and CJK would trigger all font downloads on page load, even if the page contains only Latin text.
Syntax
The unicode-range value accepts one or more comma-separated ranges in the following formats:
@font-face {
font-family: "MyFont";
src: url("myfont-latin.woff2") format("woff2");
/* Single code point */
unicode-range: U+0041;
/* Range */
unicode-range: U+0020-007F;
/* Wildcard range (? matches any hex digit) */
unicode-range: U+26??;
/* Multiple ranges */
unicode-range: U+0020-007F, U+00A0-00FF, U+0100-017F;
}
Google Fonts Usage
Google Fonts uses unicode-range to serve optimally subsetted fonts for each script, dramatically reducing file sizes. Instead of one monolithic font file, Google Fonts serves a CSS file that declares many small @font-face blocks, each covering a different Unicode range:
/* Google Fonts pattern (simplified) */
@font-face {
font-family: "Noto Sans";
src: url("noto-latin.woff2") format("woff2");
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, ...;
}
@font-face {
font-family: "Noto Sans";
src: url("noto-cyrillic.woff2") format("woff2");
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, ...;
}
@font-face {
font-family: "Noto Sans";
src: url("noto-greek.woff2") format("woff2");
unicode-range: U+0370-03FF;
}
A page in English only downloads noto-latin.woff2. A page in Russian additionally downloads noto-cyrillic.woff2. The browser makes the decision autonomously by scanning the page's text content against each declared range.
Performance Optimization
unicode-range is especially powerful for CJK content. A full CJK font can be 5–20 MB, but a typical Chinese web page uses only a few hundred distinct characters. Combined with font subsetting tools, unicode-range enables:
- Script subsetting: Separate font files per script (Latin, Cyrillic, CJK, Arabic)
- Glyph subsetting: Font files containing only the characters actually used on the page
- Progressive loading: Critical characters load first, rare characters load on demand
Quick Facts
| Property | Value |
|---|---|
| CSS property type | Descriptor (inside @font-face) |
| Download trigger | Font only downloaded if page contains matching characters |
| Syntax | U+XXXX, U+XXXX-YYYY, U+XX?? (wildcard) |
| Google Fonts | Uses 5–15 @font-face blocks per font family |
| Browser support | All modern browsers (since ~2014) |
| Key benefit | Eliminates unnecessary font downloads |
| CJK impact | Reduces CJK font downloads from 20MB to <100KB per page |
관련 용어
타이포그래피의 더 많은 용어
Em: 폰트 크기와 같은 너비. En: Em의 절반. 엠 대시 너비, 엠 …
The mechanism by which a rendering engine substitutes glyphs from a secondary …
Modern font format developed by Microsoft and Adobe supporting up to 65,535 …
문자가 오른쪽에서 왼쪽으로 흐르는 텍스트 방향. 아랍어, 히브리어, 타아나 문자 등에서 사용되며, …
Fonts downloaded by the browser to render text, declared via CSS @font-face. …
앞의 기본 문자에 붙어 수정하는 문자. 일반 범주: Mn(비공백), Mc(공백 결합), Me(둘러싸기). …
가로 또는 세로 공간을 표현하지만 눈에 보이는 글리프가 없는 문자. 유니코드는 서로 …
폰트가 렌더링하는 문자의 시각적 표현. 하나의 문자가 여러 글리프를 가질 수 있고(합자, …
전진 너비가 0인 문자 — 렌더링에서 보이지 않지만 텍스트 동작에 영향을 줍니다. …
문장의 일부를 구분하거나 범위를 나타내는 데 사용되는 구두점. 유니코드는 하이픈(‐), 엔 대시(–), …