Page 1 of 1

The smallest valid font for Windows

Posted: Mon Feb 03, 2014 12:25 pm
by Erwin Denissen
Most people don't care about the size of their fonts, but sometimes there is need for a small font.

FontCreator will try to keep the file size as low as possible, so to some extent it can be used for this purpose.

To really, really, make a font with the smallest file size, it will become a font which can't be used to actually display text, as we need to make it as bare as possible but still obey all requirements as found in the TrueType/OpenType specifications.

There are several specific parts that need attention:

The font naming values
Since a font needs to have a name, we will use a single character (s for small).

A glyph with an outline
We will keep the first glyph as the .notdef glyph, and will add another glyph mapped to the hyphen character. We avoid complexity as that would only increase the font file size, so the glyph will only have a single rectangle.

No advanced features
All things that are not required will be avoided, so we will not include kerning, hinting, or OpenType layout features.

The font generated by FontCreator 7.5 contains 696 bytes:
(696 Bytes) Downloaded 327 times
We can even reduces the size some more by using FontCreator 6.5 as that version allows you to further fine-tune platform specific data. That font file has 552 bytes and is still valid according to Windows. This file can both be downloaded here:
(552 Bytes) Downloaded 387 times
I'm sure there are some more ways to squeeze a byte or two (change the outline from a rectangle to a triangle), but 552 bytes is close to the limit for a valid Windows font. Excluding the internal OS/2 and post tables is another option, but then you end up with a legacy font which is beyond the limit in my opinion.

The main reason version 7.5 of our font editor produces slightly larger fonts, is the fact it is designed with the latest versions of the OpenType font specification in mind. However that is not the only reason. Since we continually improve our software, making it more intuitive, we also strive to simplify complex/technical parts of font design, which means you are less likely to make mistakes, and have more time to complete your fonts.

Re: The smallest valid font for Windows

Posted: Mon Feb 17, 2014 10:20 am
by Erwin Denissen
Due to recent insights (see the discusion at the Typophile forum), I've further reduced the font file size.

As mentioned in my first post, the size can be further reduced by changing the outline from a rectangle into a triangle.

jasonc has a good point, as you can indeed save some bytes if you can store positions, (actually offsets) of coordinates in a byte instead of a short (two bytes). I therefor changed the units per em from 2048 to 64, and then rescaled the triangle so it benefits from this.

The new font file is 544 bytes.
(544 Bytes) Downloaded 308 times
This file obeys to the official standard, and will work just fine on Windows .
smallestfont.png (9 KiB) Viewed 3041 times
Again you could save an additional 110 bytes by excluding the OS/2 and post tables, but you will end up with a "legacy font" which is not guaranteed to work for the next decade.

Re: The smallest valid font for Windows

Posted: Mon Feb 17, 2014 10:35 am
by Bhikkhu Pesala
I am not sure what the point of all this is, but presumably you could reduce the triangle to a single node by deleting two of the nodes.

Re: The smallest valid font for Windows

Posted: Mon Feb 17, 2014 11:24 am
by Erwin Denissen
For most people there is no use for this, so feel free to ignore this post.

Leaving just a single node would save another 4 bytes, reducing the file size to 540 byes.
(540 Bytes) Downloaded 335 times
And without nodes the size would become 524 bytes, but then the font file in no longer valid according to Windows.

Re: The smallest valid font for Windows

Posted: Wed Jun 12, 2019 3:05 pm
by Erwin Denissen
I've made an even smaller font, 440 bytes! It is still valid in Windows 10, but it will no longer work in a web browser (Firefox).
(440 Bytes) Downloaded 89 times
So the above 540 bytes font is still the smallest font known today, that works in both Windows (Windows 10) and Web browsers (Microsoft Edge, Firefox).

Re: The smallest valid font for Windows

Posted: Mon Oct 07, 2019 4:26 pm
by the.legend
Congrats, Erwin: you made history.

As someone said, "It is one small font for man..."


Olivier Legendre