<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sat, Sep 12, 2015 at 2:15 AM, Nikolay Sivov <span dir="ltr"><<a href="mailto:bunglehead@gmail.com" target="_blank">bunglehead@gmail.com</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
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.</blockquote><div>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? :)</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
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.</blockquote><div>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.</div></div></div></div>