[HarfBuzz] harfbuzz work

Behdad Esfahbod behdad at behdad.org
Thu Aug 6 15:03:27 PDT 2009


On 08/06/2009 03:47 PM, Jonathan Kew wrote:
> On 5 Aug 2009, at 22:40, Behdad Esfahbod wrote:

>>>> * Provided a small HB-friendly cmap-reader (currently handles formats
>>>> 4 and 12 only).
>>
>> I thought a lot about whether we want to deal with cmap directly.
>> There are multiple reasons not to:
>>
>> - fontconfig for example, can handle non-Unicode cmap's by calling iconv,
>
> Hmm. Interesting, though I wonder how many fonts in the wild have *only*
> a non-Unicode cmap.
>
>> - For characters not supported by the font, we need to ask the higher
>> level what to do. Pango uses special code that are used to draw
>> hexboxes later.
>
> That's not a concern for me, as we already detect unsupported characters
> (as a side-effect of the font-matching process). So we know about them
> already, and draw hexboxes for them independently of Harfbuzz.

Ok, one thing we can do is to have the callback, and add the internal 
cmap-reader too (a bit later).  We'll call the callback only when the internal 
cmap-reader doesn't find a suitable cmap or the character is not handled by 
the cmap.

Note that this also fixes handling of non-SFNT fonts.  That's right.  While 
harfbuzz is designed around SFNT, nothing in the API stops you from passing 
other font data to it, and it should just work (with no complex shaping though).


>> Thanks. I get to them soon. Regarding OPML, I'm of mixed mind. I
>> personally prefer to use the latest Unicode mirroring properties
>> instead. The idea of fixing on OPML was stupid IMO.
>
> I don't like it, either, but I'm inclined to support the standard as
> written.

Note that if we use more recent mirroring data, it just makes it better. 
Otherwise it's as compliant as using the OMPL/OPML (which was is it?).  It 
only affects fonts that OpenType forces having RTLM, but they don't.


> Seems like a reasonable approach. You'll see that in the code I sent, I
> didn't actually do the default positioning step at all, so the result
> only contains the GPOS deltas. (Basically, I was wanting to check that
> the GPOS was being processed properly.)

Moving default positioning into harfbuzz also means that we can adjust for 
lsb_delta/rsb_delta to achieve better positioning.


behdad



More information about the HarfBuzz mailing list