[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft-devel] A question about freetype and harfbuzz
From: |
Behdad Esfahbod |
Subject: |
Re: [ft-devel] A question about freetype and harfbuzz |
Date: |
Tue, 29 May 2007 00:16:31 -0400 |
On Tue, 2007-05-29 at 11:52 +0900, address@hidden wrote:
> 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.
Most users don't have to deal with out-of-range glyphs at all. What
happens is that they will see a box (glyph 0) instead. Font developers,
ditto, they will see it and fix the font. Lets first identify who the
target of the validator is. For validation-before-layout case, I really
don't think using a validation code path separate from the actual layout
path makes sense.
> 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.
You can follow HarfBuzz activity on the harfbuzz mailing list.
> 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?
No idea. OTLS's API is not publicly documented.
> >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:
Apparently our opinions are different, but I don't see any problem with
that. I'm putting my touch-typing fingers where my mouth is and
developing an OpenType Layout engine that I think is right. I'll come
back with a comparison when I'm done. Before then, there's not much to
talk about.
I have the fundamental problem of doesn't-belong-in-a-rasterizer though.
If one finds a font that crashes or doesn't work with the HarfBuzz
Layout engine, they should be able to fix it in HarfBuzz. With the
validator code in freetype, they may need to fix FreeType. To me, it's
like, donno, putting an h&j engine in FreeType. It sure is text layout,
and works nearly with fonts, but it's not rasterization.
> 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
--
behdad
http://behdad.org/
"Those who would give up Essential Liberty to purchase a little
Temporary Safety, deserve neither Liberty nor Safety."
-- Benjamin Franklin, 1759