[lua]local function createText(text, y)
local scrollText = display.newText {
text=text,
x=10,
y=y,
width = 290,
height = 0,
font=native.systemFontBold,
fontSize=20,
align = “center”
}
scrollText.anchorX = 0
scrollText.anchorY = 0
return scrollText
end
local sceneChapterPath
function scene:create( event )
sceneGroup = self.view
--Removed lines that doesn’t contain anything to do with the problem
local scrollView = widget.newScrollView
{
top = 100,
left = 10,
width = 300,
height = 400,
backgroundColor = { 1, 1, 1, 0.5 },
--scrollWidth = 600,
--scrollHeight = 800,
horizontalScrollDisabled = true,
}
local fileHandle, errorString = io.open( system.pathForFile(sceneChapterPath), “r” )
if fileHandle then
local contents = fileHandle:read( “*a” )
local chapterText = createText(contents, 0)
print(chapterText.text)
scrollView:insert( chapterText )
–scrollView:setScrollHeight(5000)
else
print(errorString)
end
end[/lua]
The text printed from this line
print(chapterText.text)
is not the same that is visible in the scrollView…
the printed one shows all of the text, the one in the scrollView looks like in the images
Images:
http://i.imgur.com/5W2e677.png
http://i.imgur.com/PdKLlJp.png
EDIT: I found out that when I change the font the text is all appearing and well, but is that considered a limit problem ?