freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft-devel] [Doubt] About reading a font file to check for its driver


From: Werner LEMBERG
Subject: Re: [ft-devel] [Doubt] About reading a font file to check for its driver.
Date: Tue, 08 May 2018 07:13:10 +0200 (CEST)

>> Most font formats have magic numbers. The drivers will fail just as
>> quickly as you check file name.
> 
> What are these magic numbers?

For example, OpenType/CFF fonts from Adobe have `OTTO' as the first
four bytes.

> where can I find details about magic numbers.

They are defined in the respective font format specifications.

> But, we are using the filename for just checking which driver to use

FreeType doesn't do that – it is your suggestion to add such a
feature, isn't it?

> then how come it will fail?

Looking at the file name extension could only speed up the selection
of the first driver that checks the font.  FreeType will still have to
try all other font drivers on the font in case the first driver fails.


    Werner

reply via email to

[Prev in Thread] Current Thread [Next in Thread]