# Font subsetting

**URL:** <https://zola.discourse.group/t/font-subsetting/2883>\
**Category:** Feature requests\
**Created:** [November 29, 2025, 9:22pm UTC](https://zola.discourse.group/t/font-subsetting/2883 "2025-11-29T21:22:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dimev](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/dimev/32/1562_2.png) [@Dimev](https://zola.discourse.group/u/Dimev)\
**Post date:** [November 29, 2025, 9:22pm UTC](https://zola.discourse.group/t/font-subsetting/2883/1 "2025-11-29T21:22:28Z")

</div>

Is there a way to subset fonts in order to reduce the size of the font sent over the network?

I’ve previously used [the `hb-subset` crate](https://docs.rs/hb-subset/latest/hb_subset/) for this in one of my own projects, but I’m not sure how I can apply that to zola’s output.

---

<div class="post-metadata">

**Author:** ![jonhurst](https://avatars.discourse-cdn.com/v4/letter/j/b782af/32.png) [@jonhurst](https://zola.discourse.group/u/jonhurst)\
**Post date:** [November 30, 2025, 8:01am UTC](https://zola.discourse.group/t/font-subsetting/2883/2 "2025-11-30T08:01:36Z")

</div>

> **[—fontTools Documentation— — fontTools Documentation](https://fonttools.readthedocs.io/en/latest/)**

In particular:

> **[subset: Generate subsets of fonts or optimize file sizes — fontTools...](https://fonttools.readthedocs.io/en/latest/subset/index.html)**

---

<div class="post-metadata">

**Author:** ![Dimev](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/dimev/32/1562_2.png) [@Dimev](https://zola.discourse.group/u/Dimev)\
**Post date:** [December 1, 2025, 11:08am UTC](https://zola.discourse.group/t/font-subsetting/2883/3 "2025-12-01T11:08:16Z")

</div>

How does this work with HTML? doesn’t look like it can properly parse HTML files.

---

<div class="post-metadata">

**Author:** ![jonhurst](https://avatars.discourse-cdn.com/v4/letter/j/b782af/32.png) [@jonhurst](https://zola.discourse.group/u/jonhurst)\
**Post date:** [December 1, 2025, 12:33pm UTC](https://zola.discourse.group/t/font-subsetting/2883/4 "2025-12-01T12:33:21Z")

</div>

Personally, I just pick out the Unicode ranges I need for the whole site (usually U-0000 to U-00FF, plus anything incidental from other ranges), or if it is just for a phrase for some title text or suchlike you can tell it to just pick the glyphs for that phrase by giving it the actual text.

You could also just feed it the output html files as text files if you wanted – it would only add a few ASCII characters from the tags. My font files usually end up around 15kB, which, combined with preloading and immutable caching is more than good enough to use –font-display: block with no discernible pause; optimising beyond that is definitely not worth the effort.
