After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 161027 - inadequate fallback mechanism of the win32 backend of pango
inadequate fallback mechanism of the win32 backend of pango
Status: RESOLVED DUPLICATE of bug 162681
Product: pango
Classification: Platform
Component: win32
1.16.x
Other Windows
: Normal normal
: ---
Assigned To: gtk-win32 maintainers
pango-maint
: 637166 (view as bug list)
Depends on: 311651
Blocks:
 
 
Reported: 2004-12-11 13:50 UTC by Shixin Zeng
Modified: 2011-03-02 21:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
A snapshot showing the garbage text. (28.44 KB, image/png)
2004-12-11 13:53 UTC, Shixin Zeng
Details
the file shown in the last screenshot (1.48 KB, application/octet-stream)
2004-12-13 11:10 UTC, Shixin Zeng
Details

Description Shixin Zeng 2004-12-11 13:50:43 UTC
As the attachment shows, the Chinese text "你好"(means "hello" in English) in
the cell"A1" is garbage, while in the edit line is OK.
if the cell is selected to modify, then the Chinese text is shown fine. Also, If
a proper font is chosen for the cell, it would be shown fine. But it would be
very boring that you must choose a font for each cell manually.
Comment 1 Shixin Zeng 2004-12-11 13:53:31 UTC
Created attachment 34731 [details]
A snapshot showing the garbage text.
Comment 2 Morten Welinder 2004-12-12 21:22:43 UTC
Could you create a sample workbook for us that shows the problem, please?
(Adding it as attachment here would be perfect.)
Comment 3 Shixin Zeng 2004-12-13 11:10:57 UTC
Created attachment 34793 [details]
the file shown in the last screenshot

the sheet only contains one cell "A1" which is a Chinese word. So to display
it, there must be Chinese fonts on your box. When I select the cell, the edit
entry is shown fine, but the cell itself can't be displayed until you choose a
Chinese font for it. However, if you double clicked on the cell to modify it,
it would be displayed fine. It sounds a werid problem.
Comment 4 Morten Welinder 2004-12-13 16:01:18 UTC
I get little boxes with hex codes in them for both cases.  That is probably a
sign of not having the right font.
Comment 5 Dominic Lachowicz 2004-12-13 16:05:31 UTC
i get little boxes without hex codes in them for both cases. this is probably a
case where i don't have the right font.
Comment 6 Morten Welinder 2004-12-14 01:51:51 UTC
At home (Gnumeric 1.3.92, SuSE 9.1) I get the right characters both in the edit
line and in the cell.
Comment 7 Shixin Zeng 2004-12-14 12:05:43 UTC
I reported the bug for Gnumeric on windows, not on Linux.
:)
Comment 8 Jody Goldberg 2004-12-14 16:31:42 UTC
Our default font is 'Sans' and we're not being terribly careful to ensure that
it contains the necessary glyphs.

owen : Is GtkEntry being smart enough to notice that the selected font does not
have the glyphs or is it just using a better default font ?
Comment 9 Owen Taylor 2004-12-14 17:06:50 UTC
With Pango/Xft you will never get hex boxes if any font on your system has
the glyphs. 

Not really familiar with the details on Win32, Cc'ing Tor to comment there.

The reason that the entry is working and the sheet not might be that the
system default font is being picked up for the user interface and that
is a Chinese default font.

Ideally 'Sans' would combine together fonts to handle all languages, but
I'm not sure if it will in practice.
Comment 10 Dominic Lachowicz 2004-12-15 20:44:37 UTC
gtk-wimp is smart enough to set the GtkEntry's font to your MS Windows font,
which would have the necessary glyphs. that would explain the difference.
Comment 11 Ivan Wong 2004-12-17 18:56:34 UTC
> gtk-wimp is smart enough to set the GtkEntry's font to your MS Windows font,
> which would have the necessary glyphs. that would explain the difference.
No, with the default "pango.aliases" from Tor, gtk-wimp doesn't display CJK as 
it uses the font Tahoma (which doesn't contain CJK characters):

http://www.ivanwong.info/gnumeric/gnm_wimp.png

On the contrary, as the default "pango.aliases" have these aliases:

sans = "arial,browallia new,mingliu,simhei,gulimche,ms gothic,latha,mangal"
serif = "times new roman,angsana new,mingliu,simsun,gulimche,ms 
gothic,latha,mangal"
monospace = "courier new,courier monothai,mingliu,simsun,gulimche,ms 
gothic,latha,mangal"

The "Default" theme is happy to display CJK (mingliu and simhei are Chinese 
fonts). I added one the following statement in pango.aliases of gnumeric-1.x.x-
rcx.exe to make sure that gtk-wimp is ok with CJK too:

Tahoma = "Tahoma,browallia new,mingliu,simhei,gulimche,ms gothic,latha,mangal"

The problem described by Shixin can be explained by these two screenshots:

http://www.ivanwong.info/gnumeric/gnm_def01.png
http://www.ivanwong.info/gnumeric/gnm_def02.png

I guess non-editing cells of Gnumeric are not rendered with pango.
Comment 12 Ivan Wong 2004-12-17 19:12:50 UTC
> I guess non-editing cells of Gnumeric are not rendered with pango.
I think I was wrong. e.g with these aliases:

Tahoma = "Tahoma,browallia new,mingliu,simhei,gulimche,ms gothic,latha,mangal"
Impact = "Impact,browallia new,mingliu,simhei,gulimche,ms gothic,latha,mangal"

Selecting the fonts Tahoma or Impact in Gnumeric solves the problem (and of 
course, it doesn't work without those aliases)

However, it's very interesting that with the default aliases of 
sans/serif/monospace, selecting sans/serif/monospace doesn't display those 
characters correctly.
Comment 13 Tor Lillqvist 2004-12-17 19:33:52 UTC
This might also be yet another case of bug #152997, in case your Pango is 
1.6.0? Did you get Pango binaries bundled with Gnumeric? Have you tried 
replacing them with the 1.4.1 binaries from www.gimp.org/win32/downloads.html?
Comment 14 Ivan Wong 2004-12-17 20:27:22 UTC
Yes I use pango 1.6.0 in the Gnumeric package. However, since I am well aware 
of 152997 (I reported it), I did remove the implementation of the covers method 
before building. It has no problem displaying CJK in any official Gtk+ widgets.
Comment 15 Ivan Wong 2005-07-26 13:41:56 UTC
Partially fixed:

2005-07-26  Ivan, Wong Yat Cheung  <email@ivanwong.info>

	* src/style.c (style_font_new_simple): use
	pango_font_description_copy() so that we store the exact
	font description we pass to pango. Partially Fix #161027.

However, it only guarantees that gnumeric uses the exact aliases on Win32. Users
will still not be able to see Asian characters if he choose a Latin font due to
the inadequate fallback mechanism of the win32 backend of pango.
Comment 16 Ivan Wong 2005-07-26 13:43:52 UTC
#15 s/Latin font/Latin font which doesn't have a appropriate alias/
Comment 17 André Klapper 2006-09-29 18:30:59 UTC
ivan, do you still face this issue (if so, which version are you running) or can this be closed as obsolete?
Comment 18 Shixin Zeng 2006-10-11 02:10:54 UTC
Yes, the problem Ivan mentioned in comment #15 still exists in Gnumeric 1.7.1 downloaded from http://www.gnome.org/~mortenw/gnumeric/gnumeric-1.7.1-win32-1.exe
Comment 19 Ivan Wong 2006-10-11 04:09:59 UTC
(In reply to comment #17)
> ivan, do you still face this issue (if so, which version are you running) or
> can this be closed as obsolete?
Yes, due to the same reason.

Comment 20 Tor Lillqvist 2006-10-11 10:46:50 UTC
This bug should be retargeted at Product:pango and the Summary: shoud be made more correct. (Non-"Englishness" is not the issue here (after all, most of the common Latin script fonts in Windows contain lots of caracters that aren't used in English). Font coverage and fallback mechanisms is.) And actually, this bug probably then will in fact clearly be a duplicate of some already filed bug.
Comment 21 Jody Goldberg 2007-07-16 00:11:48 UTC
Tor : Good idea.
Comment 22 Behdad Esfahbod 2009-01-06 07:09:50 UTC
Tor: Like, dupe of bug 162681?
Comment 23 Behdad Esfahbod 2011-03-02 21:34:17 UTC
*** Bug 637166 has been marked as a duplicate of this bug. ***
Comment 24 Behdad Esfahbod 2011-03-02 21:35:35 UTC

*** This bug has been marked as a duplicate of bug 162681 ***