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 33703 - I18N - hardcoded font sizes in source code not relative to global font
Summary: I18N - hardcoded font sizes in source code not relative to global font
Status: VERIFIED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Code (show other bugs)
Version: 3.x
Hardware: Sun Solaris
: P2 blocker (vote)
Assignee: sgleason
URL:
Keywords: I18N
Depends on:
Blocks: 33246
  Show dependency tree
 
Reported: 2003-05-18 17:54 UTC by Ken Frank
Modified: 2008-07-02 10:22 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
diff of the patch which solves this issue (1.35 KB, patch)
2003-05-30 14:24 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-18 17:54:04 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:
this.setFont (new java.awt.Font ("Dialog", 0,
11));
Comment 1 _ rkubacki 2003-05-19 07:53:41 UTC
web/taglibed/src/org/netbeans/modules/web/taglibed/view/MultiLineLabel.java:
  this.setFont (new java.awt.Font ("Dialog", 0, 11));			 // NOI18N
Comment 2 David Simonek 2003-05-30 14:24:12 UTC
Created attachment 10529 [details]
diff of the patch which solves this issue
Comment 3 David Simonek 2003-05-30 14:26:00 UTC
fixed in main trunk.

cvs output:
Checking in
/cvs/web/taglibed/src/org/netbeans/modules/web/taglibed/view/MultiLineLabel.java,v
 <--  MultiLineLabel.java
new revision: 1.2; previous revision: 1.1
Comment 4 Ken Frank 2003-06-10 19:36:55 UTC
if verification should be in actual ide,
can you tell us specific window that relates
to code that was fixed ?

ken.frank@sun.com
Comment 5 sgleason 2003-06-12 21:12:19 UTC
integrated in S1S5 ML (tag release35) IN=13764
Comment 6 Ken Frank 2003-07-22 19:39:45 UTC
still waiting for information of where exactly
in ide this can be verfied.

ken.frank@sun.com
Comment 7 Petr Dvorak 2008-07-02 10:22:02 UTC
Verified.

Issue is marked as FIXED for 5 years and the attached diff patch shows that the code was modified so that absolute font
size is not used in MultiLineLabel component ("public class MultiLineLabel extends javax.swing.JTextArea"). Anyway, the
code looks probably much different these days:)...