Can not be displayed in Chinese

Do you need help? Ask here!

Bug reporting belongs here: http://developer.wz2100.net/newticket
-Kosh-
Trained
Trained
Posts: 203
Joined: 16 Sep 2009, 23:34

Re: Can not be displayed in Chinese

Post by -Kosh- »

mengcnt wrote:stderr.txt is empty
It is empty since you did not add -debug all to the shortcut or terminal.
This is a waste of space. Something important should be here.
mengcnt
Greenhorn
Posts: 9
Joined: 16 Oct 2009, 06:19

Re: Can not be displayed in Chinese

Post by mengcnt »

Thank you, now show normal Chinese
-Kosh-
Trained
Trained
Posts: 203
Joined: 16 Sep 2009, 23:34

Re: Can not be displayed in Chinese

Post by -Kosh- »

mengcnt wrote:Thank you, now show normal Chinese
What was the fix then?
Did you use the font that Zarel mentioned?

I take it the deja vu fonts do not have Chinese characters so when that question pops up in installer it should install a Chinese font as well?
This is a waste of space. Something important should be here.
mengcnt
Greenhorn
Posts: 9
Joined: 16 Oct 2009, 06:19

Re: Can not be displayed in Chinese

Post by mengcnt »

Use Zarel method "fontname = SimHei".
Instead SimHei successful. :)

Prior to failure with other Chinese characters do.
cybersphinx
Inactive
Inactive
Posts: 1695
Joined: 01 Sep 2006, 19:17

Re: Can not be displayed in Chinese

Post by cybersphinx »

I just experimented with this here, and it seems the game doesn't load a new font when it needs new charsets, but restarting it loads the needed font...

mengcnt: Can you completely undo all changes to the font directory and the config file, then start the game in English, select Chinese, quit, restart, and tell us if that works?

EDIT: Hm, looks like changing the fontname is needed after all, guess our substitutions suck.
User avatar
Zarel
Elite
Elite
Posts: 5770
Joined: 03 Jan 2008, 23:35
Location: Minnesota, USA
Contact:

Re: Can not be displayed in Chinese

Post by Zarel »

cybersphinx wrote:EDIT: Hm, looks like changing the fontname is needed after all, guess our substitutions suck.
And by "our" you mean "QuesoGLC/fontconfig's".

What do other programs use to render text, so they don't have our problems? o_O You'd think rendering text would be really simple, and built into the OS.
mengcnt
Greenhorn
Posts: 9
Joined: 16 Oct 2009, 06:19

Re: Can not be displayed in Chinese

Post by mengcnt »

Only need to be amended as "fontname = SimHei".
No other changes, it can be displayed properly.
Changed to "fontname = SimSun" is required.

But to find the correct font name is very difficult, which is in front of me to change the font other reasons for the failure bar.

The system font name are in Chinese characters, with the font file name is not OK.
cybersphinx
Inactive
Inactive
Posts: 1695
Joined: 01 Sep 2006, 19:17

Re: Can not be displayed in Chinese

Post by cybersphinx »

Zarel wrote:And by "our" you mean "QuesoGLC/fontconfig's".
By "our" I mean "those in the config files we include". fontconfig and quesoglc themselves don't have any substitutions, by default they use the font name, and if the font doesn't have all characters needed, bad luck.

The problem isn't so much rendering (that's a problem, too, but not the one we need solved here), but getting the characters one font doesn't supply from another.

When I use "sans" as font name in the game (generic name for a sans serif font that defaults to DejaVu Sans (or maybe Bitstream Vera Sans) here, but has substitutions for other charsets), I can choose any language, and after a restart a suitable font for e.g. Chinese is used (before the restart I get boxes as in the screenshot here), but for everything. When I use "DejaVu Sans", even after a restart, no other font is used. Using "DejaVu Sans" in other programs like Firefox or OpenOffice gives substitutes, though (and of course DejaVu itself for the characters it can display).

So it looks like QuesoGLC (0.7.2 here) somehow doesn't use fontconfig's substitutions, but gets a fontname from it and uses that font only... If that's the case, even getting good substitutions won't help. (And I'm not sure, but I think some time ago, maybe with an older glc version, this worked...)
User avatar
Zarel
Elite
Elite
Posts: 5770
Joined: 03 Jan 2008, 23:35
Location: Minnesota, USA
Contact:

Re: Can not be displayed in Chinese

Post by Zarel »

cybersphinx wrote:When I use "sans" as font name in the game (generic name for a sans serif font that defaults to DejaVu Sans (or maybe Bitstream Vera Sans) here, but has substitutions for other charsets), I can choose any language, and after a restart a suitable font for e.g. Chinese is used (before the restart I get boxes as in the screenshot here), but for everything. When I use "DejaVu Sans", even after a restart, no other font is used. Using "DejaVu Sans" in other programs like Firefox or OpenOffice gives substitutes, though (and of course DejaVu itself for the characters it can display).

So it looks like QuesoGLC (0.7.2 here) somehow doesn't use fontconfig's substitutions, but gets a fontname from it and uses that font only... If that's the case, even getting good substitutions won't help. (And I'm not sure, but I think some time ago, maybe with an older glc version, this worked...)
Either way, it's not going to work because we have no other font to substitute. We only bundle DejaVu Sans, and we don't load any fonts other than our bundled fonts because loading all fonts causes first-start to take around half an hour on Windows.

Why can't we just use OS-native font-rendering? :/
cybersphinx
Inactive
Inactive
Posts: 1695
Joined: 01 Sep 2006, 19:17

Re: Can not be displayed in Chinese

Post by cybersphinx »

Zarel wrote:Why can't we just use OS-native font-rendering? :/
Because we're making an OS-independent game? Besides, there is no such concept in Linux.
User avatar
Zarel
Elite
Elite
Posts: 5770
Joined: 03 Jan 2008, 23:35
Location: Minnesota, USA
Contact:

Re: Can not be displayed in Chinese

Post by Zarel »

cybersphinx wrote:
Zarel wrote:Why can't we just use OS-native font-rendering? :/
Because we're making an OS-independent game? Besides, there is no such concept in Linux.
This is what #ifdef is for!

And also abstraction. So we have a function that will call native functions in Win/Mac, and QGLC in Linux.
-Kosh-
Trained
Trained
Posts: 203
Joined: 16 Sep 2009, 23:34

Re: Can not be displayed in Chinese

Post by -Kosh- »

Zarel wrote:This is what #ifdef is for!
And also abstraction. So we have a function that will call native functions in Win/Mac, and QGLC in Linux.
Would that mean getting rid of quesoglc for windows? How would you render the text then? Bitmap font?

I guess it is now apparent that there is no need for that rather silly requester to pop up in the installer or maybe change the wording.
This is a waste of space. Something important should be here.
cybersphinx
Inactive
Inactive
Posts: 1695
Joined: 01 Sep 2006, 19:17

Re: Can not be displayed in Chinese

Post by cybersphinx »

Zarel wrote:This is what #ifdef is for!
I beg to differ. That's what system independent libraries are for.
And also abstraction. So we have a function that will call native functions in Win/Mac, and QGLC in Linux.
So you want to write a new abstraction layer? Why not look into glc and see if that can be made to work well (maybe by using native functions)? Else you just end up with a bad rewrite of (parts of) it.
-Kosh- wrote:I guess it is now apparent that there is no need for that rather silly requester to pop up in the installer or maybe change the wording.
There never was a need for it, but as usual "first implemented solution wins".
User avatar
Zarel
Elite
Elite
Posts: 5770
Joined: 03 Jan 2008, 23:35
Location: Minnesota, USA
Contact:

Re: Can not be displayed in Chinese

Post by Zarel »

cybersphinx wrote:I beg to differ. That's what system independent libraries are for.
System independent libraries that have been causing tons of problems for us?

The problem with many of the smaller system independent libraries is that they have problems on all platforms not named Linux. (GTK does that, too, and it's not even one of the smaller ones...)
cybersphinx wrote:There never was a need for it, but as usual "first implemented solution wins".
Meh, how's about bundling a Chinese font? Anyone know of any Free Chinese fonts?
cybersphinx
Inactive
Inactive
Posts: 1695
Joined: 01 Sep 2006, 19:17

Re: Can not be displayed in Chinese

Post by cybersphinx »

Zarel wrote:
cybersphinx wrote:I beg to differ. That's what system independent libraries are for.
System independent libraries that have been causing tons of problems for us?

The problem with many of the smaller system independent libraries is that they have problems on all platforms not named Linux. (GTK does that, too, and it's not even one of the smaller ones...)
I don't mind using a different library if you know a better one. But how can those libraries improve when people return to their system specific ifdefs as soon as they encounter a problem?
Meh, how's about bundling a Chinese font? Anyone know of any Free Chinese fonts?
I get a strong feeling of déjà vu here...
Post Reply