Page 1 of 4
What gives with character support in L2D? [SOLVED]
Posted: Wed Jul 23, 2014 10:55 pm
by Helvecta
In the below image, I am trying to test compatibility of the Tahoma font included with Windows. On the left is Skype, with what I assume is full support for simplified Chinese. On the right is the same font utilized in a love2d application, with no support for the same characters. The fonts are the same, so I assume the issue is with the framework?
Can anyone shed light on why L2D hates Tahoma (and pretty much all fonts when using foreign languages), while Skype is so comfortable with foreign characters that it has full character support in pretty much every font on my system?
Re: What gives with character support in L2D?
Posted: Thu Jul 24, 2014 12:19 am
by 0x29a
Just a shot - maybe there's something wrong with encoding on a text editor you're using?
Just searched through forum and there was a folk with a similar problem. It turned out that txt encoding went wrong.
Re: What gives with character support in L2D?
Posted: Thu Jul 24, 2014 12:25 am
by slime
Can you share a .love?
Re: What gives with character support in L2D?
Posted: Thu Jul 24, 2014 12:37 am
by Helvecta
0x29a wrote:Just a shot - maybe there's something wrong with encoding on a text editor you're using?
Just searched through forum and there was a folk with a similar problem. It turned out that txt encoding went wrong.
I took a look, too - I think you're referring to
this thread, which is also a problem but I've taken care of that. Doesn't seem to have any effect on this square-character issue, unfortunately
slime wrote:Can you share a .love?
Sure thing! Maybe I misunderstand how fonts work, hopefully I'm missing something.
Re: What gives with character support in L2D?
Posted: Thu Jul 24, 2014 1:16 am
by slime
FreeType is claiming those characters aren't in the font file (or it doesn't know that they're there, at least.)
You can check with Font:hasGlyphs("测").
EDIT: I used a third party font inspector program to double-check, and the font files inside that .love don't have any Chinese characters inside them.
Re: What gives with character support in L2D?
Posted: Thu Jul 24, 2014 2:24 am
by Helvecta
Hmm. Bothersome. I wonder how Skype is able to support those characters then? I mean, they're both using the Tahoma font - or so Skype suggests..
Oh well, the search continues; thanks for checking out the font for me - and informing me of the font:hasGlyphs() function!
EDIT: I'm beginning to believe that Skype utilizes
fallback fonts which are not actually Tahoma. I'll look into it more and see if I can whip up a font fallback module of some sort.
EDIT2: I'm almost certain a lack of
Microsoft-specific text-input/display GUI is the cause of my strife, so Love2d definitely isn't the culprit, which is good. I guess this information solves the thread!
Re: What gives with character support in L2D?
Posted: Tue Mar 13, 2018 9:55 am
by hasen
Helvecta wrote: ↑Thu Jul 24, 2014 2:24 am
EDIT: I'm beginning to believe that Skype utilizes
fallback fonts which are not actually Tahoma. I'll look into it more and see if I can whip up a font fallback module of some sort.
It seems strange that Love2d has a default font which must be on the device's system but unlike Skype, it doesn't find a default font for Japanese and Chinese even if they
are on the system...which in this day and age is pretty much always. It just displays question marks instead. Chinese fonts range in size from 7mb to 50mb...my game is currently just 5mb so adding even just one Chinese font will significantly inflate the overall size.
Here's hoping the next love update will at least scan the system for one font to use as default for Asian languages.
Re: What gives with character support in L2D?
Posted: Tue Mar 13, 2018 6:37 pm
by bartbes
hasen wrote: ↑Tue Mar 13, 2018 9:55 am
It seems strange that Love2d has a default font which must be on the device's system
Love includes a font. It doesn't use system fonts at all.
Re: What gives with character support in L2D? [SOLVED]
Posted: Tue Mar 13, 2018 9:27 pm
by raidho36
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.
Re: What gives with character support in L2D? [SOLVED]
Posted: Wed Mar 14, 2018 12:07 am
by pgimeno
No it won't?
How can you rely on the text layout being cross-platform if you don't use the same font in all systems?