[HarfBuzz] DirectWrite backend for HarfBuzz

Ebrahim Byagowi ebraminio at gmail.com
Fri Sep 11 15:29:26 PDT 2015


On Sat, Sep 12, 2015 at 2:15 AM, Nikolay Sivov <bunglehead at gmail.com> wrote:
>
>
> If the goal is to use memory buffers for fonts you'll need custom
> IDWriteFontFileLoader and memory based IDWriteFontFileStream
> implementation. After that you'll need to register your loader within
> factory context using RegisterFontFileLoader(). Later you can use
> CreateCustomFontFileReference() to get IDWriteFontFile and finally
> CreateFontFace() using this file to get back fontface instance pointer.
> That's I believe is a proper way to use fonts that are no installed system
> wide, and it should be preferred so you don't have to rely on how gdi with
> realize select font.

Yes, this is of course very nice but in fact is another beast for me. I
just guessed the way font is being load doesn't hurt the rendering way of
dwrite shaper, isn't there anyway to not do this for now at least? :)

Yeah, again I was too eager to comment, and being used to C most of the
> time when dealing with COM method calls I didn't spot that you pass text
> and length. The remaining problem is that you pass all of it at once, but
> what actually should happen is that you should pass text pointer and length
> that corresponds to a run you're about to shape - now you use script ID for
> first run assuming that it's the same for the rest of the text, which is
> not necessary true of course. Same goes for direction and locale - those
> should be specific to each run.

Even the fact this is one of most obvious shortcoming of the patch (which
is vital for font features setting), from my understanding shaper input is
itemized to shape a segment of text just with similar dir and script, and
most or all times the thing passed to shaper can be shaped with just one
run which has same direction and script. Like the previous one I just
thought we can live with this for now.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/harfbuzz/attachments/20150912/13bb5ac3/attachment.html>


More information about the HarfBuzz mailing list