GNOME Bugzilla – Bug 165678
When locale is cjk, font and font size don't be changed.
Last modified: 2009-09-22 01:48:06 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
That's because yelp-gecko-utils.cpp::yelp_gecko_set_font() only sets the fonts for the 'x-western' category.
*** Bug 313714 has been marked as a duplicate of this bug. ***
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
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.
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.
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.
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.
Patch has now been committed to HEAD. Closing.
This bug still happens in yelp 2.15.1 .
(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.
OS : Fedora development. Fedora uses mozilla 1.7.13 for gecho.
Ok then, back to FIXED.