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 33667 - 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: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 3.x
Hardware: All All
: P2 blocker (vote)
Assignee: David Simonek
URL:
Keywords: I18N
Depends on:
Blocks: 33246
  Show dependency tree
 
Reported: 2003-05-15 20:22 UTC by Ken Frank
Modified: 2008-12-23 12:55 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
patch for font sizes (9.41 KB, patch)
2003-05-28 15:03 UTC, David Simonek
Details | Diff
refined patch, fully tested (9.78 KB, patch)
2003-05-29 15:37 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:22:25 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("Monospaced", Font.PLAIN, 12));
output.setFont(new Font("Monospaced", Font.PLAIN,
12));
tipsBrowser.setFont(new java.awt.Font("Dialog", 0,
11));
Comment 1 _ tboudreau 2003-05-16 10:44:58 UTC
Ken,

If you've analyzed the source code, please provide the specific
classes where this problem occurs - java source file & line number
would be ideal - preferable one issue for each instance of the
problem, so it can be assigned to the developer responsible for
that class.

Also, doesn't the umbrella task to fix this cover this issue?  I
suggest closing this issue as invalid and providing individual
issues (P2 if you want) to block the umbrella task issue for 
fixing this globally.
Comment 2 David Simonek 2003-05-28 15:03:18 UTC
Created attachment 10487 [details]
patch for font sizes
Comment 3 David Simonek 2003-05-28 15:05:25 UTC
attached patch should solve fontsize problems for core. I will test it
more and commit later.
Comment 4 David Simonek 2003-05-29 15:37:52 UTC
Created attachment 10510 [details]
refined patch, fully tested
Comment 5 David Simonek 2003-05-30 13:42:34 UTC
I'm taking this issue, hope you agree Marek.
Comment 6 David Simonek 2003-05-30 13:45:16 UTC
fixed in main trunk.

Cvs output:
/cvs/openide/src/org/openide/text/CloneableEditorSupport.java,v  <-- 
CloneableEditorSupport.java
new revision: 1.87; previous revision: 1.86
/cvs/openide/api/examples/org/netbeans/examples/modules/globalactions/TestAction.java,v
 <--  TestAction.java
new revision: 1.11; previous revision: 1.10
Comment 7 Ken Frank 2003-06-10 19:23:39 UTC
If verification should be in ide itself, can you
tell us what actual windows relate to the
code lines from original bug that were fixed ?

ken.frank@sun.com
Comment 8 David Simonek 2003-06-13 17:08:14 UTC
Answer to Ken: Editor windows which use default font (I don't know
which they are :-(
and window opened in example TestAction (you have to run the example
to see it).

Comment 9 David Simonek 2003-06-13 17:11:29 UTC
Fix merged into release35 branch:

/cvs/openide/api/examples/org/netbeans/examples/modules/globalactions/TestAction.java,v
 <--  TestAction.java
new revision: 1.10.4.1; previous revision: 1.10
/cvs/openide/src/org/openide/text/CloneableEditorSupport.java,v  <-- 
CloneableEditorSupport.java
new revision: 1.81.2.3; previous revision: 1.81.2.2
Comment 10 pzajac 2003-06-18 13:34:59 UTC
verified [030616_1]
OutputPanel
NotifyExceptionPanel
WelcomePanel