Bug Issue: Bitmap fonts appear to be broken


Pages: 1

oripessach

  • Subscriber - Stencyl Studio
  • *
September 17, 2015, 11:10:30 pm
using the draw text block after selecting my bitmap font doesn't seem to do anything - the text isn't drawn. Selecting a normal (ttf) font does work with the same code.

As an additional data point, using the same bitmap font in the dialog extension results in what looks like garbage being drawn to the screen.

See the attached game.
« Last Edit: September 17, 2015, 11:11:31 pm by oripessach »


New attachment added by oripessach - September 17, 2015, 11:11:12 pm


Issue updated by Jon - September 18, 2015, 09:58:16 pm


Issue updated by Jon - September 20, 2015, 10:45:22 pm
  • Status changed from New to Assigned


Jon

  • Chief Stencyler
  • *
September 22, 2015, 02:25:38 pm
As an ongoing update, we're still looking into this but haven't had any breakthroughs yet.


captaincomic

  • Master Stencyler
  • *
September 24, 2015, 08:06:00 pm
The exception that you have been getting here: http://community.stencyl.com/index.php/topic,43845.0.html should be fixed, but I haven't found a solution to the real problem for the bitmap font scaling being off yet.


oripessach

  • Subscriber - Stencyl Studio
  • *
September 24, 2015, 08:12:47 pm
So... Can you maybe make recommendations about which bitmap size might work, perhaps? Anything I can do to work around the bug?

Failing that, can you send me an NDA and the source?  :)


Jon

  • Chief Stencyler
  • *
September 24, 2015, 11:47:32 pm
See my attached screenshot. Is this what you're seeing when you attempt to open the font in the editor? (I didn't even have to run the game)

What  I'm seeing is a bitmap font that's 64 x 64 (it looks awfully small?) with bounds that look misplaced. Whatever the cause is, the reason why nothing draws is because the bounds, as currently defined, are pulling from empty space in the image.

What's unclear to me is what your original intent was. My guess is that the bounds are correct, but the image is smaller than was intended - perhaps 4-times smaller? Could you attach the original image you intended to import?
« Last Edit: September 25, 2015, 12:06:14 am by Jon »


New attachment added by Jon - September 24, 2015, 11:47:43 pm


oripessach

  • Subscriber - Stencyl Studio
  • *
September 25, 2015, 06:40:48 am
I attached the original bitmap I used. As you can see, the problem is that it wasn't originally 64x64 - it gets resized by Stencyl when I import it, but all the font's coordinates aren't resized.

What should probably be happening is that the bitmap needs to be padded to a power of two size instead of reduced in size so much. Whatever Stencyl is doing there, it isn't right.


New attachment added by oripessach - September 25, 2015, 07:54:18 am


Jon

  • Chief Stencyler
  • *
September 25, 2015, 12:41:32 pm
OK, this is what I'm observing.

I import the image @ 1x scale. Looks fine in editor now but is still broken in game. If I close the resource and reopen, still looks fine. Now, I close game and reopen, and it comes back to the original broken state. I'm guessing that something odd's happening in the write out process. It doesn't have to do with the power of two stuff and looks to me like wrong scaling. (It thinks the imported image is 4x, so it quarters its size)
« Last Edit: September 25, 2015, 12:42:02 pm by Jon »


Jon

  • Chief Stencyler
  • *
September 25, 2015, 10:22:19 pm
I've fixed this in the latest private release. Please confirm the fix by re-importing the image, then saving.
  • Issue Assigned from captaincomic to Jon
  • Status changed from Assigned to Resolved


oripessach

  • Subscriber - Stencyl Studio
  • *
September 26, 2015, 11:11:21 am
I tested the latest build, and it does seem to fix the problem. Thanks!


Issue updated by Jon - September 30, 2015, 12:42:26 pm
  • Status changed from Resolved to Closed


Pages: 1

Details

  • Reported
    September 17, 2015, 11:10:30 pm
  • Updated
    September 30, 2015, 12:42:26 pm

  • View Status
    Public
  • Type
    Bug
  • Status
    Closed
  • Priority
    Normal
  • Version
    3.3.2
  • Fixed in
    (none)
  • Assigned to
    Jon
  • Category
    Engine

Tags


Attachments

* Another bitmap font test.stencyl (303.22 kB - downloaded 98 times.)

* Screen Shot 2015-09-24 at 11.41.12 PM.png (97.28 kB, 1361x978 - viewed 186 times.)

* 0.png (1.86 kB, 170x170 - viewed 170 times.)