Creating bitmap charsets is basically very easy. There are just a few steps to do -once you are familiar with this process, a bitmap charset is done in about 10-15 minutes only (and can be reused in any of your future apps then).
@dweezil: the coupon provided above is valid for a week only, while Particle Candy owners will then still be able to get a discount. There will be more info on this within the next couple of days.
Antheor, I am not sure what you mean exactly with "paragraph management", but you can define a maximum width for a text object, once the text exceeds this width, it will be automatically broken to the next line, for example.
Hi x-pressive,
Rob2 (and probably some other people) would like to be able to use AngelCode-style bitmap fonts (as exported from Glyph Designer) with TextCandy.
I already have my own library for parsing and using these fonts, but I am not a TextCandy user myself, so I can't test the glue to get these AngelCode font definitions loaded into TextCandy. So maybe you can help Rob2 out... Here's a rough draft I've hacked up for something that might work for taking a font as loaded by my own library ("BMF") and using it from TextCandy:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
| -- take an already-loaded BMF font object and import it as a TextCandy charset
function AddCharsetViaBMF( name, font )
local chars = [];
for k, v in pairs( font.sprites ) do
chars[ v.frame ] = k
end
AddCharset(
name,
font.spritesheets[0].file,
font.spritesheets[0], -- is there a way to pass the spritesheet definition directly rather than via a module file?
table.concat( chars ),
font.chars[' '].xadvance,
nil,
font.info.lineHeight
)
for k, v in pairs( font.sprites ) do
SetCharYOffset( name, k, font.chars[k].yoffset )
end
end |
@x-pressive.com
Did i mentioned that i bought both Particle Candy & Text Candy a few days ago...
so it would be very nice to get an answer regarding a discount for "Text Candy" for users who bought text candy too early:-)
Sorry Oliver, would reply to you yesterday, but it was quite late then and I had already gone through a 16 hours day.
Well, let me explain this in detail: each time we offer a coupon code, we also receive complaints from one or another user why we did not let them know before -same when a discount ended. Well, first, we sometimes decide on a daily base to be as flexible as possible here. There was no fixed date for the premiere event as you bought it, so I couldn't let you know (I would, otherwise, of course). Second, we can't stop purchasing our products one week before a coupon goes out just not to offend any users. Third, you ALL know that we're *always* willing to help, providing as much (personal!) support as possible -even regarding to questions that have nothing to do with our products itself. We put an extreme amount of work and time into our products and the regarding support -in fact so much that we can't produce any own titles at the moment. We are working 14-16 hours per day -fulltime, not just as a hobby! Considering this, the prices of our products are more than fair! Sell just one app and you probably earn the tenfold that you spent purchasing the libs. So I can't understand why people complain about missing a discount while the original price is still more than fair and does not reflect in any way the amount of work we put into (or the amount of work you'll save yourself). This sometimes disappoints me a little bit... but as I said, we're always willing to help, so just drop a mail and we'll come towards you.
@p120ph37: using Glyph Designer should be no problem if it exports a texture and a Corona compatible .lua data sheet as Zwoptex and TexturePacker do. Unfortunately, it seems that it doesn't yet.
We are not familiar with it's output format and couldn't find any specs on their website but we could add a function to load a charset passing a table instead of reading a .lua data sheet file. This table should be in the same format as a Corona sprite sheet. So all it needs would be a conversion routine to convert the Glyph Designer data to a Corona sprite sheet table, then you could add a charset by passing this data table to Text Candy.
@x-pressive
The Glyph Designer definition format is just the AngelCode BMF format, which is somewhat documented here:
http://www.angelcode.com/products/bmfont/
and here:
http://www.gamedev.net/topic/284560-bmfont-and-how-to-interpret-the-fnt-file/page__view__findpost__p__2785731
You can also find example .fnt files as produced by Glyph Designer in this demo:
http://ember.awirtz.com/bmf.zip
As I mentioned, I don't own TextCandy myself, so it would need to be one of your users or you who would do the final integration work, but allowing a standard spritesheet definition table as an option instead of a .lua file would certainly make it much simpler to write wrappers for importing other font formats into TextCandy.
Also, do you have any plans to support per-character x-offset and x-advance properties like you support per-character y-offset? What about kerning (you can see this in the impact64.fnt file, and it is very noticeable on-screen with letter combinations like "AVA")? These are data which are available in Glyph Designer produced fonts, so it would be nice for TextCandy to be able to utilize them.
Having looked into this in some detail it seems Angelcode is the widely supported format for bitmap fonts and having Text Candy read these files would certainly make windows users happy
http://www.angelcode.com/products/bmfont/ as well as those using Glyph Designer.
This would also facilitate the support for Kerning which is pretty fundamental to good looking typography and is a big omission, something which is strikingly obvious from your video.
Anyway I await my download link having just purchased :)
oh that was a snap post ..never mind.
To Oliver ( forgive me for commenting )
I know it can be frustrating to miss a coupon, but I can't help adding that it's a little unfair to complain about xpressive ability to answer.
I hardly met any developer so willing to answer, giving always helpful infos, whatever the noob level of the question.
Anyway, if you're new to Particle Candy (I read you bought it just a few days ago), your frustration will soon vanish once you realize how cool it is :)
To Antheor
I will forgive you:-)
@Rob / p120ph37: Kerning is already supported, you can specify any char spacing, as well as line spacing. Adding individual x-offsets for each chars is no problem at all.
p120ph37, could you drop a mail to support at x-pressive.com so we can discuss the integration of Angelcode into Text Candy in detail then.
What you are referring to is really just letter-spacing or tracking. Kerning involves the definition of inter letter space adjustment for particular letter pair occurrences which is then automatically applied to text as it is laid out. A well designed modern font may well have hundreds of kerning pairs defined which are an integral part of the typographer's vision. I guess it's not the end of the world but it's a fairly important aspect of digital typography.
Anyway it looks like you are already on the case with p120ph37 so I will shut up and think myself lucky to have what Text Candy already is ------ pretty bloody magic :)
I've noticed a possible bug in Text Candy when using BOTTOM alignment. Here's the code:
local titleText=textcandy.CreateText({
fontName="TitleFont", x=display.contentWidth/2, y=100,
text="Raving",
charSpacing=-22,
originX="CENTER",
originY="BOTTOM",
showOrigin=true})
I notice that, although the reference point is at the bottom of the group, the text is arranged with all of the tops of the character boxes level. Hence, since the characters are differing heights, the text does not line up along the baseline.
By making the following change around line 1245 in lib_text_candy.lua I find that the bottoms of the characters will line up:
--Img.y = y + Char.height *.5
Img.y = y + Group.totalHeight-Char.height*0.5 -- AB 28 Mar 2011
Using this fix means that I don't have to apply y offsets to a large number of letters since the text will print along a constant baseline; I'll only need yOffsets for characters with descenders.
Just in case this isn't clear, here's a short clip that demonstrates the problem: http://twit.io/2Hh
Regards
Andy Bower
A text object's origin property has nothing to do with the char baseline alignment itself (which is always the char's center with the current version). The text object's origin property just determines how your text object is positioned on screen.
Aligning chars at a bottom line could be problematic for letters like "g", "q", "y" etc. Text Candy aligns chars using their center by default, but it might be more convenient to let the user decide, because it strongly depends on the charset used.
We'll add another property to allow chars to be placed either on their top, center or bottom line.
@x-expressive.com. I agree that the bottom alignment idea isn't perfect but it seems to me that the vast majority of characters will be easier to line up with such an option. Aligning to the vertical centre only works well if the character boxes are all equal sizes. This would make manually creating a font a lot harder since the individual characters images would need to be cut out accurately (which isn't what you suggest on your tutorial page)
Anyway, thanks for the offer to add bottom alignment as a property; I think it will help significantly.
Of course, I would also be keen to be able to use GlyphDesigner fonts, which presumably would solve the issue completely. Any news on whether this might be possible in a future version? FWIW, I am not that interested in whether TextCandy supports true kerning (i.e. with multiple letter pairings) since I accept that really TC is for text effects rather than high quality typography. My main interest is being able to create fonts with special effects quickly.
I have noticed a black screen when trying to load TC director class sample code.
More info on that issue if needed.
bowerandy: Glyph Designer support is on top of our to do list. However, it may take a couple of days since we're quite busy at the moment and don't want to release any half-baken versions and want to give it some tests first.
Antheor: What Director version are you using? Did you check if the build.settings may need to be changed to fit your target device?
Well, I have just tried to open your main.lua in the sample folder where you put director class.
Anyway, it seems I'm alone having the error. So I'll try to check the terminal and come back with full infos :)
BTW, TC deserves its own 3rd party tools forum, no ?
TC deserves an Oscar ! :)
@Antheor
Either
copy lib_text_candy.lua to the director sample directory
Or
change line 7 in the director sample main.lua
from
TextCandy = require("lib_text_candy")
to
TextCandy = require("../lib_text_candy")
so that the Text Candy library gets found
Yes, both libs should always be placed in your project folder, also edit the require path then.
The reason why the packages aren't shipped like this is that chances would be high that we accidentally ship an outdated library version in one of the sample folders, so we just include one copy of the library. So you'll have to place a copy within each sample folder before using it the first time.
Thx evs and xpressive. It indeed solved the problem :)
Hi All,
Has anyone been able to run any of the samples on a real device? I get a blank black screen when I try to run any of the samples. I made the suggested changes to the TextCandy.AddCharset
Nathan.
I haven't run any of the samples on the device, but I have created a score object, and my company logo screen using Text Candy, and they run flawlessly on the device.
mike4,
My own project and textcandy samples run fine in the Corona simulator but fail in the xcode simulator and an ipod touch v4.21. Using Corona.268, director class and ui.
Nathan.
I would like to use TC for displaying 1-3 short textfields of about 25 characters (same font always, with a size of 18) in a game that has rapid scene changes (something like Moron Test). I am restricted to change scenes quickly, with a delay of less than 500 ms. This is important for me.
I have already implemented a bitmap font solution but I've abandoned it because of the time it needs to construct the sprites (about 700-1200 milliseconds), althought the spritesheet remains constantly in memory.
Do you think that Texture Candy can give better results?
PS: A trial version would be ideal for such situations!
It works on the device for me
I make sure EVERYTHING is in the same folder to be on the safe side
Works great for me too for a number of text displays in my game (including device build). Note the requirement that libraries be placed in the root directory (in the same folder as main.lua)
Hi,
bought it and it's great :)
But how do you do a line break in a displayed text?i have something like "text = (points .. " POINTS"),", and i wand to insert a line break before "POINTS".
Use the pipe symbol | for line breaks
text = (points .. "|POINTS")
Please excuse the delayed reply, folks -we're currently not at our office, so it's hard to manage things from here :-(
@Magenda: if you need a very quick way to display texts (or sprites in general), you could try to create them before and set them to invisible, then make them visible just in time, using the .isVisible property. This should be faster than creating and removing objects. That's just a general hint, not specific to Text Candy.
@x-pressive
Yes, I use this method for other graphics in my game and it works nicely. The thing with the text is that I need 2-3 textfields for *each* level of the game and I am planning to build 30+ levels. As a result, ~100 textfields (x20-25 chars) would require too much memory and processing time to be preprocessed. If I can cap the bitmap font thing to <500 ms it would be ok for processing the sprites on the fly.
This is the reason I was asking about the TC speed.
Cheers
Has anyone used Text Candy on Android - if so what is the performance like (compared say to IOS)?
What is the performance like compared to using the basic font/text functions in Corona?
I already purchased Particle Candy a while ago and trying to decide whether the Text Candy package will be worthwhile for me.
I don't so much want the fancy effects, just want to know what it is like as a text manager and how fast it is. I currently use my own custom bitmap font renderer, but it may not be as fast as it coulde be.
Thanks!
Looking to purchase Particle Candy and Text Candy. Before doing so though I wanted to know if a bundle discount could be had or if my only option is to buy them for the full price (which I'd probably do separately in two different transactions in that case).
We will definately offer a bundle discount soon (as soon as the next Particle Candy update went out). Until then, the Text Candy coupon code (50% off) will still be valid.
I was wondering if you plan on releasing any more font packs?
Yes, there will be additional font packs, too, of course. Those will be "general" fonts, however. To achieve that "special look" that exactly fits to your game or title screen, you should also not hesitate to make your own. Since you can re-use your fonts in any of your projects, it's really worth the little effort.