freetype-devel
[Top][All Lists]
Advanced

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

Re: [Devel] OpenType futures


From: Werner LEMBERG
Subject: Re: [Devel] OpenType futures
Date: Thu, 12 Aug 2004 01:31:58 +0200 (CEST)

> We have three operations that need to know the details about the
> data structures for individual lookups:
>  
>  - The code to validate the table
>  - The code to parse the table (which is a subset of validation)
>  - The code to apply the lookup to glyphs
> 
> No matter how we group them it seems a bad idea to put different
> parts of these operations in different libraries.  Adding support
> for new lookups or fixing bugs in existing lookups might well then
> require fixes in two places and two releases.

Maybe a misunderstanding.  As you've mentioned in another mail, ICU
just parses the table without validating at all.  What I suggest is
that the otlayout library opens a font and asks for validation of the
OpenType tables in a font, then the otlayout library requests the raw
OpenType tables.  The validation happens only once; in case a font has
to be closed and reopened, otlayout could cache the validation result.
I don't think that the speed impact of validating is serious, but it
makes coding the otlayout library simpler since you can throw out all
runtime validity tests.

IMHO, validation should be done completely separated from parsing;
similar to ICU, I imagine that the otlayout library parses the
OpenType tables on the fly which means that during the lookup process
only a small part of the OpenType tables will be parsed -- I don't
consider parsing as a subset of validation at all.  Handling OpenType
tables similar to FreeType 1 and doing validation too is nonsense, of
course.

Both Qt and Pango have working OpenType engines, and I don't think
that the OpenType standard will change significantly in the near
future.  With other words, producing a short term solution doesn't
appear very urgent to me.  I really suggest to do it the `right' way,
probably at the cost that it will take more time to make it work.  The
output of the new code can always be compared with the results of Qt
and Pango (and ICU, of course), which should help a lot.

I'll probably start with a clean-up of the validation code in
freetype2/src/otlayout if time permits; the first step is probably
moving everything to a new directory `otcheck'...


    Werner



reply via email to

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