QuestPDF icon indicating copy to clipboard operation
QuestPDF copied to clipboard

How to combine text in various content directions without split it into segments

Open VeraBarLavi opened this issue 3 years ago • 2 comments

Hi, My code:
container.Row(row => { row.RelativeColumn() .Column(column => { column.Item().Text(text => { text.Line("ההסתדרות 52 דירה 8"); } }); Expect result: 8 ההסתדרות 52 דירה Actually result: 8 ההסתדרות 25 דירה

Is it possible to get a desired result without split my text into 2 segments? Thank you.

VeraBarLavi avatar Dec 18 '22 13:12 VeraBarLavi

Without splitting into two segments, probably not. Is there a particular reason you don't want to split it? (Note that a segement is different from a line)

girlpunk avatar Dec 22 '22 16:12 girlpunk

QuestPDF uses the HarfBuzzSharp library to perform text shaping. However, so called bidirectionality is even more complex and not support by that library (read here: https://harfbuzz.github.io/what-harfbuzz-doesnt-do.html).

I have found this library that may help you split the text into proper segments: https://github.com/Ghasan/FriBidiSharp

This one also look interesting: https://github.com/sillsdev/icu-dotnet

MarcinZiabek avatar Dec 22 '22 23:12 MarcinZiabek