Wednesday, September 15, 2010

Changing Help Brower font-size in NetBeans IDE


Help Browser font is not configurable in NetBeans.  After detailed discussion it was set to such a value which will be usable for all operating systems.

So there is no normal way to change the font for the Help Browser. There is a hack around this, knowing the fact that the Help browser uses HTML and CSS files. You can change the CSS definition of the body and p elements in the CSS file which is used for the Help Browser. The downside is you have to edit this file any time you want the font size to be changed.


The image above is what you will see if you open the Help Browser on a Mac.

If for some reason you want the font size bigger then the way to change font size is to open the ide.css file located in the paths below and change the "font-size: medium" definition to "font-size: large" for body and p element definitions.  In fact you can use any value acceptable for fond size in CSS files.


Path for the usersguide CSS file on different platforms:

On Mac
/Applications/NetBeans/NetBeans 6.9.1.app/Contents/Resources/NetBeans/ide/docs/org/netbeans/modules/usersguide/ide.css

On Ubuntu
$USERHOME/netbeans-6.9.1/ide/docs/org/netbeans/modules/usersguide/ide.css

On Windows 7
C:\Program Files\NetBeans 6.9.1\ide\docs\org\netbeans\modules\usersguide\ide.css

After changing the font-size to large:

You can see the Help Browser font is now bigger.

One better way of doing customizations in the ide.css file could be adding a customization section at the end of the file as follows:

/* Help Font Customization section */
body, p { font-size: large; }
/* end customization */

with regards
Tushar Joshi, Nagpur

No comments:

Post a Comment