<div dir="ltr"><div class="gmail_extra"><div>On Fri, Sep 11, 2015 at 4:53 PM, Bas Schouten <span dir="ltr"><<a href="mailto:bas@basschouten.com" target="_blank">bas@basschouten.com</a>></span> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Harfbuzz is MIT licensed right? I have no problem with that code being used and distributed under the MIT license. </blockquote></div><div>Thank you very much :)</div><div><br></div><div><br></div><div>On Fri, Sep 11, 2015 at 11:41 AM, Nikolay Sivov <span dir="ltr"><<a href="mailto:bunglehead@gmail.com" target="_blank">bunglehead@gmail.com</a>></span> wrote:</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"></blockquote>The only reason to use GdiInterop is to enable GDI font substitution/resolution. If you don't need that dwrite way would be to get system font collection, locate family by name, and use GetFirstMatchingFont() with desired weight/style/stretch triple.</blockquote><div>I think in order to use fonts given to harfbuzz by hb_blob I can't query system font collection and some fonts may not even available on the system, I am missing something here?</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">When this fails like that you need to reallocate with returned actualGlyphs, and call GetGlyphs again. </blockquote><div><a href="https://github.com/ebraminio/harfbuzz/commit/d07eef9d29794754d3b22770a7e51c5c84235e93">Done</a>, not very clean but I am open to do this on some other superior way :)</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Why do you need this? Dwrite input is supposed to be in WCHARs.<br></blockquote><div>As far as I know dwrite WCHAR is not playing well with non-BMP characters and harfbuzz codepoints can not be used as wchar simply, and this also being done on uniscribe backend. But am I missing another thing here?</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">This should use WCHAR or similar-sized type - wchar_t size is variable.<br></blockquote><div> It was done <a href="https://github.com/mozilla-services/services-central-legacy/commit/dcdb088a1041a41c819885c4d52dfff32d8fc440#diff-df0fbc28b9fe8446495e17b100af0e8bR168">here</a> but it makes sense, done.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">This is not used. Note that returned advances/offsets are scaled with:<br><br><design advance> * emSize / designUnitsPerEm.<br></blockquote><div>Thank you, done. Even the fact I am far from prefect here. </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">+  hr = analyzer->GetGlyphs(pchars, length,<br>+    fontFace, FALSE,<br>+    buffer->props.direction,<br>+    &runHead->mScript, NULL, NULL, NULL, NULL, 0,<br>+    maxGlyphs, clusters, textProperties,<br>+    glyphs, glyphProperties, &actualGlyphs);<br></blockquote><br>How can this work if you never pass run text to it? Not to mention locale. Also looks like you only try with runHead, so the rest of runs are ignored?<br></blockquote><div>Well, it works, but may I don't know how also :) Locale <a href="https://github.com/ebraminio/harfbuzz/commit/99183a34e5f7e0a7c87281789e97a04d7e7cf16a">done</a>, while being a little ugly but is working for now. Yes I just assumed that we have one run, not pretty but assumption I guess for now.</div><div><br></div><div>Thank you for the reviews :)</div></div></div>