What gives with character support in L2D? [SOLVED]

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
User avatar
zorg
Party member
Posts: 2732
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: What gives with character support in L2D?

Post by zorg » Wed Mar 14, 2018 6:47 am

hasen wrote:
Wed Mar 14, 2018 6:34 am
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.
So you mean write the characters in Chinese in the code and this program will display them using combinations of radicals?
Yep, along with some very minor typesetting.
hasen wrote:
Wed Mar 14, 2018 6:34 am
zorg wrote:
Wed Mar 14, 2018 3:35 am
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.
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.
I'll agree that supporting a variant of newFont or something that could look for fonts on a system level would be nice; löve accepts pull requests so people can contribute. :3

And yes, i was thinking that this way, one could have it look, not necessarily pretty, but unique; and the footprint would be small, yet it would still support the number of glyphs needed... possibly even more. (counting possible combinations that don't have any set meaning... yet; this kinda only appears in chinese though, not japanese to my knowledge)
Me and my stuff :3True 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.

hasen
Party member
Posts: 157
Joined: Sat Jan 20, 2018 2:01 pm

Re: What gives with character support in L2D?

Post by hasen » Wed Mar 14, 2018 7:44 am

zorg wrote:
Wed Mar 14, 2018 6:47 am
Yep, along with some very minor typesetting.
Ok I see. It's probably the future (or at least should be) for displaying Chinese on computers. Then font sets would simply need to contain the 241 radicals. This way they wouldn't be a whole lot bigger than the standard latin script alphabet fonts. Considering the size of Chinese fonts I'm surprised it's not being used anywhere already?

User avatar
zorg
Party member
Posts: 2732
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: What gives with character support in L2D? [SOLVED]

Post by zorg » Wed Mar 14, 2018 8:31 am

People are trying, but nothing that'd be standardized enough for generic usage.
https://en.wikipedia.org/wiki/Chinese_c ... n_language is a (somewhat incomplete) example.
(And as for input: https://en.wikipedia.org/wiki/Cangjie_input_method)
Me and my stuff :3True 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.

User avatar
pgimeno
Party member
Posts: 1907
Joined: Sun Oct 18, 2015 2:58 pm
Location: Valencia, ES

Re: What gives with character support in L2D? [SOLVED]

Post by pgimeno » Wed Mar 14, 2018 11:29 am

raidho36 wrote:
Wed Mar 14, 2018 1:25 am
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.
Well, I was addressing this claim:
raidho36 wrote:
Tue Mar 13, 2018 9:27 pm
Speaking of fonts though. There really should be a functionality to use the system fallback font. Coincidentally, that will make bundling a font with LÖVE unnecessary.
I don't buy that you're doing it wrong if you design for a specific font in your text, including the bundled one. We're not talking web design here, we're talking game design. And I fail to see how having system fonts as fallback makes unnecessary to bundle a font with Löve.

hasen wrote:
Wed Mar 14, 2018 3:28 am
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.
First, as a Linux user who did not install Arial for a long while, I have to disagree. Second, web pages are not comparable to games. Games typically reserve specific, restricted spaces for text, and if the font is slightly different, it may for example wrap at the wrong point and overflow an area which wasn't designed for having a scrollbar. I've occasionally seen aberrations of that kind.
hasen wrote:
Wed Mar 14, 2018 4:32 am
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.
I didn't. As I said, web pages are a different beast.

hasen
Party member
Posts: 157
Joined: Sat Jan 20, 2018 2:01 pm

Re: What gives with character support in L2D? [SOLVED]

Post by hasen » Wed Mar 14, 2018 11:40 am

zorg wrote:
Wed Mar 14, 2018 8:31 am
People are trying, but nothing that'd be standardized enough for generic usage.
https://en.wikipedia.org/wiki/Chinese_c ... n_language is a (somewhat incomplete) example.
(And as for input: https://en.wikipedia.org/wiki/Cangjie_input_method)
Ok yeah I guess it's not easy. Chinese and computers have never really gone together that well. This would go a long way to resolving that.
pgimeno wrote:
Wed Mar 14, 2018 11:29 am
First, as a Linux user who did not install Arial for a long while, I have to disagree. Second, web pages are not comparable to games. Games typically reserve specific, restricted spaces for text, and if the font is slightly different, it may for example wrap at the wrong point and overflow an area which wasn't designed for having a scrollbar. I've occasionally seen aberrations of that kind.
Ok fair enough, well it's a choice, like I said. If you want to be guaranteed perfect identical fonts on every single device even if people don't have 'Arial' then sure, use the built in love font or add your own. But for others who need Chinese and don't want to dectuple the size of their game it would be good to have the choice to gamble on at least one Chinese font being there on the system. Beats question marks at least.

You could even attach a font for critical use where size really mattered, like in the game gui to display health, score etc but use a system font for the instructions for example.

User avatar
raidho36
Party member
Posts: 1951
Joined: Mon Jun 17, 2013 12:00 pm

Re: What gives with character support in L2D? [SOLVED]

Post by raidho36 » Wed Mar 14, 2018 12:20 pm

The reason LÖVE bundles a font is that you can print text without any fonts bundled with the game. Otherwise it wouldn't be able to print anything and you'd always needed your own font even for something as basic as printing "hello world". You could just use fallback font for this and it would be the same thing, and therefore LÖVE wouldn't need its own bundled font.

User avatar
tentus
Inner party member
Posts: 1060
Joined: Sun Oct 31, 2010 7:56 pm
Location: Appalachia
Contact:

Re: What gives with character support in L2D? [SOLVED]

Post by tentus » Thu Mar 15, 2018 1:09 pm

I suspect part of the reason there is not a fallback system is that the dev team doesn't want to open the support floodgates with this. Not to put words in their mouths, of course, but I certainly wouldn't want to deal with constant questions about "my text looks fine on this windows but my friend on mac looks different." In my work we've left off from programming relatively easy features simply because we didn't want to deal with the user confusion. It's much easier to simply say "we have a default font, if you want something different ship it yourself, it's literally a couple lines of code and a file."
Kurosuke needs beta testers

hasen
Party member
Posts: 157
Joined: Sat Jan 20, 2018 2:01 pm

Re: What gives with character support in L2D? [SOLVED]

Post by hasen » Thu Mar 15, 2018 1:46 pm

tentus wrote:
Thu Mar 15, 2018 1:09 pm
I suspect part of the reason there is not a fallback system is that the dev team doesn't want to open the support floodgates with this. Not to put words in their mouths, of course, but I certainly wouldn't want to deal with constant questions about "my text looks fine on this windows but my friend on mac looks different." In my work we've left off from programming relatively easy features simply because we didn't want to deal with the user confusion.
It seems to me that giving users no choice would cause just as many problems. As we can see from the responses here. If there more people here trying to make games in foreign languages, especially Asian, there would be even more comments about this.

I doubt people would complain about that anyway. Just look at the games of the past, a game for Spectrum, C64, Amstrad, Amiga, Atari ST and PC all looked completely and utterly different...way more than just a font being two pixels to the left or whatever, but still it wasn't a problem.
tentus wrote:
Thu Mar 15, 2018 1:09 pm
It's much easier to simply say "we have a default font, if you want something different ship it yourself, it's literally a couple lines of code and a file."
Yes, in the case for Chinese it's a font file from about 5mb to 50mb...can be up to ten times the size of your whole game in fact. That's just ONE font too, which probably won't be enough for a whole game in Chinese.

It seems most Love2d developers develop in English and for desktop computers. But for mobile and Chinese language, with fonts, size becomes a big issue in Love2d.

User avatar
zorg
Party member
Posts: 2732
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: What gives with character support in L2D? [SOLVED]

Post by zorg » Thu Mar 15, 2018 3:58 pm

Then again, i'd probably not play a game that used some bog default font, ideographs or not, unless it used such a font for meta reasons (overused example being comic sans in undertale), but a game using arial or whatever to me seems like it's not even trying to have its own character; like what you'd expect from a prototype.

MS Mincho is probably similar in terms of one expecting just a bit less generic font in a game, and there are other fonts available with ideographs. (that are useable in games free/open/commercial/whatever AND can be redistributed)

As for the filesize, since phones nowadays do have a relatively large space, even if only with sd cards or whatever, it still comes down to a tradeoff between wanting less of a filesize to your game, or having a more unique font.
Me and my stuff :3True 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.

User avatar
raidho36
Party member
Posts: 1951
Joined: Mon Jun 17, 2013 12:00 pm

Re: What gives with character support in L2D? [SOLVED]

Post by raidho36 » Thu Mar 15, 2018 8:41 pm

The idea is that you create a nice custom font for the languages you are able to support (e.g. latin and basic european) and missing characters are used from fallback font. That way you can have Russian translation but you don't need to design all Cyrillic characters, Japanese translation without designing kana and majority of kanji, etc. And remember that if your game is multiplayer, it doesn't even need to have the relevant translation to need to support these characters - people will try to use their home language for communication and your game better have support for it. It won't look quite as good but you don't have many options there - it's either that or question marks.

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests