Windows / font / text futures ...
Caolán McNamara
caolanm at redhat.com
Fri Mar 4 12:04:38 UTC 2016
On Thu, 2016-03-03 at 13:44 +0000, Michael Meeks wrote:
> Hi guys,
> Anyhow - what to do ?
>
> While we could switch to DirectWrite on windows, which may
> solve some
> of our problems; this will be in itself disruptive.
>
> So - I believe that we should switch to using harfbuzz and
> freetype consistently everywhere.
So, like chromium and firefox etc do, I'm very much in favor of using
our harfbuzz text shaper on all platforms to unify that complexity and
have equal layout problems on different platforms :-).
If you look at the vcl/unx/generic/glyphs/gcach_layout.cxx getFontFuncs
thing (and the firefox equivalents) then harfbuzz has mechanisms to
allow us to integrate with CGFontRefs on MacOSX, FT_Face under Linux
and presumably (?) hook into our existing Windows stuff to swap out the
two windows shaping engines and keep (one of) the existing render paths
?
So layout wise I'm comfortable with harfbuzz everywhere. Window text
rendering is as clear as mud to me though. Right now under Linux (and
similar platforms) at the moment we are using cairo to render glyphs
(from freetype faces) rather that using freetype to do that directly.
And under Linux we render visually differently, albeit with the same
positioning, depending on what features of the underlying freetype are
enabled or disabled and all mediated by what desktop-wide font options
are set. My experiences there suggests that if your text doesn't look
like everyone else's on that platform there's constant moaning and
complaining.
On Windows, peer apps like firefox and chromium etc seem to follow the
pattern of eventually rendering their harfbuzz layouted text with the
DirectWrite apis, whether directly, or through skia or through a forked
cairo, that *seems* be where things end up. So that seems to be a
fairly well trodden route.
C.
More information about the LibreOffice
mailing list