Text Candy doesn't seem to work outside samples?

I have attempted to add text candy to my game via director class, and have tried even just adding code from the samples…

I am adding the images and corresponding .lua files as required, but no matter which sample i try to integrate into my game i always get this error.

“sequence frames must be inside the sheet”

Why does this error only occur when the samples are moved out and put in existing code?

I have checked and nothing seems wrong… [import]uid: 6981 topic_id: 8091 reply_id: 308091[/import]

It’s this line specifically (taken from a Text Candy Sample)

TextCandy.AddCharset (“FONT1”, “font_Small3_White”, “font_Small3_White.png”, “0123456789AÄBCDEFGHIJKLMNOÖPQRSTUÜVWXYZ’*@():,$.!-%+?;#/_”, 10)

I am also using CPM, and have added the appropriate files…
The error also occurs running via the Corona Terminal however, so I doubt it is CPM related.

Doesn’t make sense, the samples work fine, but using the same assets as the sample and even the same code produce that error when integrated into my application. :confused: [import]uid: 6981 topic_id: 8091 reply_id: 28846[/import]

I had that popping up as well. I’m not sure if I ever got the samples to work, but I spent a few hours today going through stuff and stumbling around, and I got Text Candy added to my project, using the director class.

Let me know if I can help out.

Mike Hovland
Blue Rocket Labs [import]uid: 5317 topic_id: 8091 reply_id: 28870[/import]

There is a very strange issue in LUAs string library - the problem is that German Umlauts (as included in our sample fonts) are converted to double chars when passed to a function. This is only the case inside a module (which is really strange). This is why Text Candy thinks there are more chars on the texture as there actually are.

The solution is to get rid of the German Umlauts in the fonts when you are loading your fonts from a sub directory or from within a module. There is no need to change the textures -just edit the character order string and replace each Umlaut with an individual character that is not used.
Before:

TextCandy.AddCharset (“FONT1”, “font_Small3_White”, “font_Small3_White.png”, “0123456789A Ä BCDEFGHIJKLMNO Ö PQRSTU Ü VWXYZ’*@():,$.!-%+?;#/_”, 10)

Fixed (each Umlaut replaced with the ’ { ’ symbol, which isn’t used):

TextCandy.AddCharset (“FONT1”, “font_Small3_White”, “font_Small3_White.png”, “0123456789A { BCDEFGHIJKLMNO { PQRSTU { VWXYZ’*@():,$.!-%+?;#/_”, 10)
If you are creating your own charsets then, you should avoid adding Umlauts to stay on the save side. [import]uid: 10504 topic_id: 8091 reply_id: 28889[/import]

EDIT: X-pressive beat me to it

[import]uid: 9422 topic_id: 8091 reply_id: 28895[/import]

Yup, would never have guessed that in a million years.

Thanks for the help, it’s working now [import]uid: 6981 topic_id: 8091 reply_id: 28910[/import]

That is truly a strange issue. Glad to know how to fix it! [import]uid: 5317 topic_id: 8091 reply_id: 28931[/import]

Wow thank god for the forum and search function. I would have been pulling my hair out
[import]uid: 107974 topic_id: 8091 reply_id: 114849[/import]