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 / Improving ttf appearance

Author
Message
Jambo B
15
Years of Service
User Offline
Joined: 17th Sep 2009
Location: The Pit
Posted: 13th Aug 2017 17:03
Hi all,

I'm using a ttf font (Open Sans) to put the text onto a button, as in the image below.

The bottom image shows the button when the window is made smaller. As you can see, the font has lost some of its 'crispness' and shape as it is resized. It also looks like this on iOS.



Looking at the docs, it seems that an image is created internally when the ttf is loaded - presumably in the form of a sprite sheet, from which letters are copied to produce the piece of text. Is there any way to control the size of this sprite sheet, so that the font does not need scaling so much when the app is resized?

Thanks for any advice,

James
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 14th Aug 2017 13:06
The internal sprite sheet is redrawn when the text changes size, so it should look as good as possible at every size. That said the small sizes are more likely to reveal any bugs in this system. If you can send me a small example I'll take a look.
Jeff Miller
19
Years of Service
User Offline
Joined: 22nd Mar 2005
Location: New Jersey, USA
Posted: 14th Aug 2017 23:48
It's not just a fuzziness. I see a big kerning issue in the smaller button shown. Look at the spacing between the "B" and the "a".

Login to post a reply

Server time is: 2024-11-24 09:36:31
Your offset time is: 2024-11-24 09:36:31