Re: Chart test failures on mac: text size differences

Tamas Zolnai tamas.zolnai at collabora.co.uk
Sat Feb 25 21:58:58 UTC 2017


Hi Khaled,

> > However I think it would be better to debug this problem with a unit
> > test in vcl module which tests directly the text rendering. I would
> > suggest that if you are working making text rendering consitent. The
> > vcldemo does something similar, but it's just doing the rendering and
> > does not compare the text size to expected values. That code can be
> > reused to write some unit tests about text rendering.
> 
> If someone knows how to write text layout unit tests for VCL (i.e. by
> showing some example) I might try adding some, otherwise I don’t think
> OutputDevice provides much of useful API for doing layout tests that
> would be helpful at VCL level.

Is vcldemo code not good enough as example? (vcl/workben/vcldemo.cxx) Check the drawText() or drawComplex() method. As I see this method uses only vcl objects (OutputDevice, vcl::Font). OutputDevice::GetTextBoundRect() can be used to get the text width and height. Or did I miss something?

Best Regards,
Tamás
 
 
 
 




More information about the LibreOffice mailing list