firemaples / EverTranslator

Translate text anytime and everywhere, even you are gaming!
https://play.google.com/store/apps/details?id=tw.firemaples.onscreenocr
GNU General Public License v3.0
131 stars 23 forks source link

Text direction is wrong (RTL languages) #439

Closed uomar8 closed 3 months ago

uomar8 commented 4 months ago

After version 4.0.0 Text direction is wrong it doesn't change with RTL languages

After 4.0.0 Screenshot_20240211_221009_com example android notepad_edit_1183593751902

Before: Screenshot_20240211_221451_com example android notepad_edit_1192078985234

Another example After 4.0.0: Screenshot_20240211_222105_com example android notepad_edit_555959091060 Before: Screenshot_20240211_222122_com example android notepad_edit_563088353038

Also I hope text align would be fixed With text direction and text align it should look like this: Project (20240211103920)

Project (20240211104011)

uomar8 commented 4 months ago

I think this might help

https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextDirection

https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextAlign

firemaples commented 4 months ago

Thanks for the feedback, let me check why RTL is not working.

uomar8 commented 4 months ago

i founded an easy fix

style = TextStyle(textDirection = TextDirection.Content),

without this line image

with this line (Text direction is view correctly image

uomar8 commented 4 months ago

tired textAlign = TextAlign.Justify

but it didn't work i hava no idea why

firemaples commented 3 months ago

Fixed in https://github.com/firemaples/EverTranslator/pull/441 Thank you for the investigation and fixing 🙇‍♂️