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 33699

Summary: I18N - hardcoded font sizes in source code not relative to global font
Product: platform Reporter: Ken Frank <kfrank>
Component: -- Other --Assignee: David Simonek <dsimonek>
Status: VERIFIED FIXED    
Severity: blocker CC: mmirilovic
Priority: P2 Keywords: I18N
Version: 3.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 33246    
Attachments: diff of the patch solving this issue

Description Ken Frank 2003-05-18 17:40:49 UTC
Analysis of source code of current product shows
some some calls to setFont that hardcode a certain
font
size that isn't relative to global font size.

Usually, fonts are obtained from the global font
size
value of the product. But sometimes specific font
sizes
are wanted, and if so, they should be assigned
based on
a relative offset from the default font size
instead of
as a specific size.

This is because the localized products will soon
be able
to set the default font size needed for proper
appearance
of their character sets, and hardcoded fonts may
be too
small for meeting those requirements.

If there are other parts of code where hardcoded
font siz
e
might be set other than setFont, can you also
review it?
If the code shown below is not part of
product,please
close issue.

Issue marked with FONTSIZE keyword which means it
will
not be placed on dashboards for 3.5 or nevada as
needing waiving but fixes still need to be for the
ML
release of 3.5/Nevada.

Also will mark as blocking 33246, general task on
resizing of windows, which deals also with font
size
setting.

Specific calls to setFont seen in source code:
label.setFont (new Font ("Serif", Font.ITALIC |
Font.BOLD
, 24));
pane.setFont (new Font ("Monospaced", Font.PLAIN,
12)
Comment 1 David Simonek 2003-05-29 17:37:11 UTC
Created attachment 10514 [details]
diff of the patch solving this issue
Comment 2 David Simonek 2003-05-30 13:49:12 UTC
fixed in main trunk.

cvs output:
/cvs/core/src/org/netbeans/core/ui/WelcomePanel.java,v  <-- 
WelcomePanel.java
new revision: 1.49; previous revision: 1.48
/cvs/core/src/org/netbeans/core/ui/WelcomePanel.form,v  <-- 
WelcomePanel.form
new revision: 1.24; previous revision: 1.23
/cvs/core/src/org/netbeans/core/NotifyException.java,v  <-- 
NotifyException.java
new revision: 1.48; previous revision: 1.47
/cvs/core/src/org/netbeans/core/Splash.java,v  <--  Splash.java
new revision: 1.79; previous revision: 1.78
/cvs/core/libsrc/org/netbeans/lib/terminalemulator/Term.java,v  <-- 
Term.java
new revision: 1.35; previous revision: 1.34
Comment 3 Ken Frank 2003-06-10 19:30:43 UTC
If verification should be in actual ide,
can you tell us specific windows affected
by these code changes ?

ken.frank@sun.com
Comment 4 David Simonek 2003-06-13 16:40:58 UTC
Ouch! During additional testing, I found out that fix in Splash.java
is not correct, because in splash font size should be ignored (as
splash is not resizable).
I reverted the fix from main trunk and I'll not put it in release35,
so everything should be OK.

Answer to Ken: Output window, every Exception dialog and old Welcome
Screen (which is not used now AFAIK) are affected.
Comment 5 David Simonek 2003-06-13 17:14:49 UTC
Fix merged into release35 branch:

/cvs/core/libsrc/org/netbeans/lib/terminalemulator/Term.java,v  <-- 
Term.java
new revision: 1.31.34.1; previous revision: 1.31
/cvs/core/src/org/netbeans/core/ui/WelcomePanel.java,v  <-- 
WelcomePanel.java
new revision: 1.48.30.1; previous revision: 1.48
/cvs/core/src/org/netbeans/core/ui/WelcomePanel.form,v  <-- 
WelcomePanel.form
new revision: 1.23.4.1; previous revision: 1.23
/cvs/core/src/org/netbeans/core/NotifyException.java,v  <-- 
NotifyException.java
new revision: 1.45.2.1; previous revision: 1.45
Comment 6 pzajac 2003-06-18 13:42:03 UTC
[verified][030616_1][win2k]