Sign in to follow this  
PLAYERKILLERS

Bitmap fonts and anti-aliasing

Recommended Posts

I've noticed some strange behavior with bitmap fonts. For example the Press Start 2P font is originally a 8px font if I am not mistaken. Yet in the examples provided the font is 32px. This is fine when just using ascii or even Latin1 + Cyrillic from Google fonts. But when I include 12px Japanese glyphs it makes sense to scale everything down to 12px. 

https://fonts.google.com/specimen/Press+Start+2P

http://mplus-fonts.osdn.jp/mplus-bitmap-fonts/

After combining the two in fontforge I generate the image with bmfont. Yet at 12px the anti-aliasing in melon.js destroys the void spaces in letters like 'e' or 'a'. When I examine the generated image, I can see that there is an adequate void and that bmfont has produced an acceptable image. 

My conclusion is that melon.js has anti-aliased the font before scaling the image up. For me this seems like a bug. If anti-aliasing is applied globally by default, perhaps it should be applied after the sprites are scaled?

Otherwise, I have a somewhat acceptable result with an internationalized 24px bitmap font taking up an entire 2048x2048 texture. Something about it seems wrong, and I doubt that native Japanese users will find the result satisfactory. 

It has been hard to maintain readability and the retro look.

Share this post


Link to post
Share on other sites

interesting..... !

there is an antialias option when calling me.video.init, that is actually (or should be in theory) false by default, would you try to force it to false ?

also are you using the canvas or webgl renderer (the latter still has a few issues that needs to be worked out), if yes can you also try to force the CANVAS one instead  ? (either by removing the renderer option from the me.video.init properties list, or just change it to me.video.CANVAS).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.