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 165678 - When locale is cjk, font and font size don't be changed.
When locale is cjk, font and font size don't be changed.
Status: RESOLVED FIXED
Product: yelp
Classification: Applications
Component: General
2.13.x
Other All
: High normal
: ---
Assigned To: Shaun McCance
Yelp maintainers
: 313714 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-01-30 08:12 UTC by sangu
Modified: 2009-09-22 01:48 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14


Attachments
patch from chpe to possibly fix this issue (8.75 KB, patch)
2006-02-17 03:13 UTC, Brent Smith (smitten)
none Details | Review
What I was thinking of (8.73 KB, patch)
2006-02-18 14:22 UTC, Don Scorgie
committed Details | Review

Description sangu 2005-01-30 08:12:16 UTC
Please describe the problem:
When locale is cjk ( ex: LANG=ko_KR.UTF-8 ), font and font size don't be changed.

Steps to reproduce:
1. $LANG=ko_KR.UTF-8 yelp
2. Change font or font size ( yelp menu -> Edit -> Preferences)
3. 


Actual results:


Expected results:


Does this happen every time?
always

Other information:
yelp version is 2.9.3
Comment 1 Christian Persch 2005-02-15 17:26:18 UTC
That's because yelp-gecko-utils.cpp::yelp_gecko_set_font() only sets the fonts
for the 'x-western' category.
Comment 2 Christian Persch 2005-08-18 15:14:01 UTC
*** Bug 313714 has been marked as a duplicate of this bug. ***
Comment 3 Brent Smith (smitten) 2006-01-07 20:24:22 UTC
smitten hello chpe 
smitten we are discussing bug 165678
smitten is there a reason we should not set the same font size for ALL the different regions?
chpe well usually you want bigger size for CJK
chpe which will be too large for latin text
smitten ok.
smitten So we have the problem where the user is a chinese user, but some docs are in english
smitten or part of the TOC is in english and part in chinese
chpe right
smitten then changing the font size for both zh_TW and x-western would give either text that is too small in english or too small in chinese
smitten not sure how to fix this.
shaunm chpe: so do we need to do a complicated font dialog like browsers have?
shaunm chpe: also, if people really need to set separate fonts like that, why doesn't the desktop font preferences allow you to do so?
smitten shaunm: I think because it is assumed that the desktop only uses a single language
shaunm huh
shaunm now see, I think just about everybody is bound to run into some latin text in their desktop
chpe shaunm: I think it's assumed that you set the desktop font and size for your primary language. and I do think it probably sucks for CJK since as you said they're bound to encounter much latin text
Comment 4 Brent Smith (smitten) 2006-02-17 03:13:08 UTC
Created attachment 59548 [details] [review]
patch from chpe to possibly fix this issue

Compiled against gecko 1.7, seems to work fine.

Need someone to test with gecko 1.8 to see if toggling between using system fonts and a user defined font in the Edit -> Preferences Menu takes a significant amount of time, or causes significant disk I/O.
Comment 5 Don Scorgie 2006-02-17 13:33:57 UTC
Hi,

I'll test this when I get home.  Just looking at the patch briefly:

+#include "yelp-gecko-utils.h"
...
-	yelp_html_initialize ();
+	if (!yelp_gecko_init ())
...
+
+	yelp_gecko_shutdown ();

Can we instead put the yelp_gecko_init stuff into yelp_html_initialize and chuck the shutdown stuff into a new yelp_html_shutdown function (Calling yelp_gecko_shutdown from this new function)?

This would keep all gecko stuff in yelp-html and the gecko specific files, keeping yelp (somewhere close to) back-end independant ;)  Just in case we ever want to change to a different rendering engine one day?</shaunm>

+	yelp_register_printing ();
If this line is left in, it seems that yelp_register_printing is called twice.  It should probably be called from (the new function) yelp_gecko_init as opposed to the current yelp_html_init.

Other than that it looks ok from my reading.  I'll try it when I get home though.
Comment 6 Christian Persch 2006-02-18 00:05:54 UTC
I'd rather not put the init in yelp-html; that file is the gecko html embed widget, not a general dumping ground for gecko stuff (that's what yelp-gecko-utils is for :). If a different backend ever materialises (which I don't think will happen :), it'll be easy to sort this out.
The yelp_register_printing line in yel- was accidentally left-over, and should be removed.
Comment 7 Don Scorgie 2006-02-18 14:22:01 UTC
Created attachment 59647 [details] [review]
What I was thinking of

This is the same as Christian's patch, only going through yelp-html.  All the stuff is still in yelp-gecko-utils, it just saves directly adding gecko stuff outside of gecko files.  It also moves the register_printing from the html_init to the new gecko_init function.  It doesn't really make any difference, it just feels slightly cleaner to me this way.

For reference, I tried this with gecko 1.8 (firefox 1.5) and didn't notice any speed issues.  Seems fine.

From reading the patch a bit more, it sets all the font sizes for all languages to the same size.  Comment #3 seems to suggest this is a bad idea...  Just wondering.
Comment 8 Don Scorgie 2006-04-19 19:00:45 UTC
Patch has now been committed to HEAD.  Closing.
Comment 9 sangu 2006-05-10 07:51:53 UTC
This bug still happens in yelp 2.15.1 .
Comment 10 Christian Persch 2006-05-11 09:52:40 UTC
(In reply to comment #9)
> This bug still happens in yelp 2.15.1 .
> 

Which gecko version do you use? Mozilla 1.7/firefox 1.0 will still have the bug, it's only fixed with gecko 1.8.
Comment 11 sangu 2006-05-11 10:03:38 UTC
OS : Fedora development.
Fedora uses mozilla 1.7.13 for gecho.

Comment 12 Christian Persch 2006-05-11 12:57:57 UTC
Ok then, back to FIXED.