[HarfBuzz] HarfBuzz glyph offsets

Jonathan Blow jon at number-none.com
Wed Dec 23 15:20:10 PST 2015


>
>
>
> You don't need to look into bearings metrics if you want to render
> something. And no, they are not offsets.
>
> HB gives you advances and offset vectors. So what you need to do is:
>
> (origin) -> (render glyph at origin+offset) -> (move origin by advance)
> -> repeat.
>

​I guess the point of confusion is what does "render glyph" mean in your
flowchart here. I am not able to conceive of any version of "render glyph"
whose implementation does not involve adding horiBearingX, which is why I
wonder if you guys are thinking about it as calling some API call that
people commonly presume but which is not what is going on in my case.
​

​


>
> Directionality is more complicated than setting a text property
> unfortunately. To shape it properly you have to pass segments of text of
> same resolved direction to HB, it won't do it for you.
>

​I have already implemented this, it's not in question here (in fact the
blog posting I linked intentionally uses bidi text in the Arabic example
because that is harder than just drawing straight Arabic!)
​​
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/harfbuzz/attachments/20151223/72aff993/attachment.html>


More information about the HarfBuzz mailing list