3

Currently, I'm wondering about how many glyphs there can be in a TrueType (.ttf) font file. If I understand correctly, in a OpenType font, there can be up to 65,535 glyphs. But what about TrueType? My research shows conflicting information. Some sources say that the limit is only 256 glyphs, some say about 6000. Does anybody knows this or have a link to an article etc.? Thank you in advance!

1
3

65,535 glyphs, the same as an OpenType font.

This limit comes about because the TrueType maxp table (used to determine the memory requirements for a font) stores the number of glyphs in the font as a 16-bit unsigned integer, and the largest number representable as a 16-bit unsigned integer is 216 - 1 = 65,535.

The 'maxp' Table

Type Name Description
[...] [...] [...]
uint16 numGlyphs the number of glyphs in the font
[...] [...] [...]

[Apple TrueType documentation, "The 'maxp' table", my emphasis on the uint16. A uint16 is an unsigned 16-bit integer.]

The contention that a TrueType font is limited to 256 or ~6000 glyphs is easily disproven by the existence of usable TrueType fonts with many times that number of glyphs; for instance, GNU Unifont has 55,664 glyphs in one .ttf file (or 55,967 in the Japanese version).

1
  • 2
    Welcome to GD.SE!
    – Mensch
    Dec 13 '21 at 23:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.