Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Fonts, transparancy and anti aliasing?

Author
Message
Fluorescent
FPSC Reloaded TGC Backer
19
Years of Service
User Offline
Joined: 1st Aug 2005
Location: Stockholm, Sweden
Posted: 3rd Apr 2016 06:36
When you make a font, what do you do to make sure it appears nice and crisp in AppGameKit? Because writing code is fun I've made my own little tool that creates an AppGameKit font bitmap from a ttf-file. It works very well, although I do have a bit of trouble managing the text hinting such as anti aliasing and clear type. The font will usually look a bit fuzzy in AGK.

So how do you guys do when making font files and making sure the font appears as nice and sharp as possible in AppGameKit?
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 3rd Apr 2016 08:31
To be a clear bitmap font, it must first be the correct size or larger. Shrinking images is better than magnifying them.
However, you have to weigh this up against good use of resources. I have an app where I need big numbers (25% of the screen size) so I have created a nice large font, but it only includes numbers and no letters or other characters.

Clear fonts usually have a small amount of anti-aliasing built in to them. This allows them to be resized better. A font with a 100% solid border will not resize as nicely.

I'm no expert, these are just the things I have picked up. I'm sure somebody will post with everything you need to know.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
Digital Awakening
AGK Developer
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 3rd Apr 2016 10:00
BatVink is correct. If you scale up a small font it will look fuzzy. AppGameKit will try to soften the text when you enlarge it by default (can be turned off). But if the source image is too small it becomes very noticeable. For the best result you should use a bitmap font of the same size as you will use in the game. I wouldn't worry too much about using up resources though.
Fluorescent
FPSC Reloaded TGC Backer
19
Years of Service
User Offline
Joined: 1st Aug 2005
Location: Stockholm, Sweden
Posted: 3rd Apr 2016 12:42
Since I usually use the percentage system, it's a smidge difficult to predict the exact size of the text.

I have however redone my little tool to make it easier to create a large font. So I'm now using Texture Packer to pack the characters on the sheet instead of doing it myself. And I've now got a much more efficient packing so I can create a bigger font. And I think it might be getting better.
Digital Awakening
AGK Developer
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 3rd Apr 2016 21:44
Quote: "Since I usually use the percentage system, it's a smidge difficult to predict the exact size of the text."


One of the many reasons why I think that you should not use the percentage system

Login to post a reply

Server time is: 2024-09-29 13:35:40
Your offset time is: 2024-09-29 13:35:40