Text measuring when dealing with RTL - Harfbuzz

Hi! I'm trying to draw RTL text and found the sample provided at https://github.com/mono/SkiaSharp/blob/master/samples/SkiaSharpSample.Shared/Samples/TextShapingSample.cs which uses Harfbuzz for shaping text. It works as expected but my needs also involving calculating the text size.

For non-RTL text, I can use SKPaint.MeasureText which works fine but what about when text is shaped? That same method is returning the size on the unshaped text. How can I get the same of the Shaped one? In addition, I'm also using SKPaint.BreakText which also does not work with Shaped text.

Any hints please? thanks,

Posts

Sign In or Register to comment.