ddnet icon indicating copy to clipboard operation
ddnet copied to clipboard

Use harfbuzz for better Arabic text rendering

Open def- opened this issue 4 years ago • 11 comments

def- avatar Oct 20 '20 08:10 def-

Well this wouldn't only be better but also the first time we render arabic text with any sense of correctness at all.

One thing for whoever decides to implement this: You need unicode bidirectional support, I think we can use fribidi for this but it's LGPL so might need an alternative.

On Tue, Oct 20, 2020, 10:11 Dennis Felsing [email protected] wrote:

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ddnet/ddnet/issues/3154, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADXYBDCBP2ADOYITVAAJKLSLVA25ANCNFSM4SX2BOKA .

Learath2 avatar Oct 20 '20 08:10 Learath2

https://github.com/teeworlds/teeworlds/issues/394#issuecomment-660422993

MyNewBie avatar Oct 25 '20 12:10 MyNewBie

@TsFreddie Did you want to work on this? Do you need help to get harfbuzz linking?

def- avatar Nov 03 '20 17:11 def-

Probably. I still don't know how to make a cmake file that works. For bidi, if we don't need RTL marking or any fancy layout indicator, we can probably get by with a table of RTL characters to detect a sequence of them and reversed them before passing the string to harfbuzz.

TsFreddie avatar Nov 03 '20 19:11 TsFreddie

For bidi, if we don't need RTL marking or any fancy layout indicator, we can probably get by with a table of RTL characters to detect a sequence of them and reversed them before passing the string to harfbuzz.

That doesn't really work for multiline strings.

heinrich5991 avatar Nov 07 '20 18:11 heinrich5991

I think limiting scope is important so I would do this in 3 manageable steps.

  1. Getting text laid out using harfbuzz.
  2. Getting bidi working.
  3. Actually right aligning the UI.

I think 3 is the hardest step

Learath2 avatar Nov 07 '20 18:11 Learath2

Skip part 3 from my PoV. harfbuzz layout is the most important thing so that people can at least write in arabic

def- avatar Jan 31 '21 08:01 def-

Probably. I still don't know how to make a cmake file that works.

If you need help with that, tell us what lib you need (is it harfbuzz?) and we can do that for you.

def- avatar Jan 31 '21 08:01 def-

hi i have a problem with arabic translation file and i think it belong to harfbuzz when arabic translation file it dosent show correcly (letters are not conncted) what should i do

supperzaki avatar Feb 11 '22 21:02 supperzaki

At the moment I know for Farsi translation we used some tricks to put the characters to look halfway right. But getting Ar abic right is hard. Can you code?

def- avatar Feb 11 '22 22:02 def-

not alot

supperzaki avatar Feb 17 '22 17:02 supperzaki