freetype-devel
[Top][All Lists]
Advanced

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

[ft-devel] Re: Bad Font


From: Werner LEMBERG
Subject: [ft-devel] Re: Bad Font
Date: Sun, 13 Mar 2005 08:15:03 +0100 (CET)

[please CC your mails to freetype-devel]

> I found that ... "This version of Visual C++ is not conformant with
> the C99 standard..." - it's quotation from VC doc. So .. I can't use
> new Preprocessor features

I don't think that `argument prescan' is a new feature -- a test with
`-std=c89' (to select ANSI C 89 with gcc + cpp) gives no warning or
error.  It rather seems that Microsoft's preprocessor is buggy, or you
have to select certain options to make it behave as expected.

> [...]  ==here I took error code =2 ('cause font doesn't have `head'
> font table and `sfnt_dir_check( stream, offset, sfnt->num_tables )'
> returns error=2 (tag `head' was nor found).

Oops!  Suddenly I get the same error.  It seems that I've tested a
different font -- I'm very sorry.

You are right.  This font doesn't have a `head' table, so it isn't a
valid OpenType font.  It seems that Adobe starts to `abuse' the SFNT
format while embedding fonts in PDF documents.  I can imagine that
they do it to avoid the inclusion of complete fonts into PDF documents
(for copyright reasons) which could be extracted with PDF tools.

Given that David Somers is interested to support fonts with the new
SING table -- which also don't have a `head' table -- I wonder how to
implement that properly.

What about the following: If the font uses the SFNT format, check the
existence of the `head' table.  If it is in the font, treat it as
usual.  Otherwise, if there is a `CFF ' table, extract the CFF data
and handle it as a pure CFF.  If a `SING' table is present, also use
the data from `cmap' table.


    Werner




reply via email to

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