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 144791 - I18N - font size might be hardcoded or font name might not be standard jdk font name
Summary: I18N - font size might be hardcoded or font name might not be standard jdk fo...
Status: RESOLVED FIXED
Alias: None
Product: javame
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: Sun All
: P3 blocker (vote)
Assignee: Andrew Korostelev
URL:
Keywords: I18N
Depends on:
Blocks:
 
Reported: 2008-08-21 21:37 UTC by Ken Frank
Modified: 2008-09-11 17:39 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ken Frank 2008-08-21 21:37:26 UTC
am scanning source code to find possible instances
of hardcoding of font sizes or font names that might
not be standard jdk font names

since hardcoding of font sizes can lead to resize issues
(which can often be solved by using dynamic resizing using
layout managers and by using global ide font size instead
of hardcoding.

and since using font names that are not standard jdk font
names can lead to some fonts not being found, especially
for asian or other non english fonts.

We realize that some of this code might not be used or that
some of these examples might not be applicable

also, this is not meant to be complete since other
instances of these situations might be present using other
api names than patterns used for scanning - please check
code to see if other such cases and fix as needed.

also, suggest checking code to see that usages of setSize
and setPreferredSize calls don't hardcode actual sizes of
dialogs or other windows if it means that dynamic resizing
would not happen in these cases


Here are some instance(s) found of these possible problems:

mobility.licensing:        jTextAreaTop.setFont(new java.awt.Font("Dialog", 1, 12));
mobility.licensing       jTextAreaBottom.setFont(new java.awt.Font("Dialog", 1, 12));


vmd
sampleLabel.setFont(new java.awt.Font("Dialog", 0, 12));
/src/org/netbeans/modules/vmd/midp/propertyeditors/resource/elements/FontEditorElement.java

vmd.game:        labelName.setFont(new java.awt.Font("Dialog", 1, 14));
vmd.io:        label.setFont (new Font ("Dialog", Font.BOLD,
16)); // NOI18N
vmd.io:        label.setFont (new Font ("Dialog", Font.BOLD,
16)); // NOI18N
vmd.midp.:        sampleLabel.setFont(new java.awt.Font("Dialog", 0, 12));
vmd.midp.:        lTitle.setFont(new java.awt.Font("Dialog",
1, 11));

j2me.cdc.project.ricoh
jLabel15.setFont(new java.awt.Font("Tahoma", 1, 12));
jLabel22.setFont(new java.awt.Font("Tahoma", 1, 11));
jLabel28.setFont(new java.awt.Font("Tahoma", 1, 11));
jLabel16.setFont(new java.awt.Font("Tahoma", 1, 11));
jLabel25.setFont(new java.awt.Font("Tahoma", 1, 11));
... more ...
src/org/netbeans/modules/j2me/cdc/project/ricoh/RicohProjectCategoryCustomizer.java
Comment 1 Karol Harezlak 2008-09-01 10:24:16 UTC
Well we do not support Solaris (officially) but definitely we should look at it.
Comment 2 Ken Frank 2008-09-01 16:55:46 UTC
I forgot to change platform to all, have done it now; these items
would impact any platform, assuming the code mentioned is actually used in current version.

ken.frank@sun.com
Comment 3 Andrew Korostelev 2008-09-10 13:56:20 UTC
fixed.

1) for j2me.cdc.project.ricoh
http://hg.netbeans.org/main/rev/eaec62846055

2) vmd.midp: sampleLabel.setFont(new java.awt.Font("Dialog", 0, 12));
It is font preview label. It shouold look as specified. The fame behaviour is in 'form' module.

3) vmd.midp: lTitle.setFont(new java.awt.Font("Dialog",
http://hg.netbeans.org/main/rev/444fb6ae0263

4)vmd.game
http://hg.netbeans.org/main/rev/9d8717c5ef27

5)vmd.io
http://hg.netbeans.org/main/rev/bc3535b5725d

6) mobility.licensing
http://hg.netbeans.org/main/rev/4aa34b7a0f7f
Comment 4 Quality Engineering 2008-09-11 17:39:31 UTC
Integrated into 'main-golden', will be available in build *200809111401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/eaec62846055
User: akorostelev@netbeans.org
Log: partial fix for #144791. j2me.cdc.project.ricoh is fixed