looking for suggestions for displaying a lot of text

I have an app that displays some R&D/debugging information in a scrollview.

If I display a little (say, 40 lines), things work fine (scrollable black text on a white window).

…and texture memory use is on the order of 1 to 2 MB.

If I display more (say, 120 lines), I get a solid white rectangle with no visible text,

and texture memory use is on the order of 9 MB.  The problem occurs on two low-cost

lower-memory Androids.  On two expensive Androids with more memory, I see the text okay.

So…I’m looking for suggestions for displaying a “lot” of text (100 to 400 lines).

I don’t care about smooth scrolling (a page at a time would be ok, but possibly tedious

to generate … there are a lot of posts about trying to determine how much text will fit

in a window, and even though I have code to help do that, I wouldn’t look forward to it).

I’m don’t think I care about horizontal scrolling vs. wrapping.

thanks,

Stan

You may find this useful: https://docs.coronalabs.com/tutorial/system/textBlocks/index.html

Also, if you use bitmap fonts, then your texture memory usage will be fixed and you won’t encounter any issues regardless of how huge chunks of text you create.

Hi XeduR @Spyric

I checked out the tutorial, thanks.  Were you aware it takes about 8 to 13 MB of texture memory (depending upon platform)?

Despite that, however, it runs fine on my memory limited (cheaper) Androids!

So the problem is that maxTextureSize limit (16384 in simulator, 16384 on my two good Androids,

but only 4096 on cheap Androids.

That tutorial breaks the text into smaller chunks (per newText), and that falls below the maxTextureSize limit.

thanks!

Stan

How much texture memory your text display objects take is entire dependent on the dimensions of said display objects. So, if you ask me “do I know about texture memory in general or how it works”, the answer is yes. I am well versed in memory optimisation in Lua and device memory limits.

I always use bmfs. They are the only things that are quaranteed to work always

bmfs?

Google search: site:coronalabs.com bmfs

has zero hits.

Dropping the ‘s’ gets a few hits, referring to an old file that someone posted back around 2011 … but the link to it is bad.

Github a bmf.lua at

  https://gist.githubusercontent.com/poisa/5d3721272be2950c3177/raw/71a30c9ffad0ee46f6a28468f3383984f0eee5ec/bmf.lua

but it has a internal coding errors that would prevent it from working.

thanks,

Stan

but it 

thanks,

Stan

bmfs = Bitmap Fonts

You may find this useful: https://docs.coronalabs.com/tutorial/system/textBlocks/index.html

Also, if you use bitmap fonts, then your texture memory usage will be fixed and you won’t encounter any issues regardless of how huge chunks of text you create.

Hi XeduR @Spyric

I checked out the tutorial, thanks.  Were you aware it takes about 8 to 13 MB of texture memory (depending upon platform)?

Despite that, however, it runs fine on my memory limited (cheaper) Androids!

So the problem is that maxTextureSize limit (16384 in simulator, 16384 on my two good Androids,

but only 4096 on cheap Androids.

That tutorial breaks the text into smaller chunks (per newText), and that falls below the maxTextureSize limit.

thanks!

Stan

How much texture memory your text display objects take is entire dependent on the dimensions of said display objects. So, if you ask me “do I know about texture memory in general or how it works”, the answer is yes. I am well versed in memory optimisation in Lua and device memory limits.

I always use bmfs. They are the only things that are quaranteed to work always

bmfs?

Google search: site:coronalabs.com bmfs

has zero hits.

Dropping the ‘s’ gets a few hits, referring to an old file that someone posted back around 2011 … but the link to it is bad.

Github a bmf.lua at

  https://gist.githubusercontent.com/poisa/5d3721272be2950c3177/raw/71a30c9ffad0ee46f6a28468f3383984f0eee5ec/bmf.lua

but it has a internal coding errors that would prevent it from working.

thanks,

Stan

but it 

thanks,

Stan

bmfs = Bitmap Fonts