Date: prev next · Thread: first prev next last
2016 Archives by date, by thread · List index


On Tue, Feb 02, 2016 at 10:15:07AM +0100, Miklos Vajna wrote:
Hi,

I think the problem to solve is that we have different layout on Linux,
Windows and OS X, which means it's next to impossible to write unit
tests that assert the text is laid out correctly, since there can be
small differences today. The hope is that this is the root cause of e.g.
the chart tests which are not enabled by default today.

As far as I know, there are two ways you can solve this:

- use the Linux stack everywhere (fontconfig, freetype, harfbuzz?
  something like that), IIRC that's what e.g. Chromium does
- create a 4th layout in VCL, which is just a stub, but gives exactly
  the same results in all platforms, to allow writing unit tests that
  are executed in all platforms

OK, I think I see the line of reasoning behind the second option, but I
still fail to understand what AFM has to do with this, using AFM to get
glyph metrics to avoid using platform specific APIs? If it is just a
stub implementation, why not use a fixed width font and simplify/dump
things even further?

Personally I’d do a mixture of the two, a 7th (8th? I think we have 6 or
7 SalLayout implementations already) SalLayout that uses HarfBuzz
(reusing the existing HarfBuzz integration code as much as possible)
then gradually switch existing platforms to it as it matures, so it is
an overall win not just for the sake of fixing tests.

Regards,
Khaled

Attachment: signature.asc
Description: PGP signature


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.