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 214347 - Small font in editor search field
Summary: Small font in editor search field
Status: VERIFIED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Search (show other bugs)
Version: 7.2
Hardware: PC Linux
: P1 normal with 1 vote (vote)
Assignee: Milutin Kristofic
URL:
Keywords: L&F, REGRESSION
: 214886 215001 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-06-18 08:46 UTC by Tomas Mysik
Modified: 2012-07-19 08:32 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
screen shot (12.49 KB, image/png)
2012-06-18 08:46 UTC, Tomas Mysik
Details
Log patch (2.22 KB, patch)
2012-06-20 13:41 UTC, Milutin Kristofic
Details | Diff
IDE log (46.57 KB, text/x-log)
2012-06-21 09:28 UTC, Tomas Mysik
Details
font settings (77.17 KB, image/png)
2012-06-21 10:34 UTC, Tomas Mysik
Details
GTK LAF (85.26 KB, image/png)
2012-06-21 10:44 UTC, Tomas Mysik
Details
Metal LAF (80.51 KB, image/png)
2012-06-21 10:44 UTC, Tomas Mysik
Details
Search Bar after fix (8.90 KB, image/png)
2012-06-22 11:32 UTC, Milutin Kristofic
Details
Mac (119.77 KB, image/png)
2012-06-22 18:17 UTC, Ralph Ruijs
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Mysik 2012-06-18 08:46:16 UTC
Created attachment 120968 [details]
screen shot

Have a look at the screen shot, not sure if it is a stopper (I would prefer "yes" if it is not L&F specific).

Thanks.

Product Version: NetBeans IDE 7.2 RC1 (Build 201206172200)
Java: 1.6.0_33; Java HotSpot(TM) 64-Bit Server VM 20.8-b03
System: Linux version 3.4.3-030403-generic running on amd64; UTF-8; cs_CZ (nb)
Comment 1 Marian Mirilovic 2012-06-18 08:52:38 UTC
I agree ... Milutin, please evaluate ... Thanks in advance.
Comment 2 Tomas Mysik 2012-06-18 08:55:14 UTC
BTW today, I updated my JDK from 6u32 to 6u33, may be related...

Thanks.
Comment 3 Milutin Kristofic 2012-06-18 10:20:28 UTC
Mila and I were fixing to have system default font in searchbar. Bug #213354 and its duplicate. 

What is your default font in system? I can add minimal font size.
Comment 4 Tomas Mysik 2012-06-18 11:15:11 UTC
(In reply to comment #3)
> What is your default font in system? I can add minimal font size.

Likely Ubuntu 10 (not sure how to get this information on Kubuntu).
Comment 5 David Strupl 2012-06-20 09:38:19 UTC
Regression --> P1.
Comment 6 Milutin Kristofic 2012-06-20 13:41:33 UTC
Created attachment 121101 [details]
Log patch

Please, can you try this logging. 
-J-Dorg.netbeans.modules.editor.search.SearchComboBoxEditor.level=500
Comment 7 Tomas Mysik 2012-06-21 03:54:18 UTC
(In reply to comment #6)
> Created attachment 121101 [details]
> Log patch

Is the patch commited in the repo?
Comment 8 Milutin Kristofic 2012-06-21 09:07:40 UTC
No the patch is not in repo. You are the only one reporting issue, so I am hoping you can help me by applying patch and sending logs.

I was testing it in my Ubuntu Gnome installation, and I see correct font name and size. I think your problem is in Kde installation and gtk laf.
Comment 9 Tomas Mysik 2012-06-21 09:28:30 UTC
(In reply to comment #8)
> No the patch is not in repo.

Just curious - why not? Logging can be useful anytime for anyone...

Anyway I have applied the patch, attaching the log here.

Thanks.
Comment 10 Tomas Mysik 2012-06-21 09:28:50 UTC
Created attachment 121151 [details]
IDE log
Comment 11 Tomas Mysik 2012-06-21 09:30:43 UTC
BTW it would be great if anyone else with KDE could try to reproduce this issue. Maybe it is just my problem (some strange or corrupted configuration?).
Comment 12 Milutin Kristofic 2012-06-21 09:37:43 UTC
ok, I will commit it later to repository.

It's interesting that your font size is 11 and it is so small, mine is Ubuntu 10 and it is normal.
Comment 13 Tomas Mysik 2012-06-21 10:34:55 UTC
Created attachment 121156 [details]
font settings

Just to be sure, attaching my font settings. As one can see, I have set Ubuntu font everywhere (no Sans Serif).
Comment 14 Tomas Mysik 2012-06-21 10:43:42 UTC
(In reply to comment #12)
> mine is Ubuntu 10 and it is normal.

Since NB uses GTK LAF on Ubuntu, I tried to set it as well and - no issue. So it seems that it is LAF related. I will attach 2 screen shots - one with GTK LAF and the other one with my default LAF (Metal).

Thanks.
Comment 15 Tomas Mysik 2012-06-21 10:44:25 UTC
Created attachment 121158 [details]
GTK LAF

Please notice that the used font in the serach text is OK.
Comment 16 Tomas Mysik 2012-06-21 10:44:48 UTC
Created attachment 121160 [details]
Metal LAF
Comment 17 Milutin Kristofic 2012-06-21 13:01:59 UTC
Great, I can reproduce it with --laf Metal

Thanks.
Comment 18 Milutin Kristofic 2012-06-21 13:47:10 UTC
This fix will change font from serif to sans-serif which doesn't have serifs.
http://hg.netbeans.org/jet-main/rev/3b55f5dfd244

Font size is ok, 11 is enough, it just need to be centered. Mila will try to center it.
Comment 19 Miloslav Metelka 2012-06-22 11:13:18 UTC
A textComponent with "AsTextField" client property now displays vertically centered text and is not affected by a current line wrapping setting.
http://hg.netbeans.org/jet-main/rev/b4aaa5ec50be
Comment 20 Milutin Kristofic 2012-06-22 11:32:04 UTC
Created attachment 121213 [details]
Search Bar after fix

I tested it with Metal laf and it is now in the bottom. Is this intended? GTK laf is OK
Comment 21 Miloslav Metelka 2012-06-22 12:38:17 UTC
No, definitely not, it should be vertically centered. It works fine for me both on Metal and GTK. I'll make a fresh build and re-test.
Comment 22 Miloslav Metelka 2012-06-22 13:38:49 UTC
I have re-tested and it still works fine with the fix. mkristofic reported in the meantime that it works for him as well.
Comment 23 Vladimir Voskresensky 2012-06-22 14:22:42 UTC
Editor team. Is the fix is 
http://hg.netbeans.org/jet-main/rev/b4aaa5ec50be
?
If yes, then fine, because it is not yet propagated into cnd-main.
And currently the behavior on my machine is even worse than before :-)
Previously fonts was small, now characters just invisible...
Comment 24 Miloslav Metelka 2012-06-22 15:44:46 UTC
Vladimir, you've probably hit the same problem as I did sometimes - the lineHeightCorrection was in certain cases initialized later than a FontInfo for default font and since lineHeightCorrection was zero the text looked tiny. Anyway
b4aaa5ec50be should fix that problem.
Comment 25 Milutin Kristofic 2012-06-22 15:46:44 UTC
In release72:

3b55f5dfd244 transplanted to 690d172738d7
b4aaa5ec50be transplanted to 821f1ea20ae1
Comment 26 Ralph Ruijs 2012-06-22 18:17:09 UTC
Created attachment 121231 [details]
Mac

Product Version: NetBeans IDE Dev (Build 20120622-ba27747801a1)
Java: 1.6.0_26; Java HotSpot(TM) 64-Bit Server VM 20.1-b02-383
System: Mac OS X version 10.7.4 running on x86_64; MacRoman; en_US (nb)

Seems not to work correctly on Mac.
Comment 27 Quality Engineering 2012-06-23 04:35:55 UTC
Integrated into 'main-golden', will be available in build *201206230002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/3b55f5dfd244
User: Milutin Kristofic <mkristofic@netbeans.org>
Log: #214347 - Small font in editor search field
Comment 28 Quality Engineering 2012-06-24 02:39:20 UTC
Integrated into 'releases', will be available in build *201206232201* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/690d172738d7
User: Milutin Kristofic <mkristofic@netbeans.org>
Log: #214347 - Small font in editor search field
Comment 29 Quality Engineering 2012-06-24 04:43:13 UTC
Integrated into 'main-golden', will be available in build *201206240002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/b4aaa5ec50be
User: Miloslav Metelka <mmetelka@netbeans.org>
Log: #214347 - Small font in editor search field - view hierarchy part of fix.
Comment 30 Marian Mirilovic 2012-06-24 20:00:31 UTC
Ralph ... reopened ? Does it mean it isn't fixed in NB 7.2 ?
Comment 31 Ralph Ruijs 2012-06-24 20:23:38 UTC
(In reply to comment #30)
> Ralph ... reopened ? Does it mean it isn't fixed in NB 7.2 ?

Marian, the screenshot shows how it currently looks on my Mac. This is a fresh build of jet-main which includes the latest patch from this issue. It looks like it is the result of the fix in comment #19.
Comment 32 Marian Mirilovic 2012-06-24 20:34:46 UTC
I see, thanks
Comment 33 Ralph Ruijs 2012-06-25 15:17:55 UTC
Mila, I just tried to reproduce and found out it is necessary to use the shortcut twice.

Steps:
1. open document
2. use meta-f to open search
3. type text so it finds the first occurrence
4. press meta-f again

Will try to update to new jdk to see if this solves the problem.
Comment 34 Ralph Ruijs 2012-06-25 15:20:19 UTC
(In reply to comment #33)
> Mila, I just tried to reproduce and found out it is necessary to use the
> shortcut twice.
> 
> Steps:
> 1. open document
> 2. use meta-f to open search
> 3. type text so it finds the first occurrence
> 4. press meta-f again
> 
> Will try to update to new jdk to see if this solves the problem.

Updating the jdk doesn't help.

Product Version: NetBeans IDE Dev (Build 20120622-ba27747801a1)
Java: 1.6.0_33; Java HotSpot(TM) 64-Bit Server VM 20.8-b03-424
System: Mac OS X version 10.7.4 running on x86_64; MacRoman; en_US (nb)
Comment 35 Vladimir Riha 2012-06-25 15:28:29 UTC
For what it's worth, the same happens on Ubuntu 11.04 & GTK

Product Version: NetBeans IDE 7.2 RC1 (Build 201206242201) & fresh web-main build
Java: 1.7.0_06-ea; Java HotSpot(TM) Client VM 23.2-b05
System: Linux version 3.0.0-21-generic-pae running on i386; UTF-8; en_US (nb)
Comment 36 Milutin Kristofic 2012-06-25 15:43:59 UTC
Yes, it's all os. It's enough to run find twice - CTRL+F CTRL+F
Comment 37 Miloslav Metelka 2012-06-25 22:07:38 UTC
Apologies, there was one place where the updating of a baseY (centered y for textfield) was missing. Please test the changeset. Thanks.
http://hg.netbeans.org/jet-main/rev/81e690386d28
Comment 38 Ralph Ruijs 2012-06-26 11:28:22 UTC
verified in trunk

Product Version: NetBeans IDE Dev (Build 20120626-7a6d4139e2df)
Java: 1.7.0_05; OpenJDK 64-Bit Server VM 23.0-b21
System: Linux version 3.4.0-gentoo running on amd64; UTF-8; en_US (nb)
Comment 39 Quality Engineering 2012-06-27 05:02:40 UTC
Integrated into 'main-golden', will be available in build *201206270002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/81e690386d28
User: Miloslav Metelka <mmetelka@netbeans.org>
Log: #214347 - Small font in editor search field - fix of missing update of baseY.
Comment 40 Miloslav Metelka 2012-06-27 11:49:31 UTC
In release72:
81e690386d28 transplanted to 6c818e057fb9
Comment 41 Quality Engineering 2012-06-28 05:08:44 UTC
Integrated into 'releases', will be available in build *201206272359* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/6c818e057fb9
User: Miloslav Metelka <mmetelka@netbeans.org>
Log: #214347 - Small font in editor search field - fix of missing update of baseY.
(transplanted from 81e690386d28769ce5973aa2f4c5499b3956f4a5)
Comment 42 Martin Entlicher 2012-06-28 10:12:46 UTC
*** Bug 214886 has been marked as a duplicate of this bug. ***
Comment 43 Jiri Prox 2012-07-09 06:19:53 UTC
*** Bug 215001 has been marked as a duplicate of this bug. ***
Comment 44 Jiri Prox 2012-07-19 08:32:41 UTC
verified