On Tue, Nov 27, 2012 at 04:00:49PM +0000, Jonathan Kew wrote: > On 27/11/12 15:37, Khaled Hosny wrote:> On Mon, Nov 26, 2012 at > 02:03:15PM +0200, Behdad Esfahbod wrote: > >> On 12-11-24 10:58 PM, Khaled Hosny wrote: > >>> On Sat, Nov 24, 2012 at 01:05:26AM -0500, Behdad Esfahbod wrote: > >>>> On 12-11-23 07:42 PM, Khaled Hosny wrote: > >>>> > >>>>> (Background: I’m almost done with porting XeTeX from ICU > LayoutEngine to > >>>>> HarfBuzz, one of the few things remaining is getting optical > size. The > >>>>> current code uses some internal LE API and I want to move away > from this > >>>>> as possible). > >>>> > >>>> Sure, I'll implement it in HarfBuzz for you! > >>> > >>> Great! > >> > >> Done. Untested though. Let me know if it works! > > > > Thanks Behdad. It seems that looking for ‘size’ feature under default > > script does not work, with the attached patch which makes it check all > > GPOS features, things work fine. > > > > Now what remains is handling fonts with broken ‘size’ feature that AFDKO > > used to make prior 2006, but I’m yet to find documentation for it (Adobe > > is said to have sent some explanation for a heuristic to handle broken > > ‘size’ features to OpenType mailing list somewhere in 2006, but I don’t > > have access to list archives). > > > > I don't seem to have that mail on hand either, but IIRC the existing > xetex code includes heuristics to handle this, so you could probably > just use that as a guide.
I was hoping for some plain language :) anyway the relevant part of the old code is: https://github.com/mojca/xetex/blob/15b7827a5d8344c685fe27128cd4a03a729e1ee2/texk/web2c/xetexdir/XeTeXFontMgr.cpp#L492 I tried to replicate this in HarfBuzz but I couldn’t find a simple way to get the FeatureList offset and pass it to get_feature_params() (and all non-simple ways I came up with failed of course :). Regards, Khaled _______________________________________________ HarfBuzz mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/harfbuzz
