[HarfBuzz] Streamlining hb_font_t some more
Behdad Esfahbod
behdad.esfahbod at gmail.com
Mon Oct 26 16:37:18 PDT 2015
On 15-10-26 04:21 PM, Simon Cozens wrote:
> On 27/10/2015 00:37, Nikolay Sivov wrote:
>> But probably more important is that this functionality doesn't seem
>> to belong to harfbuzz in a first place, as it never needs global
>> metrics internally (or does it?).
>
> No, it doesn't need these metrics internally. If Harfbuzz just sticks to
> text shaping, then I agree that global font metric functions shouldn't
> be there. On the other hand, if Harfbuzz wants to be providing the
> information that layout engines need, then it absolutely should be able
> to tell you about global font metrics. But in that sense, the recent
> work on OT font functions isn't necessary either, because other
> libraries easily provide this.
I agree with you. Also, HarfBuzz actually does need the ascent, for fallback
vertical origin. See this function:
https://github.com/behdad/harfbuzz/search?utf8=%E2%9C%93&q=guess_v_origin_minus_h_origin
>> If you only need a couple of fields it's easy to get them manually
>> from font blob.
>
> Eh, I don't know you about you but the reason I use libraries is to
> abstract away this kind of low-level grubbing around... But yeah,
> Freetype already does this. I just left it was a shame that something
> already had my font open and already had an OpenType parser ready to go,
> and it couldn't tell me what I wanted.
+1.
More information about the HarfBuzz
mailing list