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 223674

Summary: Allow to configure font family for wrapped mode in output window
Product: platform Reporter: athompson <athompson>
Component: Output WindowAssignee: Jaroslav Havlin <jhavlin>
Status: REOPENED ---    
Severity: normal    
Priority: P1    
Version: 7.3   
Hardware: PC   
OS: Mac OS X   
Issue Type: ENHANCEMENT Exception Reporter:
Attachments: output settings panel

Description athompson 2012-12-11 17:35:16 UTC
1. Go to Options>Miscellaneous>Output and change the font.
2. Do something that produces output in the output window.
3! Right-click in the output window and select "Wrap text" from the context menu (or hit Command-R).  The standard font is used with some apparently random font size.


Product Version: NetBeans IDE Dev (Build 201212090001)
Updates: Updates available
Java: 1.6.0_37; Java HotSpot(TM) 64-Bit Server VM 20.12-b01-434
Runtime: Java(TM) SE Runtime Environment 1.6.0_37-b06-434-11M3909
System: Mac OS X version 10.8.2 running on x86_64; MacRoman; en_US (nb)
User directory: /Users/alvin/Library/Application Support/NetBeans/dev
Cache directory: /Users/alvin/Library/Caches/NetBeans/dev
Comment 1 Marian Mirilovic 2012-12-13 12:37:34 UTC
It works for me :
Product Version: NetBeans IDE Dev (Build 201212110001)
Java: 1.7.0_10; Java HotSpot(TM) 64-Bit Server VM 23.6-b04
Runtime: Java(TM) SE Runtime Environment 1.7.0_10-b18
System: Linux version 3.5.0-19-generic running on amd64; UTF-8; en_US (nb)

... but it might be Mac specific
Comment 2 Jaroslav Havlin 2012-12-13 13:03:39 UTC
This works as expected.
In Output Settings panel, under the "Font:" field, you can see text:
"Does not apply to wrapped text".

For text wrapping, the default fixed-width font family is required, so that line breaks can be computed more efficiently.

But maybe the text under the field can be improved. Do you have any ideas?
This behavior is the same for several versions back.

Anyway, thank you for reporting.
Comment 3 athompson 2012-12-13 17:42:04 UTC
Hmm, there is no such text in my Output Settings panel (see screenshot).  Additionally, this was working up until a recent build, and as Marian pointed out it works fine for him.  Are we talking about the same thing?
Comment 4 Jaroslav Havlin 2012-12-13 17:55:46 UTC
> Are we talking about the same thing?
I'm sorry, maybe not. I'll try to check it on Mac.

> Hmm, there is no such text in my Output Settings panel (see screenshot). 
Hm, that's odd.
There are no attachment for this issue. Can you please attach the screenshot.
Thank you.
Comment 5 athompson 2012-12-13 18:10:42 UTC
Created attachment 129345 [details]
output settings panel
Comment 6 athompson 2012-12-13 18:11:55 UTC
Doing a million things at once.  :)
Comment 7 Jaroslav Havlin 2012-12-14 16:30:51 UTC
(In reply to comment #5)
> Created attachment 129345 [details]
> output settings panel
Thank you very much. Unfortunately, I have no idea. Seems that the Output Window module is outdated. Can you please try the latest development build with a fresh userdir?
Comment 8 athompson 2012-12-14 18:55:34 UTC
Using a fresh userdir "worked", in that it now shows the text "(Does not apply to wrapped text)" below the font name.

But why the regression? This always worked fine, and for those of us with very high resolution displays this is needed to easily see what's in the output window. I'm sure I'm not the only one who will miss this feature if it disappears without warning or explanation. I also don't see how computations would be more efficient with the default fixed-width font as compared to any other fixed-width font.
Comment 9 Jaroslav Havlin 2012-12-17 08:33:10 UTC
(In reply to comment #8)
> Using a fresh userdir "worked", in that it now shows the text "(Does not apply
> to wrapped text)" below the font name.
Thanks for checking it.

> But why the regression? This always worked fine, and for those of us with very
> high resolution displays this is needed to easily see what's in the output
> window.
There should be no regression. This hasn't been modified. Changing font for wrapped mode wasn't allowed several NB versions back.

> I also don't see how computations would be more efficient with the default 
> fixed-width font as compared to any other fixed-width font.
That's true. It hasn't been requested yet, please consider reporting a separate issue (enhancement) for this.

Everything should work as in 7.2. You can select font family and size for standard (unwrapped) mode. If you switch to wrapped mode, you can change the font size (pop-up menu, alt+mouse wheel) and this size will be persisted separately. This is needed because font metrics of different fonts can differ significantly.

If it does behave like this, it is a bug. The only thing that should differ from 7.2 is the settings dialog that allows you to change colors and link style.
Comment 10 Jaroslav Havlin 2013-03-11 17:10:28 UTC
(In reply to comment #9)
> > But why the regression? This always worked fine, and for those of us with
> > very high resolution displays this is needed to easily see what's in the
> >  output window.
> There should be no regression. This hasn't been modified. Changing font for
> wrapped mode wasn't allowed several NB versions back.
Closing this issue. If you find any regression, please describe it and reopen the bug. But for me, no feature is missing, only the UI for settings has changed. Font size for wrapped mode and standard mode are still stored separately. Thanks.
Comment 11 athompson 2013-03-11 19:38:06 UTC
Seriously? Before you could specify the font size for wrapped text and now you can't. What's *your* definition of regression? Some of us are older and don't have the eyes of you younger guys, so this is important (it's an a11y issue). Finally, horizontal scrolling with the scroll wheel now doesn't work. So from the end user's perpective the output window went from working perfectly fine to being such a pain in the but that I'm now running things from the command line. Why did the code even have to change? Is there some feature that was added that I didn't notice?
Comment 12 Jaroslav Havlin 2013-03-12 10:06:31 UTC
(In reply to comment #11)
> Seriously? Before you could specify the font size for wrapped text and
> now you can't.
For me it works. See below. But I agree that usability could be improved, let's discuss it.

> What's *your* definition of regression? Some of us are older and don't
> have the eyes of you younger guys, so this is important (it's an a11y 
> issue).
Definition of regression is still the same :-) If some feature is missing, or if something that worked fine in older version doesn't work in new version, it's a regression. But I hope there is no regression in Output Window.

> Finally, horizontal scrolling with the scroll wheel now doesn't work.
This could be a JDK bug. No changes that could affect this have been made in Output Window. I know there are some problems with this on Mac (reported as 
bug 216127).

> So from the end user's perpective the output window went from working 
> perfectly fine to being such a pain in the but that I'm now running 
> things from the command line. Why did the code even have to change? 
> Is there some feature that was added that I didn't notice?
The change was requested by users that prefer dark Look&Feel and need to set custom colors (bug 184908).


I've compared Output Window settings in NetBeans 7.2.1 and 7.3:

Right-click to an unwrapped output tab with default (fixed-width) font family, select "Choose Font...", resp. "Settings...", change only font size. Right-click again, select "Wrap Text". The same font size as in unwrapped mode is used (in both versions).

Change font using right-click and "Smaller Font" or "Larger Font", or keyboard shortcut, or <Ctrl> + mouse wheel (in 7.3 <Alt> + mouse wheel works also). Then switch to unwrapped mode. The font size is still the same as in wrapped mode (in both versions). Try the same in unwrapped mode and switch back to wrapped mode. The same font size should be used.

Switch to unwrapped mode. Change font family to some beautiful font. This font can have different metrics, so set the font size as needed. Switch to wrapped mode.

In 7.2, the default font family is used, font size was not changed.
In 7.3, the default font family is used, the same size as in unwrapped mode
is used. So, the letters can be too small or too big, if font metrics are different.

(This behavior is used because it seems better to do some visible action when font size is changed in settings panel while a tab with wrapped mode is selected. In 7.2, item "Chose Font..." is not available in wrapped mode, so no action is needed there).

Is this difference the problem? (I assume so).

Now change font size in wrapped mode and switch to unwrapped mode. Change font size (using <Ctrl>+mouse wheel) there and switch back to wrapped mode. Each mode remembers it's font size. It's needed as font family in the two modes can have different metrics. It's the same in 7.2 and 7.3.


Please, is there something that works differently for you? Or that you would like to change?

What about changing Output settings panel to have separate controls for wrapped mode font and unwrapped mode font:

Standard font:       |___Beautiful Font 18_____|v|  |...|   Size:  |_18_| 
Wrapped text font:   Monospaced                             Size:  |_11_|

Another option is to not update wrapped mode font size if font size is changed in the settings panel (which could be confusing if tab with wrapped mode is selected and nothing happens after font size is changed).

We could also compute some relative change from original font size to new font size (from metrics) and apply it to wrapped mode (I would vote for this solution).

What would you prefer?
Thank you for your comments.
Comment 13 athompson 2013-03-12 15:46:37 UTC
Not true! Before when I specified the font, it would be used for both wrapped text and unwrapped text. There recently was a bug where the *first* time something was output in wrapped mode the output window would use the default font, but subsequent times the window used the font you specified. I use Netbeans many hours a day pretty much every day with the output window in wrapped mode, so you can trust me when I say it did work this way. :)

And while it's all well and good that you can still specify the *size* of a font, some font *styles* are inherently much more readable than others. In my case (as I imagine is the case for many with an uncorrected astigmatism), a proportional sans-serif font is the most readable. The default monospaced font is the least readable. I even use the Verdana font in the editor.

Besides, are these points really relevant? It's obvious that users would want to be able to specify the font for wrapped mode as well as unwrapped mode. I don't care whether you call this a regression or an urgent enhancement, so long as the ability to specify the font for wrapped mode comes back.

How hard can it be? As I mentioned, the output window used to use the specified font in wrapped mode as well (within the last few months, in fact), so code you can look at is in Mercurial somewhere. And as I mentioned in a previous comment, I can't imagine implementing this could be much more difficult.

P.S. - While I have you on the line, how about an enhancement to how output windows work?  :)  Currently, if the output window is minimized, it slides in when there is new output to show. Often this more annoying than useful (for example: when executing an SQL query, the output window slides in (covering the query results) simply to say something like "query successful". How about an option to only slide in the window when the contents show a problem (log level of WARNING or above, or output to stderr instead of stdout). If the new output doesn't meet the "problem" criteria, how about just making the minimized window title bold (or a different color) and let the user open it if they feel like it. I know--file a separate issue, right?
Comment 14 Jaroslav Havlin 2013-03-13 09:44:04 UTC
Oh, sorry, I thought that we were talking about font size, because I assumed that font family had been never configurable in wrapped mode (so marking the bug as regression confused me).

The fixed-width font is required for performance reasons (computation of break location has to be very fast). This implementation is quite old, for example see bug 164355, comment 3, which is from June 2009. The code that assumes default font is there since 2004. See
http://hg.netbeans.org/core-main/rev/acc20b5c5138,
http://netbeans.org/bugzilla/show_bug.cgi?id=43882

If customized font was used in wrapped mode, it was a bug, the default font should have been used (as the current implementation required that).


To allow custom font family, some deeper changes will be needed. We will also have to measure performance impact of such changes, so fixing this is quite complex task.


Surely if it's uncomfortable for you (and probably also other users) to use the default font, we should try to fix it.
The possibilities I can think of now are:

 1) Make the wrapped mode font configurable, but allow only fixed-width fonts
   - (Would it be sufficient for you? Is there any fixed-with font you like?)
 2) Allow any font, but output with fixed-width fonts will be faster
 3) Allow any font, use some cache for font metrics of used characters
 4) Combination of 2) and 3)
Comment 15 Jaroslav Havlin 2013-03-13 09:56:43 UTC
(In reply to comment #13)
> [...] If the new output doesn't meet the "problem" criteria, how about just
> making the minimized window title bold (or a different color) and let the user
> open it if they feel like it. I know--file a separate issue, right?
Yes, separate issue would be better. Or you can add your comments to already reported bug 227075.
Comment 16 athompson 2013-03-13 16:42:15 UTC
I doubt performance will be an issue in this day and age, event with the slowest computers. When variable-width fonts did work (I guess due to a bug), I never noticed any sluggishness whatsoever.
Comment 17 athompson 2013-03-13 16:46:05 UTC
Yeah, there are some fixed-width fonts that are better, but the variable-width fonts tend to be the most readable for me. Plus, the variable-width fonts have the advantage of (usually) fitting more text  on a line.