Tuesday, August 10, 2010

Changing the DPI in Ubuntu

Different output devices render the fonts at different resolutions. Increasing the font size will make it appear larger on all devices, including the screen and printer. On the other hand, if you change the rendering resolution for a single device, then the same font size will be larger or smaller.

The default desktop fonts are rendered at 96 dpi. You can change the dpi value by opening the System-> Preferences -> Appearance applet, selecting the Fonts tab, and clicking the Details button.

Although the Font applet is good for one-time changes, it cannot be easily automated. The dpi value can also be set through the gconf-edit registry under /desktop/gnome/font_rendering/dpi. This value can be adjusted to match your screen. For example, if you change the screen resolution or use a different size monitor, then fonts may appear larger or smaller.

To change the dpi value, use:

gconftool-2 -t float—set /desktop/gnome/font_rendering/dpi 96

Values larger than 96 will make the fonts appear larger (but not change the actual font size), whereas a smaller number decreases the rendered size. In general, changing the dpi setting only changes how fonts are rendered on the screen. It does not change the size of the application windows nor impact how documents will print.

With Dapper Drake (6.06 LTS), use System -> Preferences -> Font. Later versions of Ubuntu use the Appearance applet.

Changing the rendering resolution only alters fonts rendered by the desktop. For example, the Gnome terminal (Applications -> Accessories -> Terminal) and Gnome Text Editor (gedit) both will change sizes, but an xterm window will not; xterm uses px, not pt. Also, some applications, such as xchat, use hard-coded window heights, so the tops or bottoms of large fonts may be brutally cropped.

Source of Information : Wiley Ubuntu Powerful Hacks And Customizations

No comments: