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
Helvecta
Party member
Posts: 167
Joined: Wed Sep 26, 2012 6:35 pm

What gives with character support in L2D? [SOLVED]

Post 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?

Image
Last edited by Helvecta on Thu Jul 24, 2014 2:35 am, edited 1 time in total.
"Bump." -CMFIend420
0x29a
Prole
Posts: 27
Joined: Sun Jul 06, 2014 10:22 pm

Re: What gives with character support in L2D?

Post 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.
User avatar
slime
Solid Snayke
Posts: 3166
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: What gives with character support in L2D?

Post by slime »

Can you share a .love?
User avatar
Helvecta
Party member
Posts: 167
Joined: Wed Sep 26, 2012 6:35 pm

Re: What gives with character support in L2D?

Post 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.
Attachments
test.love
(712.25 KiB) Downloaded 304 times
"Bump." -CMFIend420
User avatar
slime
Solid Snayke
Posts: 3166
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: What gives with character support in L2D?

Post 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.
User avatar
Helvecta
Party member
Posts: 167
Joined: Wed Sep 26, 2012 6:35 pm

Re: What gives with character support in L2D?

Post 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! :P
"Bump." -CMFIend420
hasen
Party member
Posts: 157
Joined: Sat Jan 20, 2018 2:01 pm

Re: What gives with character support in L2D?

Post 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.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: What gives with character support in L2D?

Post 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.
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

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

Post 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.
User avatar
pgimeno
Party member
Posts: 3672
Joined: Sun Oct 18, 2015 2:58 pm

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

Post 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?
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 11 guests