This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 33546 - I18N - no way for l10n to set global font size
Summary: I18N - no way for l10n to set global font size
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 3.x
Hardware: All All
: P2 blocker (vote)
Assignee: mslama
URL:
Keywords: I18N
Depends on:
Blocks: 33246
  Show dependency tree
 
Reported: 2003-05-12 19:19 UTC by Ken Frank
Modified: 2008-12-23 12:55 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Diff (1.92 KB, patch)
2003-05-30 16:02 UTC, mslama
Details | Diff
Diff with changed bundle key name (1.94 KB, patch)
2003-06-03 10:58 UTC, mslama
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ken Frank 2003-05-12 19:19:33 UTC
Currently, the global
font is hardcoded and is not able to be modified
for a localization.
(user can set fontsize on startup but this relates
to l10n products)

New Chinese l10n has discovered that the default
font size is too small to properly display Chinese
characters.

So if the global fontsize can be set from a key in
a bundle file, that will be solve this problem.

Tim Boudreau can provide more information.

Also, as result of user using larger font
(whether in localized release or not), resizing
and hard coded font setting issues have appeared
and will be filed separately. 

Refer to issue 33246
and related issues.
Comment 1 Ken Frank 2003-05-12 19:24:14 UTC
Also, -fontsize should override
the value from bundle file;
as well as explicit font size
settings in theme file
Comment 2 Ken Frank 2003-05-12 19:39:03 UTC
Please waive this for 3.5 and
S1S nevada english releases -
this is for Chinese release which
happens after english one.
Comment 3 Marian Mirilovic 2003-05-13 08:44:22 UTC
I don't think it's a stopper for 3.5 / s1s5 releases, too.
Comment 4 mslama 2003-05-13 16:48:48 UTC
Tim please do you know anything about global fontsize in IDE? Where is
it defined?
Comment 5 _ tboudreau 2003-05-13 17:46:11 UTC
org.netbeans.core.Main, I think.  
Comment 6 mslama 2003-05-14 14:51:09 UTC
Please make clear what exact solution should be. Currently default
font size is taken from UIManager (for current L&F which is Metal by
default). Do you mean that this should be changed even if parameter
fontsize is not used? (by using some key from bundle file?) If there
will be no fontsize param and no key in bundle default L&F will be used.
Comment 7 mslama 2003-05-14 14:55:52 UTC
To be clear this could be as follows:

IF command line param "fontsize" is defined THEN
  set font size according "fontsize"
ELSE IF bundle key "CTL_keyFontSize" is defined THEN
  set font size according "CTL_keyFontSize"
ELSE
  use default font size from UIManager (L&F)
ENDIF
Comment 8 _ tboudreau 2003-05-14 15:15:14 UTC
Yes, that's the way to do it.

If the only way to check the existence of the key (I don't know,
I haven't looked at NbBundle closely) is to catch a 
MissingResourceExecption, maybe have some key like that should
be in the bundle if the bundle does not want to specify a font.
Comment 9 Jesse Glick 2003-05-14 16:21:33 UTC
Yes, you have to catch MRE to check for existence of a key. Suggest
just putting in the default bundle:

CTL_keyFontSize=

and check for an empty value.
Comment 10 mslama 2003-05-30 16:02:00 UTC
Here is diff of patch. Test for bundle key is performed AFTER command
line parameters are set. If uiFontSize is already set from command
line nothing is done. If uiFontSize is not set already bundle key is
checked.
Comment 11 mslama 2003-05-30 16:02:43 UTC
Created attachment 10530 [details]
Diff
Comment 12 David Simonek 2003-06-02 16:12:02 UTC
I reviewed the diff and it looks good, although I'd recommend to
rename CTL_keyFontSize to something more descriptive, say
CTL_globalFontSize ?
Comment 13 mslama 2003-06-03 10:58:55 UTC
Created attachment 10568 [details]
Diff with changed bundle key name
Comment 14 mslama 2003-06-03 11:00:29 UTC
Fixed in main trunk.

core/src/org/netbeans/core/Bundle.properties r.1.364
core/src/org/netbeans/core/Main.java r.1.163
Comment 15 David Simonek 2003-06-13 12:38:52 UTC
Reviewed by Dafe. OK.
Comment 16 mslama 2003-06-13 12:40:12 UTC
Fix is committed to branch {release35}.
Comment 17 pzajac 2003-06-18 13:06:43 UTC
verified[030616_1][win2k] if the CTL_keyFontSize property is seted in
core/src/org/netbeans/core/Bundle.properties, the default font size in
ide will be changed. 
Comment 18 Ken Frank 2003-07-21 21:43:54 UTC
verified in pseudo localized s1s ml by placing value in
the property and starting ide without fontsize value;
also, -fontsize does override this value

ken.frank@sun.com