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 33668 - I18N - hardcoded font sizes in source code not relative toglobal font
Summary: I18N - hardcoded font sizes in source code not relative toglobal font
Status: VERIFIED FIXED
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 3.x
Hardware: Sun Solaris
: P2 blocker (vote)
Assignee: issues@guibuilder
URL:
Keywords: I18N
Depends on:
Blocks: 33246
  Show dependency tree
 
Reported: 2003-05-15 20:25 UTC by Ken Frank
Modified: 2003-07-21 21:41 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
patch whch solves the issue, text version (1.87 KB, patch)
2003-05-29 17:25 UTC, David Simonek
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ken Frank 2003-05-15 20:25:10 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 if specific font sizes
are needed, 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 t
o
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 size
might be set other than setFont, can you also
review
that ?

Tim Boudreau can provide information also on
general
issue.

Issue will be 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 and Nevada.

Specific calls to setFont seen in source code:
setFont(new Font("Dialog", Font.BOLD, 12))
Comment 1 David Simonek 2003-05-29 17:25:19 UTC
Created attachment 10512 [details]
patch whch solves the issue, text version
Comment 2 David Simonek 2003-05-30 14:13:06 UTC
fixed in main trunk.

cvs output:

/cvs/form/src/org/netbeans/modules/form/fakepeer/FakeComponentPeer.java,v
 <--  FakeComponentPeer.java
new revision: 1.23; previous revision: 1.22
/cvs/form/src/org/netbeans/modules/form/actions/EventsAction.java,v 
<--  EventsAction.java
new revision: 1.30; previous revision: 1.29
Comment 3 Ken Frank 2003-06-10 19:26:05 UTC
if verification should be in ide itself,
can you tell us what window corresponds to the
code line that was fixed ?

ken.frank@sun.com
Comment 4 Tomas Pavek 2003-06-11 15:35:59 UTC
I've completed the fix:

/cvs/form/src/org/netbeans/modules/form/fakepeer/FakePeerSupport.java
new revision: 1.15; previous revision: 1.14

/cvs/form/src/org/netbeans/modules/form/BeanSupport.java
new revision: 1.31; previous revision: 1.30
Comment 5 Tomas Pavek 2003-06-11 15:50:39 UTC
The fix actually cannot be verified because it has probably no visual
effect (the font used will still have 12pts). Unfortunately I have no
option to test it by myself.

The problem is in the font size of designed components in the form
designer - form editor creates the components with real default font
as the form would have when running as standalone application, having
no explicit font set and not influeneced by the IDE custom look&feel
modification.

I don't know how the IDE font size is actually set - if it is via the
-fontsize switch, then the designed forms will use the real look&feel
and AWT default 12pts fonts; if the font size is automatically
adjusted on the look&feel level when running on another locale, then
the form editor will use this default font size correctly. But in both
case I think that the form editor behaves correctly now.
Comment 6 Miloslav Metelka 2003-06-13 16:37:14 UTC
Integrated into [release35]:
Checking in src/org/netbeans/modules/form/BeanSupport.java;
/cvs/form/src/org/netbeans/modules/form/BeanSupport.java,v  <-- 
BeanSupport.java
new revision: 1.30.30.1; previous revision: 1.30
done
Processing log script arguments...
More commits to come...
Checking in src/org/netbeans/modules/form/actions/EventsAction.java;
/cvs/form/src/org/netbeans/modules/form/actions/EventsAction.java,v 
<--  EventsAction.java
new revision: 1.29.2.1; previous revision: 1.29
done
Processing log script arguments...
More commits to come...
Checking in src/org/netbeans/modules/form/fakepeer/FakeComponentPeer.java;
/cvs/form/src/org/netbeans/modules/form/fakepeer/FakeComponentPeer.java,v
 <--  FakeComponentPeer.java
new revision: 1.22.4.1; previous revision: 1.22
done
Checking in src/org/netbeans/modules/form/fakepeer/FakePeerSupport.java;
/cvs/form/src/org/netbeans/modules/form/fakepeer/FakePeerSupport.java,v
 <--  FakePeerSupport.java
new revision: 1.14.2.1; previous revision: 1.14
done
Comment 7 Ken Frank 2003-07-21 21:41:36 UTC
verified as per comments from developer below since this is not
one that can be verified in the ide itself.