Re: Questions about the font shaping tender

2016-02-05 Thread Michael Stahl
On 02.02.2016 11:58, Khaled Hosny wrote:
> 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.

that definitely sounds like a reasonable approach--i feel we currently
have more platform specific font rendering back-ends than we can handle.

if harfbuzz is good enough for Firefox and Chromium on all platforms
surely it can be good enough for us.

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Questions about the font shaping tender

2016-02-04 Thread Khaled Hosny
I’m just trying to understand what is this about for now.

Regards,
Khaled

On Tue, Feb 02, 2016 at 07:18:28AM +1100, Chris Sherlock wrote:
> This does seem a bit odd… unless we want to make AFM parsing cross-platform?
> 
> The only thing that I’m aware implements AFM parsing is
> PrintFontManager, which is only used by Unix-based platforms. 
> 
> Could we get some clarification around this?
> 
> Oh, and also - Khaled, once this is clarified why don’t you go for the
> tender? I can’t think of anyone I’d more highly recommend than
> yourself, and I’m reasonably certain you have some good ideas around
> how to fix the SalLayout mess... certainly you have the technical
> expertise and experience to tackle this. 
> 
> Just a suggestion :-)
> 
> Chris
> 
> > On 1 Feb 2016, at 9:35 PM, Khaled Hosny  wrote:
> > 
> > I just came across this tender [1] and it is not quite clear to me what
> > is it about. Am I right in thinking this is about having a shared
> > cross-platform implementation of VCL text layout API (the dreaded
> > SalLayout et all)? If so I don’t understand what AFM stuff is doing here
> > since we don’t use any of this AFM stuff during text layout as far as I
> > can know and I don’t see how it can even be reused for such a task.
> > 
> > 1. 
> > https://blog.documentfoundation.org/blog/2015/12/16/tender-for-cross-platform-fontshaping-stubs-for-layout-tests-201512-05/
> > 
> > Regards,
> > Khaled
> > ___
> > LibreOffice mailing list
> > LibreOffice@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/libreoffice
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Questions about the font shaping tender

2016-02-02 Thread Khaled Hosny
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


signature.asc
Description: PGP signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Questions about the font shaping tender

2016-02-02 Thread Chris Sherlock
Would it be helpful to look at the way that OutputDevice handles laying out 
text?

When I was looking at this code early last year I found that I had to try to 
understand what OutputDevice did before I could come even *close* to 
understanding what SalLayout was attempting. 

For instance, the DX array code looks suspiciously like it was adopted from the 
way that EMF (and I guess Windows GDI?) handles text layout. 

If I were to start a Wiki page, would that be at all helpful? It would be 
rough, but if others wanted to correct my mistakes and misunderstandings then 
could this be helpful in any way?

Chris

> On 2 Feb 2016, at 8:15 PM, 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
> 
> Regards,
> 
> Miklos
> ___
> LibreOffice mailing list
> LibreOffice@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libreoffice

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Questions about the font shaping tender

2016-02-02 Thread Miklos Vajna
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

Regards,

Miklos


signature.asc
Description: Digital signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Questions about the font shaping tender

2016-02-01 Thread Chris Sherlock
This does seem a bit odd… unless we want to make AFM parsing cross-platform?

The only thing that I’m aware implements AFM parsing is PrintFontManager, which 
is only used by Unix-based platforms. 

Could we get some clarification around this?

Oh, and also - Khaled, once this is clarified why don’t you go for the tender? 
I can’t think of anyone I’d more highly recommend than yourself, and I’m 
reasonably certain you have some good ideas around how to fix the SalLayout 
mess... certainly you have the technical expertise and experience to tackle 
this. 

Just a suggestion :-)

Chris

> On 1 Feb 2016, at 9:35 PM, Khaled Hosny  wrote:
> 
> I just came across this tender [1] and it is not quite clear to me what
> is it about. Am I right in thinking this is about having a shared
> cross-platform implementation of VCL text layout API (the dreaded
> SalLayout et all)? If so I don’t understand what AFM stuff is doing here
> since we don’t use any of this AFM stuff during text layout as far as I
> can know and I don’t see how it can even be reused for such a task.
> 
> 1. 
> https://blog.documentfoundation.org/blog/2015/12/16/tender-for-cross-platform-fontshaping-stubs-for-layout-tests-201512-05/
> 
> Regards,
> Khaled
> ___
> LibreOffice mailing list
> LibreOffice@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libreoffice

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Questions about the font shaping tender

2016-02-01 Thread Khaled Hosny
I just came across this tender [1] and it is not quite clear to me what
is it about. Am I right in thinking this is about having a shared
cross-platform implementation of VCL text layout API (the dreaded
SalLayout et all)? If so I don’t understand what AFM stuff is doing here
since we don’t use any of this AFM stuff during text layout as far as I
can know and I don’t see how it can even be reused for such a task.

1. 
https://blog.documentfoundation.org/blog/2015/12/16/tender-for-cross-platform-fontshaping-stubs-for-layout-tests-201512-05/

Regards,
Khaled
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice