freetype-devel
[Top][All Lists]
Advanced

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

Re: Progress update on adjustment database


From: Werner LEMBERG
Subject: Re: Progress update on adjustment database
Date: Mon, 23 Oct 2023 16:54:25 +0000 (UTC)

> I need some help figuring out how to handle the type 3 lookups.
> I need to do 2 things:
> - Figure out which features contain type 3 lookups
> - Determine the number of variations the feature contains

Simply add all glyphs a type 3 lookup provides to the list of glyphs.
No further special handling is necessary.

> For the second one, this function seems relevant:
> https://harfbuzz.github.io/harfbuzz-hb-ot-layout.html#hb-ot-layout-feature-with-variations-get-lookups
> But this returns a list of lookups if you already know the variation
> index, when I want to know the range of possible variation indices.

This function is not relevant – it's about variation fonts, see

  
https://learn.microsoft.com/en-us/typography/opentype/spec/chapter2#device-and-variationindex-tables

> hb_ot_layout_lookup_get_glyph_alternates
> also looks useful and could partially solve the problem.

This is the right function, I think.

> With this function, I can handle the type 3 lookup cases in
> isolation, only finding the glyphs directly resulting from the
> feature and no further transformations.

Sounds sufficient to me.

> Also, can I have some advice on testing the code?  How should I make
> these changes bulletproof?

Alas, we don't have a testing framework for such issues.  However, as
soon as your code lands in 'master', the Chromium people and other
parties run their fuzzers on FreeType, which usually unveils memory
leaks or segfaults quite soon.  They also do intensive comparison of
graphic images; however, I don't know whether they use the auto-hinter
for that.


    Werner

reply via email to

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