Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
FREEDOM251

Freedom251 › Blog › Chinese typography

How to Subset a Chinese Web Font to the Characters Your Site Uses

By Freedom251 Team · · 4 min read

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Collect every character your site can render, then use a font subsetter to keep those characters in a smaller webfont. For stable text, a corpus-specific subset is often simplest; for changing Chinese content, use broader coverage or split the font into Unicode-range files. Test the result on real pages and keep a fallback font stack.

1. Inventory every string the site can display

Start with the rendered text, not just the main article body. Include all pages and shared interface elements such as navigation, buttons, labels, form messages, error states, and punctuation. Include text created dynamically or loaded from a content system if it can appear to visitors.

As an Amazon Associate I earn from qualifying purchases.

For content that changes often, a one-time character list can become incomplete. Plan either to regenerate the subset when content changes or to serve broader font coverage.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

2. Build a deduplicated UTF-8 corpus

Extract the characters into a UTF-8 text file such as site-text.txt. Deduplicate the characters to avoid repeated entries, but preserve every distinct code point the site needs, including punctuation and any other scripts used alongside Chinese. Check the file for extraction errors before generating the font.

A character in the corpus can only be retained if it exists in the source font. fontTools’ subsetter accepts text files as input and offers options to fail when requested Unicode characters are missing; consult its documentation and the installed version’s help for the relevant options: fontTools subset documentation.

3. Generate the webfont subset

With fontTools installed, a basic command pattern is:

Rank #2
KAFENDA Chinese Character Practice Books, Practice Writing Chinese Character and Mandarin Phonetic Symbols/Bopomofo/Pinyin, Chinese Writing Book, Tian Zi Ge Notebook, Pack of 10
  • 【What You Get】 10 notebooks which practice both Chinese characters and Hanyu Pinyin, 14 sheets/28 pages each (except front and back covers).
  • 【Chinese Pronunciation System】Hanyu Pinyin uses Latin letters to mark character pronunciation and is fundamental for learning Mandarin.Kids in mainland China begin to study Chinese characters and Hanyu Pinyin from age 6.
  • 【No Fluorescent Agent】 The fluorescent agent is a chemical agent that is not easily decomposed by the human body, and its role is to whiten the paper. But this chemical builds up in the body and cause damage to the liver, especially in immature children.Obviously, no fluorescent agent is your first choice.
  • 【Size】 125mm × 175mm, 7 rows and 9 columns.
  • 【For Beginners】Our Chinese character exercise books are intended for beginners. They can not only be used for writing Chinese characters, but also for writing Pinyin, but not a Chinese‑language textbook or tutorial.

pyftsubset input.otf --text-file=site-text.txt --flavor=woff2 --output-file=site-subset.woff2

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Replace the input and output filenames with your actual files. fontTools supports TrueType/OpenType and WOFF inputs and can optimize output for webfont use. Check the installed version’s help and the source font’s format before running the command. Preserve the layout features and variation data your site requires, and enable missing-Unicode checks so a requested character absent from the source does not silently pass unnoticed. The tool’s available options are documented at fontTools subset documentation.

Rank #3
Chinese Calligraphy Paper Book, Chinese Writing Practice Book(Song Ci)
  • Package Include: 1 PCS of chinese character practice book of Song ci, Sheet size: 25 x 16 cm (9.84 x 6.30 inch); 24 Sheets(48 Page), Character size 0.8 x 0.8 cm.
  • Great Uses: The main purpose of practicing calligraphy copybooks is to help people improve their calligraphy skills and the aesthetic appeal of their writing. By repeatedly practicing the characters in the copybooks, one can enhance the standardization of character forms and the fluency of strokes, thereby improving writing proficiency. Additionally, calligraphy copybooks also contribute to cultivating good writing habits and enhancing aesthetic appreciation.
  • Calligraphy Paper Book Materials: This Chinese calligraphy paper book is made from high-quality eye-friendly paper, featuring clear grey characters and crisp red vertical lines, ideal for practicing with a pen. Its design facilitates precise handwriting practice, emphasizing legibility and stroke consistency, making it an excellent choice for learners and enthusiasts alike.
  • The Best Gift Choice: As a gift, Calligraphy Paper Book is a beautiful and meaningful choice. Whether given to family,friends,or a significant other, Chinese Writing Practice Book can be a special gift.
  • Sale Service: We are committed to providing efficient and thoughtful after-sales support.

4. Choose how to deliver the subset

Approach Best fit Trade-off
One corpus-specific subset Stable text, such as a known campaign, logo, or small static site New characters need a rebuilt subset or will use a fallback font
Several Unicode-range subsets Broader or changing text where the font is divided into codepoint ranges CSS ranges and file coverage need careful testing
Google Fonts request with text= Known text when the chosen family is available through Google Fonts Depends on the hosted service and request; inspect the returned CSS and verify coverage

One local subset with @font-face

For a single generated file, define an @font-face rule with its source URL and a suitable font-display value, then include the font in the site’s font stack. Keep fallback fonts so text remains readable if the webfont fails to load or lacks a character.

Multiple files with unicode-range

For a sliced font, declare a separate face for each file and assign each an appropriate unicode-range. The range tells the browser which characters a face is intended to serve; it does not create glyphs. Under the CSS Fonts specification, the effective character map is the intersection of the declared range and the actual character map in that font file: W3C CSS Fonts Module Level 3.

Google Fonts describes a similar sliced-file delivery approach in which browsers can request relevant pieces according to Unicode ranges: Google Developers Blog: Google Fonts launches Korean support. Do not copy a generic range and assume it covers your content or the regional glyph forms you need. Define ranges from your actual requirements, then inspect the font’s coverage.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Google Fonts with text=

When the needed text is known and the family is available from Google Fonts, its API supports a text-specific request. Google says this can reduce file size by up to 90% in some cases; that is a vendor claim, not a guaranteed result for any particular Chinese font or site. See Google Fonts API getting started.

Best Value
Bao Bao Learns Chinese Vol. 1, Bilingual Chinese Sound Book for Toddlers | Bilingual Mandarin Baby Books w/ PinYin, Chinese Learning Books for Kids, Interactive Musical Board Books & Learning Toys 1-3
  • BILINGUAL CHINESE-ENGLISH LEARNING BOOK. A bilingual baby book introducing Mandarin Chinese and English, supporting early language, vocabulary, and listening skills. Build Mandarin during early years when babies and toddlers learn best through songs, repetition & interactive play.
  • SOOTHING REAL MOM VOICE – NOT ROBOTIC AUDIO. Unlike most Chinese sound books, this musical baby toy features a real mom singing in a gentle, calming voice — not electronic or robotic — creating a comforting, natural listening experience for babies and toddlers.
  • INTERACTIVE SOUND BOOK WITH BABY-SAFE BUTTONS. Press chunky, easy-to-use buttons to play each Chinese nursery rhyme twice with music, making this an engaging interactive sound book for babies, toddlers, and preschool kids.
  • FULL-LENGTH CHINESE SONGS & NURSERY RHYMES. Plays real, full-length Chinese songs — not short clips — helping babies and toddlers learn Mandarin naturally through repetition, rhythm, and music.
  • FOR BABIES, TODDLERS & PRESCHOOL KIDS (1–3+). Perfect for infants, toddlers, boys and girls ages 1–3, this toddler sound book supports early childhood development through play-based learning.

Google’s documentation also explains that browsers supporting unicode-range select supported subsets for the rendered text and ignore the older subset= parameter. With text=, subset= is unnecessary. Check the generated CSS and resulting character coverage rather than relying on a request parameter alone.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

5. Test coverage on real pages

Load the generated or hosted font on representative pages. Check the full inventory, including punctuation, interface text, dynamic content, and characters likely to be added later. Look for missing-glyph boxes and for characters unexpectedly rendered by the fallback font. Repeat the check at the weights and styles the site actually uses.

  • If a character is missing, verify that it was extracted into the corpus and that the source font contains it.
  • If it is in the font file but does not appear as intended, inspect the @font-face declaration, the relevant unicode-range, and the loaded file.
  • If the site’s content, font, weights, scripts, or required characters change, rebuild or revalidate the subsets.

How to choose a strategy

Use a single corpus-specific file when the text is stable and you can rebuild it when needed. Prefer range-based files or a suitable hosted font request when coverage must accommodate a larger or evolving set of text. Google’s web.dev guidance recommends Unicode-range subsets and pyftsubset as practical ways to reduce webfont size: Reduce web font size. Google Fonts’ subset definitions are organized around code points and may include ranges, exclusions, and named Unicode blocks or scripts: Google Fonts Unicode subset definitions. Use those as descriptions of subset organization, not as a substitute for checking the actual font and site corpus.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Chinese typographyCSSFontToolsWeb Fontsweb performance

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.