freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] FreeType unable to open some fonts which can be opened by


From: Werner LEMBERG
Subject: Re: [ft-devel] FreeType unable to open some fonts which can be opened by some font viewers
Date: Sat, 24 Dec 2016 11:09:01 +0100 (CET)

> Here is the text from the xls file (extracted via
> xls2csv-catdoc(1)):

Thanks a lot!

> "File Name",
>         "Windows 98 Built-in Font Viewer",
>             "Windows 10 Built-in Font Viewer",
>                 "macOS 10.12.2 Built-in Font Viewer",
>                     "FreeType 2.7",
>                         "Num Faces",
>                             "Face Index",
>                                 "Error Code"
>

Some comments to the fonts.

> "1.otf","×","×","×","×","1","0","144"
> "7.ttf","×","×","×","×","1","0","144"
> "13.ttf","√","×","×","×","1","0","144"

These fonts are invalid, in a very stupid manner: They are CFF fonts,
and if you replace the file signature contained in the first four
bytes with `OTTO', as mandated in the OpenType specification for CFF
fonts, they get accepted without complaints.

I won't change this.  Which platform or program does accept these
fonts?

> "2.otf","×","×","×","×","1","0","2"

Broken; `CFF' table is too short, AFAICS.

> "3.otf","×","×","×","×","1","0","8"

Broken; the `CFF' table contains an invalid index to the global
soubroutines.

> "4.otf","×","√","×","×","1","0","6"

The font is broken; it contains a call to `StdHW' while the argument
stack is empty.  I have no idea why Windows 10 accepts this old font.

> "5.ttf","×","×","×","×","1","0","8"

Broken; `head' table only contains zero values; it seems that there
was a transmission error in the course of time, zeroing out the end of
the font file.

> "6.ttf","×","×","×","×","1","0","3"

Broken `hmtx' table.

> "8.ttf","×","×","√","×","1","0","3"

Severely broken (for example, the `hmdx' table is invalid).  No idea
why this font can be displayed on MacOS.

> "9.ttf","×","√","√","×","1","0","8"

Invalid `loca' size.  This is a harmless error and FreeType can
sanitize it, so this font gets now accepted.

> "10.ttf","×","√","√","×","1","0","2"

Fixed in git.  The font has an invalid `version' field in the `EBLC'
table (I guess it uses the wrong byte order for the four bytes), but
saniziting was easy.

> "11.ttf","×","√","√","×","1","0","3"

This font is `Arial' version 1.00 – I can't believe this is the
original version, right?  It has a wrong `version' field in both the
`hdmx' and the `LTSH' table...  Given that `hdmx' tables are an
endangered species, I've decided to ignore the `version' field; this
font can now be loaded with FreeType git.

> "14.ttf","√","×","×","×","1","0","147"

Corrupted font file, providing an `(mtx' table instead of `hmtx'.

> "15.ttf","√","×","×","×","1","0","2"
> "26.ttc","√","×","×","×","4","0","2"

Broken `EBLC' table.  This is admittedly slightly problematic:
Currently, FreeType assumes (in most cases) that a table present in
the font must be valid.  A better solution would be to ignore invalid
tables that are optional.  I guess this works with Win98 because EBLC
isn't supported on that platform, so the table gets completely ignored
and thus making the font load.

> "22.ttc","×","×","×","×","3","0","8"

The `loca' table seems to be severely broken.  FreeType (now) loads
the font, but it doesn't display any glyphs due to this error.

> 24.ttc

Broken; no valid table directories for the TTC.

> "30.fon","×","×","×","×","4","0","2"
> "32.fon","×","×","×","×","5","0","2"
> "33.fon","×","√","×","×","1","0","2"
> "34.fon","×","√","×","×","2","0","2"
> "39.fon","√","√","×","×","4","0","2"

FreeType can't handle this WinFNT format (0x100) – I don't have any
information on this format.

> "36.fon","√","×","×","×","7","3","2"
> "37.fon","√","×","×","×","8","7","2"

Works, but the font is corrupted, displaying garbage for some pixel
sizes.

> "38.fon","√","√","×","×","1","0","2"

FreeType doesn't support vector FNT files.  Volunteers to provide
support are welcome :-)

> "12.ttf","√","×","×","×","1","0","3"
> "16.ttf","√","×","√","×","1","0","3"
> "17.ttf","√","√","×","×","1","0","8"
> "18.ttf","√","√","×","×","1","0","3"
> "19.ttf","√","√","√","×","1","0","2"
> "20.ttf","√","√","√","×","1","0","3"
> "21.ttf","√","√","√","×","1","0","8"
> "23.ttc","×","×","√","×","6","0","8"
> "25.ttc","×","√","√","×","6","0","8"
> "27.ttc","√","×","√","×","6","0","8"
> "28.ttc","√","√","√","×","6","0","8"
> "29.ttc","√","√","√","×","11","0","8"
> "31.fon","×","×","×","×","5","4","2"
> "35.fon","√","×","×","×","4","3","2"

Works with FreeType git, some of them due to fixes from the latest
commits.


    Werner

reply via email to

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