Arabic text cuts off while using newText() widget on IOS 7.0 devices.

Hi All,

In my app, I use display.newText()  to create text synchronizations, and I don’t specify a width nor height.

 

The text appears as expected on both android and IOS 6.0, 6.1, but it cuts off on IOS 7.0 and above.

I will share my code to help solving the problem.

 

Everything is ok… Since iOS 7!

 

My Corona build version is: Version 2013.2100 (2013.12.7) Starter Edition

 

config.lua

application = { content = { width = 768, height = 1024, scale = "zoomStretch", fps = 60, }, }

build.settings

-- Supported values for orientation: -- portrait, portraitUpsideDown, landscapeLeft, landscapeRight settings = { orientation = { default = "landscapeRight", content = { "landscapeLeft", "landscapeRight" }, supported = { "landscapeLeft", "landscapeRight" }, }, iphone = { plist = { UIAppFonts = { "Helvetica.ttf", "HelveticaNeue.ttf", "HelveticaNeueLight.ttf", "GeezaPro.ttf", "AdobeArabic-Regular.otf" }, UIStatusBarHidden = false, UIPrerenderedIcon = true, -- set to false for "shine" overlay } }, }

newText Code

local bg = display.newRect( display.contentCenterX, display.contentCenterY, display.contentWidth, display.contentHeight ) bg:setFillColor( 255 ) local text1 = display.newText( "وَفُزْتُ", display.contentCenterX + 100, display.contentCenterY, native.systemFont, 36 ); text1:setFillColor( 0 ) text1.align = "center"; local text2 = display.newText( "بِكَأْسِ", text1.x - text1.width - 15, display.contentCenterY, native.systemFont, 36 ); text2:setFillColor( 0 ) text2.align = "center"; local text3 = display.newText( "القارِئِ", text2.x - text2.width - 15, display.contentCenterY, native.systemFont, 36 ); text3:setFillColor( 0 ) text3.align = "center"; local text4 = display.newText( "الذَّكِيِّ.", text3.x - text3.width - 15, display.contentCenterY, native.systemFont, 36 ); text4:setFillColor( 0 ) text4.align = "center"; local text5 = display.newText( "وَالــــــرَّوْضُ", text4.x - text4.width - 45, display.contentCenterY, native.systemFont, 36 ); text5:setFillColor( 0 ) text5.align = "center";

Screenshot on IOS 6.1 – Rendered as expected

Screenshot on IOS 7.0 and above – not rendered well.

How can I handle this ?!