[HarfBuzz] DirectWrite backend for HarfBuzz
Ebrahim Byagowi
ebraminio at gmail.com
Fri Sep 11 14:12:02 PDT 2015
On Fri, Sep 11, 2015 at 4:53 PM, Bas Schouten <bas at basschouten.com> wrote:
> Harfbuzz is MIT licensed right? I have no problem with that code being
> used and distributed under the MIT license.
Thank you very much :)
On Fri, Sep 11, 2015 at 11:41 AM, Nikolay Sivov <bunglehead at gmail.com>
wrote:
> 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.
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?
> When this fails like that you need to reallocate with returned
> actualGlyphs, and call GetGlyphs again.
Done
<https://github.com/ebraminio/harfbuzz/commit/d07eef9d29794754d3b22770a7e51c5c84235e93>,
not very clean but I am open to do this on some other superior way :)
Why do you need this? Dwrite input is supposed to be in WCHARs.
>
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?
This should use WCHAR or similar-sized type - wchar_t size is variable.
>
It was done here
<https://github.com/mozilla-services/services-central-legacy/commit/dcdb088a1041a41c819885c4d52dfff32d8fc440#diff-df0fbc28b9fe8446495e17b100af0e8bR168>
but
it makes sense, done.
This is not used. Note that returned advances/offsets are scaled with:
>
> <design advance> * emSize / designUnitsPerEm.
>
Thank you, done. Even the fact I am far from prefect here.
>
> + hr = analyzer->GetGlyphs(pchars, length,
>> + fontFace, FALSE,
>> + buffer->props.direction,
>> + &runHead->mScript, NULL, NULL, NULL, NULL, 0,
>> + maxGlyphs, clusters, textProperties,
>> + glyphs, glyphProperties, &actualGlyphs);
>>
>
> 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?
>
Well, it works, but may I don't know how also :) Locale done
<https://github.com/ebraminio/harfbuzz/commit/99183a34e5f7e0a7c87281789e97a04d7e7cf16a>,
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.
Thank you for the reviews :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/harfbuzz/attachments/20150912/cca0f00f/attachment.html>
More information about the HarfBuzz
mailing list