[HarfBuzz] DirectWrite backend for HarfBuzz

Ebrahim Byagowi ebraminio at gmail.com
Thu Sep 10 23:11:58 PDT 2015


Hi. I have developing a dwrite backend for HarfBuzz. It is still far from
prefect, I just thought it maybe worth to be shared but it has at least
these main issues which I hope would be fixed with your help:

   - A lot of parts of TextAnalysis is copied from this
   <https://github.com/mozilla-services/services-central-legacy/blob/master/gfx/thebes/gfxDWriteTextAnalysis.cpp>
which
   seems added on this patch
   <https://github.com/mozilla-services/services-central-legacy/commit/dcdb088a1041a41c819885c4d52dfff32d8fc440>
and
   is MPL licensed. I hope Bas can grant the use and re-licensing of it for
   developing HarfBuzz.
   - I couldn't find a way to access dwrite specific headers from
   cygwin/mingw/msys2 and am using a cmake build configuration
   <https://github.com/ebraminio/glcourse/blob/master/harfbuzz.cmake> for
   using dwrite on Visual Studio. I think if we "GetProcAddress" it like what
   we do for uniscribe backend when we decided which things we need here, but
   well, it is going to be more painful than that even I'd guess
   - It just work when font is set on 32 point :)
   - It doesn't support font features configuration
   - It uses DirectWrite GDI Interop instead IDWriteFontFileStream
   <https://github.com/servo/skia/blob/master/src/utils/win/SkDWriteFontFileStream.h>
   for loading the font (and many parts of the patch is actually copied from
   uniscribe backend)
   - It may has some more minor and major issues which I didn't remember to
   note :)

While I am not a Windows programmer and also also not being familiar with
DirectWrite and even DirectX development, the motivation for me was just to
have access to DirectWrite specific capabilities (explicitly, Kashida
justification
<https://msdn.microsoft.com/en-us/library/windows/desktop/hh994452(v=vs.85).aspx#Justification>)
in hope the features would be developed inside harfbuzz someday (this can
be accessed on Uniscribe backend, ScriptJustify
<https://maxradi.us/documents/uniscribe/#ScriptJustify> which I probably
would dig more if I see there would not any possible progress on this
approach). This patch is far from prefect but I just hoped this would be
useful for someone someday or would be merged on HarfBuzz :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/harfbuzz/attachments/20150911/83c81f5e/attachment.html>


More information about the HarfBuzz mailing list