Testing ImplLayoutRuns and ImplLayoutArgs
chris.sherlock79 at gmail.com
Wed Sep 1 21:09:35 UTC 2021
I was hoping someone who has an understanding of text layout might be able to help me. I have written a unit test for ImplLayoutRuns, but I would like to confirm my approach and understanding is correct.
The patch on gerrit can be found here:
In testImplLayoutRuns_AddPos() I add 7 positions. I assume these are glyph positions.
What I think I’m doing is to setup a run of 3 non-RTL glyphs, then add a fourth RTL marker glyph, which makes a run of three characters with the RTL maker. I then create a non-RTL glyph position. etc.
The code being:
aRuns.AddPos(4, true); // add RTL marker glyph
aRuns.AddPos(6, true); // add RTL marker glyph
I believe this creates a run of four LTR glyphs, then a run of 2 RTL glyphs, then a run of two LTR glyphs, and final run of 2 RTL glyphs.
Can I clarify this is correct? And does each run explicitly include the RTL marker as the first glyph position? The test seems to show this.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the LibreOffice