Change default font?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Change default font?
How can I change the default font? I'm not talking about using a custom font but rather selecting from the fonts available on the device ie iOS, desktop etc.
Re: Change default font?
I think I pondered with the same question and the general answer is "bring your own fonts".
- tentus
- Inner party member
- Posts: 1060
- Joined: Sun Oct 31, 2010 7:56 pm
- Location: Appalachia
- Contact:
Re: Change default font?
The cross-section of universally available fonts is laughable, so you're best off distributing your fonts with your project. For some code examples to get you going, probably start here:
https://love2d.org/wiki/love.graphics.newFont
https://love2d.org/wiki/love.graphics.newFont
Kurosuke needs beta testers
Re: Change default font?
Yes I know about the custom fonts, I was just thinking there must be a way to change fonts built in. Even serif to sans serif can make a big difference. The standard fonts available on mac and ios devices is actually quite a lot. http://iosfonts.com/ They both even include fonts for languages like Japanese and Chinese. Chinese fonts can tend to be pretty huge since there is no alphabet so including a font could add some weight to the game that would otherwise not be needed.tentus wrote: ↑Sun Mar 11, 2018 7:32 pm The cross-section of universally available fonts is laughable, so you're best off distributing your fonts with your project. For some code examples to get you going, probably start here:
https://love2d.org/wiki/love.graphics.newFont
Is there no way to select a font using the functions for custom fonts? Even selecting a font by name that is already in the system? Seems weird not to have it. If you can't choose then what in fact is the font normally used by default?
- tentus
- Inner party member
- Posts: 1060
- Joined: Sun Oct 31, 2010 7:56 pm
- Location: Appalachia
- Contact:
Re: Change default font?
As far as I can see it's Vera:
https://bitbucket.org/rude/love/src/6ff ... ew-default
So, to expand a bit: love is cross-platform, so you can't base the list of available fonts on just mac. You have to look at Windows XP+, Ubuntu, Android, etc etc etc. It'd be nice to be able to select a font by name from the OS, but if you can't count on it being present then you'd have to provide it yourself, at which point there stops being so much point to having the feature. Don't get me wrong, it'd be cool to have a css-like graceful fallback system, but games tend to be a bit more sensitive with fonts than webpages are.
Kurosuke needs beta testers
Re: Change default font?
Having no font fallback system means that the game won't be supporting any and all characters not included in the font you bundled with the game. Absolute majority of fonts don't cover even a sliver of Unicode, and you cannot hope to create a font that covers it to 100%.
Which is probably fine if your game has no multiplayer support and you don't intend on supporting translations such as Japanese, Russian, Polish or even German. If that's not the case, then you're in trouble.
Which is probably fine if your game has no multiplayer support and you don't intend on supporting translations such as Japanese, Russian, Polish or even German. If that's not the case, then you're in trouble.
Re: Change default font?
No you don't 'have to' at all. It's perfectly fine to develop just for iOS or just for Android or whatever you want. So you can look up whatever fonts are available on the system and use which ones you want to. Just in the same way as you can't expect to cater for every device and every OS version etc. Most new iOS apps for example don't support OS 7 or below. You can't make things perfect that run on everything and all the same.
The whole point of cross platform is that you can target all or any systems, not that you have to target all of them.
Yes exactly. With just question marks displaying for Japanese it's not really working as it is.
Who is online
Users browsing this forum: Google [Bot] and 2 guests