MoathOthman / MOLH

Localization helper for iOS apps mainly focusing on the LTR/RTL issue
MIT License
117 stars 36 forks source link

Kurdish language corrupted text #51

Closed abdallahnh closed 4 years ago

abdallahnh commented 4 years ago

I tried to use the Kurdish language ckb-IQ in my app and when I switch to this language some characters are not connected to each other, and when I used ku it is connected, so after doing some debugs and when I added ku to the iSRTLLanguage() it behave same as ckb-IQ so I guess when we forceRightToLeft for Kurdish language it is corrupting the text.

First, I thought it was an Xcode issue so I created this StackOverflow question

https://stackoverflow.com/questions/59967897/xcode-kurdish-localization-issue

MoathOthman commented 4 years ago

@abdallahnh such issues sometimes caused by the font not supporting certain characters. maybe you can try another font. does the text looks fine without forcing right to left. or when changing the language from settings app.

abdallahnh commented 4 years ago

@MoathOthman it thought that at the beginning and I tried diff kurdish fonts, but as I said using ku it worked and using ckb didn't and the only diff is having ckb in isRTLLanguage() and when I added ku to the isRTLLanguage then both contained the issue

MoathOthman commented 4 years ago

@abdallahnh i just tried ckb-IQ on the demo project , seems fine. Simulator Screen Shot - iPhone 11 - 2020-01-30 at 17 31 15

abdallahnh commented 4 years ago

@MoathOthman where is the kurdish text :)

MoathOthman commented 4 years ago

Simulator Screen Shot - iPhone 11 - 2020-01-30 at 17 37 18 another sample taken from https://www.omniglot.com/writing/kurdish.htm

abdallahnh commented 4 years ago

@MoathOthman using ckb IMG_4A8A22E26DF2-1 using ku IMG_563EEC26BB84-1

see the diff please

abdallahnh commented 4 years ago

@MoathOthman please test this on your demo ئۆە، دیارە پەیوەندیت بە ئینتەرنێت نەکردووە، تکایە دڵنیابە لە پەیوەندی ئینتەرنێت بکە و دووبارە بکەوە

abdallahnh commented 4 years ago

@MoathOthman I used the same font for both and still the same

MoathOthman commented 4 years ago

@MoathOthman please test this on your demo ئۆە، دیارە پەیوەندیت بە ئینتەرنێت نەکردووە، تکایە دڵنیابە لە پەیوەندی ئینتەرنێت بکە و دووبارە بکەوە

seems fine as well.

abdallahnh commented 4 years ago

@MoathOthman are you setting the values from UI or by code, if you set it by code it will not work please confirm

MoathOthman commented 4 years ago

@abdallahnh by code(Localizable.string). I will push it on another branch. Can you share the fonts you are using.

abdallahnh commented 4 years ago

@MoathOthman AdobeArabicBold & droid-arabic-naskh

abdallahnh commented 4 years ago

@MoathOthman when i deal with ku like ckb, "make it an RTL" the text disconnected

abdallahnh commented 4 years ago

@MoathOthman thanks for your help, this was related to the Arabic font in our library