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 » Wed Jul 23, 2014 10:55 pm

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 » Thu Jul 24, 2014 12:19 am

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: 2853
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: What gives with character support in L2D?

Post by slime » Thu Jul 24, 2014 12:25 am

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 » Thu Jul 24, 2014 12:37 am

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 88 times
"Bump." -CMFIend420

User avatar
slime
Solid Snayke
Posts: 2853
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: What gives with character support in L2D?

Post by slime » Thu Jul 24, 2014 1:16 am

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 » Thu Jul 24, 2014 2:24 am

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 » Tue Mar 13, 2018 9:55 am

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 » Tue Mar 13, 2018 6:37 pm

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: 1951
Joined: Mon Jun 17, 2013 12:00 pm

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

Post by raidho36 » 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.

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 12:07 am

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: Bing [Bot] and 11 guests