Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Multi-Line Text Right-Aligned (e.g. Arabic, Hebrew) It does not work on Android devices
Started by w967 Mar 24 2020 09:48 AM

3 replies to this topic
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

w967

[GLOBAL: userInfoPane.html]
w967
  • Observer

  • 25 posts
  • Corona SDK

Hello
This code works well on devices without problems if the English

local options = 
{
    text = "This code works well on\ndevices without problems\nif the English",
    x = 100,
    y = 200,
    width = 128,
    font = native.systemFont,   
    fontSize = 18,
    align = "right"  -- Alignment parameter
}
 
local myText = display.newText( options )
myText:setFillColor( 1, 0, 0 )

But when you add Arabic, Hebrew or Persian text
The text turns to the left.

myText.text = "مرحبا بالجميع،\nأرجو لكم الصحة والسلامة"

image.png



[TOPIC: post.html]
#2

pixec

[GLOBAL: userInfoPane.html]
pixec
  • Contributor

  • 207 posts
  • Corona SDK

Maybe you should use bitmap fonts. There seem to be all sorts of issues with the ttf/otf fonts in corona
  • w967 likes this

[TOPIC: post.html]
#3

w967

[GLOBAL: userInfoPane.html]
w967
  • Observer

  • 25 posts
  • Corona SDK

Maybe you should use bitmap fonts. There seem to be all sorts of issues with the ttf/otf fonts in corona

 

Yes, this is the only solution
thank you so much
I started working with the ponyfont library



[TOPIC: post.html]
#4

w967

[GLOBAL: userInfoPane.html]
w967
  • Observer

  • 25 posts
  • Corona SDK

You cannot use Bitmap Fonts for Arabic texts. Because, Bitmap Fonts are still static (almost) contents. These gaps won't go.

:unsure:




[topic_controls]
[/topic_controls]