The purpose of fallback fonts is to render something (that isn't a square or a question mark) when your main font doesn't have appropriate characters in it - not to render something pretty and with the same style and dimensions as your main font. This also means that you can use fallback font for all of your text rendering if you make your main font blank - or if there's none altogether.
That said, if you hard-code your text layout so that it works with one specific font but not with any other, you're already doing it wrong. Especially if you hard-code it for a fallback font and not the one you ship with the game.
What gives with character support in L2D? [SOLVED]
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: What gives with character support in L2D? [SOLVED]
Last edited by raidho36 on Wed Mar 14, 2018 1:30 am, edited 1 time in total.
- zorg
- Party member
- Posts: 3465
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: What gives with character support in L2D? [SOLVED]
Besides, most games include their own font anyway, for the reasons that have been mentioned. Whether or not you use an imagefont (or more) or ttf/odf formats, the size isn't really a problem either nowadays.
That said, if you want to be a smart sneak about it, you could do a thing: manually compose kanjis from building radicals; japanese has around 241 radicals only, so addressing them with a byte is good enough. Plus placement info.
That said, if you want to be a smart sneak about it, you could do a thing: manually compose kanjis from building radicals; japanese has around 241 radicals only, so addressing them with a byte is good enough. Plus placement info.
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Re: What gives with character support in L2D? [SOLVED]
Yeah well no one's gonna do it, not for all the 60-something thousand kanji glyphs and god knows how many chinese glyphs. Besides it's not just about hieroglyphical writing systems, there's also hebrew writing, cyrillic, arabic, hindi, etc., not to mention emojis. They all need support and any half-decent software is expected to have it. You can't possibly make a custom font supporting all of these, you need fallback fonts for this, there's just no way around it.
Re: What gives with character support in L2D?
Oh really? I wonder why this is exactly. Web browsers use onboard fonts no problem. If you use 'Arial' for example then it's gonna look the same on all devices. Especially if you set the size in pixels as well.
Re: What gives with character support in L2D? [SOLVED]
That's possible but would be rather hard to program. Considering how big Chinese fonts are it would be simpler to use images of text, unless you needed huge amounts of content that is. Why is it we don't get access to the onboard fonts? The 'usual suspects' are always there like Tahoma, Verdana, Helvetica, Arial etc. Plus at least one Chinese and Japanese font are present so as to avoid question marks appearing.
Even if it would cause issues, it would be nice to have the choice.
- zorg
- Party member
- Posts: 3465
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: What gives with character support in L2D? [SOLVED]
Generally speaking, i do agree with you, Raidho; even though some people might not like how Unicode handles kanjis (the han unification thing specifically) but at least that is still something that lists all or most characters you would ever need to use.raidho36 wrote: ↑Wed Mar 14, 2018 1:37 am Yeah well no one's gonna do it, not for all the 60-something thousand kanji glyphs and god knows how many chinese glyphs. Besides it's not just about hieroglyphical writing systems, there's also hebrew writing, cyrillic, arabic, hindi, etc., not to mention emojis. They all need support and any half-decent software is expected to have it. You can't possibly make a custom font supporting all of these, you need fallback fonts for this, there's just no way around it.
I'm talking about something more specific; for certain kinds of things, games, that you'd want to have a small footprint, there are ways. And not just with kanjis, some other systems can also be made combineable.
Last edited by zorg on Wed Mar 14, 2018 3:44 am, edited 1 time in total.
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
- zorg
- Party member
- Posts: 3465
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: What gives with character support in L2D?
Again, the issue is that IF for some reason, the computer wouldn't have the font you assumed everything had, it will need to fall back to something, literally breaking spacing in-game (think dialogue overflowing and such stuff)
zorg wrote: ↑Wed Mar 14, 2018 3:43 amWouldn't necessarily be that hard, just tedious; there are a lot of kanjis, but a textual combinatorical representation for the graphics of them can still be smaller than an imagefont (or a ttf)hasen wrote: ↑Wed Mar 14, 2018 3:34 amThat's possible but would be rather hard to program. Considering how big Chinese fonts are it would be simpler to use images of text, unless you needed huge amounts of content that is. Why is it we don't get access to the onboard fonts? The 'usual suspects' are always there like Tahoma, Verdana, Helvetica, Arial etc. Plus at least one Chinese and Japanese font are present so as to avoid question marks appearing.
Even if it would cause issues, it would be nice to have the choice.
Last edited by zorg on Wed Mar 14, 2018 3:43 am, edited 1 time in total.
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Re: What gives with character support in L2D?
Well you'd just fall back on the font that is included with Love if it really came to that. Web browsers do it like this, they fall back on more common fonts. At the end of the day, if your device is missing the most common fonts like Arial, Verdana etc you'll probably have text display problems all over the place anyway.
Again, it's just about having the choice to use them or not. It's like saying don't offer gamepad support at all because someone might have a gamepad that you don't support.
Ok, not really sure what your idea is about how to do that. Surely you'd have to program something that literally could understand Japanese/Chinese? How would you write a word in Chinese in the program to have it displayed and how would the program turn that into the correct character?
- zorg
- Party member
- Posts: 3465
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: What gives with character support in L2D?
Not talking about IMEs or input in general, just a way to convert an unicode codepoint (or rather, runs of them, since we don't want to store the codepoints themselves) into the visual glyphs using a custom radical-combiner function/library, that only stores the radicals; ~200 glyphs vs. 50000+ glyphs.hasen wrote: ↑Wed Mar 14, 2018 4:32 amOk, not really sure what your idea is about how to do that. Surely you'd have to program something that literally could understand Japanese/Chinese? How would you write a word in Chinese in the program to have it displayed and how would the program turn that into the correct character?
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Re: What gives with character support in L2D?
So you mean write the characters in Chinese in the code and this program will display them using combinations of radicals?zorg wrote: ↑Wed Mar 14, 2018 4:55 am Not talking about IMEs or input in general, just a way to convert an unicode codepoint (or rather, runs of them, since we don't want to store the codepoints themselves) into the visual glyphs using a custom radical-combiner function/library, that only stores the radicals; ~200 glyphs vs. 50000+ glyphs.
If you wanted a small footprint then just using the system fonts, at least for Chinese characters would be a simple way to go. If you want it to look really pretty or different then sure, add a Chinese font (or several) that is bigger than your whole game, but otherwise I think we should have the choice to use the system fonts to reduce game file size. I just don't see what harm is done by having the choice to go this way.
Who is online
Users browsing this forum: Amazon [Bot], Bing [Bot] and 5 guests