[Plugin] Spritefont (28th August 2012)

0 favourites
From the Asset Store
Forget about default textbox restrictions, you can create sprites atop of the textbox
  • As for touch events, I'm not sure why SpriteFont would interfere with other plugins... Perhaps they obstruct touch areas, check SpriteFont instance sizes by toggling debug on.

  • requestAnimationFrame must be a C2 event? I just copied the error thrown in the cocoon console.

    The only plugins I use are "Function", and "Date" - so I doubt it is something in one of them.

    I think the touch stuff just stopped working because of the error thrown, probably crashed the function or layout.

  • Does it work properly outside CocoonJS?

  • I did minor testing to on chrome, to ensure that I had coded it correctly, and it was working.

  • This is great Mipey.

    Does anyone have a way to quickly make a font tileset/strip image? I'm using Photoshop and manually moving every character to align to a grid, and it's too tedious especially when you want to change something about the font again...

  • I just use monospaced fonts and type them out in one long line, then cut that line up into several to stack.

  • Ah ok, haven't heard that term before � thanks.

  • Hello, i would like to report the issue for mobile platforms.

    I tested a game using your sprite font with my iPod Touch 4, the game freezes.

    I exported with appMobi, i had no idea how to fix. Would you need my project files to test?

    Edit: It's exported with DirectCanvas

  • I tested this game without DirectCanvas, it worked very well, do you think you can update your plugin to work with DirectCanvas? maybe you should to contact Ashley or appMobi devs. I'm glad to help you if you need.

  • Are you using C2 r100? Also, I don't have any of the mobile platforms but Android, so I can't really test the plugin there. It's more or less hit and miss for me.

    Anyway, C2 r100 has introduced some rendering changes, specifically it now does effects automatically, so I probably should remove them from SpriteFont plugin and see if that helps. I'll see to it now.

  • Alright, I've updated SpriteFont for C2 r100. Note that effects won't work on older C2 releases, so only get Spritefont v8 if you are on C2 r100.

    All I've done is remove effects from draw functions and let C2 handle them.

    As for incompatibility with CocoonJS, I haven't received an answer from Ludei, though I've mailed them weeks ago, so nothing new on that front.

    I'm not sure why it wouldn't work on iPhone, either. I may have to revise how SpriteFont works (specifically creating and storing images; I'm using in-memory canvas).

    Maybe Ashley can give some insight?

  • Bug: text alignment breaks if scaling is applied. I have Text scale=2, Horz align=Center, Vert align=Middle. Doesn't center. Works if I set scaling back to 1.

    r100 & v8


  • blackhornet, I've checked it out. Seems that when upscaled, words no longer fit the word break criteria; words that are too long get broken into two lines, since words no longer fit the width.

    That's obviously undesirable, however it is a side effect of the word wrapping implementation.

    Also, text centering is grid-based, not bounding box based. It attempts to center the text within the maximum allowable grid, however at large scale there tends to be a lot of wasted space at bottom, which is why vertical alignment appears to be incorrect, especially if using even number of rows. Which of the two lines is the middle one?

    The alignment and wrapping methods are rather flawed, so I may have to rework them, however it is a hack job.

    I'll see if I can do something, but no promises. For now, keep those limitations in the mind.

  • For anyone who's interested, I've written a small utility for generating Sprite Font files. Available here: GiveYourFontsMono(spacing)

    Requires .NET 4 be installed. Usually available through Windows Update.

    Just enter the character set, set the parameters, and save the file.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hello Mipey, i found a bug that couldn't work on appMobi and CocconJS the posted replies were reported about this issue, there an error log you may see it:

    <img src="http://i.imgur.com/UxmtT.png" border="0" />

    I couldn't expand the details, it's used for CocoonJS iOS. I'm using r101

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)