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 226694 - I18N: footer strings garbled on "Go To Line or Bookmark" dialog
Summary: I18N: footer strings garbled on "Go To Line or Bookmark" dialog
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Navigation (show other bugs)
Version: 7.3
Hardware: PC Linux
: P3 normal (vote)
Assignee: Miloslav Metelka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-26 04:48 UTC by Masaki Katakai
Modified: 2013-06-10 02:21 UTC (History)
1 user (show)

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 Masaki Katakai 2013-02-26 04:48:56 UTC
It seems that the following code is not working for Japanese
environment on Linux.

editor.bookmarks/src/org/netbeans/modules/editor/bookmarks/ui/GotoLineOrBookmarkPanel.java :

                Font font = keyChooserLabel.getFont();
                font = new Font(font.getName(), font.getStyle(), Math.max(1, Math.round(0.8f * font.getSize())));
                keyChooserLabel.setFont(font);

font.getName() returns "DejaVu Sans" and it causes garbled characters.

Please see the screenshot. A community member kindly sent it to me.

http://ow.ly/i/1zVvh

If there is no strong reason to use smaller font here,
please remove the code and use the same font.

If smaller font needs to be used, I think deriveFont() should work.

font = keyChooserLabel.getFont().deriveFont(Math.max(1,Math.round(0.8f * font.getSize()))); 

Please evaluate.
Comment 1 Milutin Kristofic 2013-06-05 12:30:53 UTC
Thank you, I used your deriveFont idea. 

http://hg.netbeans.org/jet-main/rev/b24a0d216eab
Comment 2 Quality Engineering 2013-06-10 02:21:24 UTC
Integrated into 'main-golden', will be available in build *201306100004* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/b24a0d216eab
User: Milutin Kristofic <mkristofic@netbeans.org>
Log: #226694 - I18N: footer strings garbled on "Go To Line or Bookmark" dialog