About the necessity of using Sprite fonts vs Text objects

Discussion and feedback on Construct 2

Post » Thu Sep 08, 2016 9:09 pm

Hi everyone,

I would like to ask a question : how mandatory is it to use sprite fonts vs text objects for a game to be released on Steam?

I ask this questions because @SketchyLogic posted here that "Switching from regular text to spritefont text was a nasty process."
Is it really mandatory to do that transition from Text objects to sprite objects for a professional-quality game? Why should I bother to do this if the text object is working well? In my case, this switch will take literally weeks, so I'd like to avoid that if possible.

The only thing that I can think of is that if there is no internet connexion, the font switches back to a default font, but who's not connected to the internet nowadays?
B
32
S
6
G
1
Posts: 352
Reputation: 2,812

Post » Thu Sep 08, 2016 9:33 pm

About the only time I would consider it a necessity would be if it was a pixel art type of game.
That's just a matter of taste.
Especially when you consider there are fonts that mimic pixel art.
Image ImageImage
B
169
S
50
G
174
Posts: 8,330
Reputation: 110,804

Post » Thu Sep 08, 2016 11:54 pm

If it works, there's no reason to switch. As far as I know, you can also embed fonts for offline use: https://www.scirra.com/tutorials/237/ho ... -web-fonts

The main differences are that spritefonts can be customized to look however you want and are easier to render, but text objects are easier for translating a game into multiple languages.
Moderator
B
95
S
34
G
33
Posts: 3,006
Reputation: 27,874

Post » Fri Sep 09, 2016 1:08 am

I'll tell you why I made the switch: I discovered that Windows magnification settings would cause regular text to be displayed at "incorrect" sizes. I needed my text to look absolutely consistent between computers, and I couldn't find a way to make text objects ignore the magnification settings, so I figured it would be easier to just switch to sprite fonts rather than have unreadable text for any players who had the setting turned on.

I don't think this is a big issue, especially since only a tiny portion of players use Windows magnification, but it's worth considering if you suddenly see enormous text on someone's computer.

Edit: rephrased for clarity.
B
20
S
6
Posts: 29
Reputation: 2,160

Post » Fri Sep 09, 2016 2:19 am

@SketchyLogic - I was going to try getting around that problem by turning off the display scaling for the exe in properties/compatability (right click the exe), but I haven't tried it on another machine yet so I don't know if that setting will carry over when installed on another computer.
Moderator
B
95
S
34
G
33
Posts: 3,006
Reputation: 27,874

Post » Fri Sep 09, 2016 6:59 am

Very interesting replies!
Thanks @Arima for the link, but unless I'm missing something this tutorial is for creating my own web font, with a trick to avoid the default font showing up briefly before the webfont is downloaded when being online. I don't see anything regarding offline usage of web fonts. Still useful! ;)

@SketchyLogic
Thanks a lot for the clarification. I was really wondering the reason behind the change and am reliefed that it's not something like "Steam prevents you from using web fonts". ^^' Thanks also for driving my attention towards the windows magnification issue. I was unaware of it.
B
32
S
6
G
1
Posts: 352
Reputation: 2,812

Post » Fri Sep 09, 2016 8:13 am

In the tutorial partway down it describes how to import a font into the project files which get distributed with the game and how to use it. Isn't that what you're looking for?
Moderator
B
95
S
34
G
33
Posts: 3,006
Reputation: 27,874

Post » Sun Sep 11, 2016 9:07 pm

@Arima My appologies, I don't know how it happened, but for some reason I missed it! I probably need to sleep more. ^^'
So yes, this is exaclty what I was looking for, thanks a lot!!
B
32
S
6
G
1
Posts: 352
Reputation: 2,812

Post » Tue Mar 14, 2017 9:08 am

@Arima
Did you manage to get what's in that tutorial to work in order to have the webfont in a game exported with NW.js, when the computer doesn't have internet access? It doesn't seem to work for me.
If you need more details, I started a thread here. Seems like it's possible with a external tool though.
B
32
S
6
G
1
Posts: 352
Reputation: 2,812

Post » Tue Mar 14, 2017 10:18 am

the reasons i seen where this two:

1 text are heavier as cpu usage atleast in my tests. it might be that text object might be faster by 1 kb or .0.01 on my test was way faster with spritefonts.

2 text font, is not supported on mobiles, its always going to look as arial instead of the custom font you set it in the template(example: Miryad pro bold size 30).
B
78
S
23
G
69
Posts: 1,353
Reputation: 43,985

Next

Return to Construct 2 General

Who is online

Users browsing this forum: Yahoo [Bot] and 16 guests