freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] A question about freetype and harfbuzz


From: mpsuzuki
Subject: Re: [ft-devel] A question about freetype and harfbuzz
Date: Tue, 29 May 2007 11:52:02 +0900

Dear Sirs,

Before all, Werner asked the question that I wanted to ask,
thank you very much.

On Mon, 28 May 2007 08:42:10 +0200 (CEST)
Werner LEMBERG <address@hidden> wrote:
>> # Personally, I'm one of the people who want FT2 to have support for
>> # text layout feature.  I guess I feel sympathy with you.  But we
>> # are minority among FT2 developers :-).
>
>Perhaps a misunderstanding: I don't object to make FreeType handle
>OpenType tables (see the validating stuff which we have developed
>together).

I'm glad to hear that. In addition, I'm not sure if
validating OT-tables only is sufficient. For example,
otvalid checks whether the substituted glyph ID by
"GSUB" is within the range declared by "maxp".
I suppose HarfBuzz lets the handling of too-large
glyph ID to the clients. I think it's reasonable
because HarfBuzz parses and interprets only OT-tables.
But from the client viewpoint, it's slightly
inconvenient to check the glyphID by itself,
after choosing a font to use.

On Mon, 28 May 2007 17:37:03 -0400
Behdad Esfahbod <address@hidden> wrote:
>There is further work to make HarfBuzz *the* shaper API for Linux
>systems.  That is, again, Pango, Qt, ICU, Scribus, OO.o, etc all will be
>using HarfBuzz.  This has been discussed extensively at the Text Layout
>Summit in Boston, and discussion is going on on the harfbuzz list and
>will be at the next Text Layout Summit at aKademy in a few weeks.

Pango had already included HarfBuzz (as OpenType parser).
I suppose Qt is also moving to adopt HarfBuzz. Although
I could find the developers of other softwares (ICU,
Scribus, OO.o) in Text Layout Summit 2006, I don't know
the status and directions of them. Please let me know
more about the migration movement. At present, Text Layout
Summit 2007 page:

http://www.freedesktop.org/wiki/TextLayout2007?highlight=%28%28HarfBuzz%29%29

has only 1 agenda of HarfBuzz.

On Mon, 28 May 2007 18:05:19 -0400
Behdad Esfahbod <address@hidden> wrote:
>On Mon, 2007-05-28 at 23:48 +0200, Werner LEMBERG wrote:
>> > [...] I believe that any OpenType Layout engine should do its own
>> > validation,
>> 
>> Why?  What is bad about letting FreeType doing that?  Afterwards you
>> can omit any error handling...
>
>For one thing, FreeType is not necessarily available.  We are removing
>FreeType dependency from HarfBuzz, and Qt wants to use HarfBuzz on
>Windows too.

I think it's slightly different issue, because FT2
does work on Windows. I suppose Qt wants to use
Windows native rasterizer instead of FT2, but Qt
wants to use HarfBuzz shaping engine? Using OTLS
is difficult?

>The other reason is that, for example, HarfBuzz is forgiving about some
>problems.  A nonexistent lookup index for example is automatically
>ignored.  Or a subtable that is not ever referenced can have an
>(invalid) offset of zero and it will still work.  These kind of
>exceptions were added to make fonts that already worked with Windows
>work with Pango too.

Hmm, the severity of ftvalid is controlled by validation
level, although the fine tuning of default level for
otvalid is not finished. Considering the fact most Open
Type layout engine follows the behaviour of OTLS (to
share existing OpenType font resources), I think it's
not disadvantage of layout-engine-independent validation
approach, like ftvalid. Rather, I think the OT-table
validation in HarfBuzz will be one side of its runtime
failsafe mechanism. I remember what I wrote 2 years ago:

http://lists.gnu.org/archive/html/freetype-devel/2005-11/msg00084.html
>Another reason is that: if the text layout engine includes
>its own validator, it will be runtime checking to avoid
>from wrong behaviour and crashing, and won't validate
>unaccessed parts. It's not easy to use text layout functions
>to crawl all features declared in the OpenType/TrueTypeGX.

Regards,
mpsuzuki




reply via email to

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