Solaris Common Desktop Environment: Advanced User's and System Administrator's Guide

Step 1: Modifying Font and Color Resources


Note –

For an example of modifying resources for an application, see Step 1 of the Example of Creating a Registration Package.


The desktop provides mechanisms for setting and manipulating interface fonts and window colors. In order for an application to use these mechanisms properly, you may have to modify the application's app-defaults file.

Modifying Font Resources


Note –

This section applies to applications created using OSF/Motif 1.2™ (or later versions). Style Manager cannot set interface fonts for applications written using earlier versions of OSF/Motif.


The desktop Style Manager will set interface fonts for applications created using OSF/Motif 1.2 (or later versions) if the application does not specify application-specific interface fonts.

Style Manager provides two fonts:

system font—used by system areas such as labels, menus, and buttons

user font—used for editable areas such as text fields

Each font is provided in seven sizes, labeled 1 through 7 in the Fonts dialog box. The Style Manager fonts are connected to actual fonts on the system through Style Manager resources set in /usr/dt/app-defaults/language/Dtstyle.

If you want the application to use the Style Manager fonts, you should remove any application resources that interface specify fonts. The desktop will automatically set the application's resources appropriately:

FontList—set to system font

XmText*FontList—set to user font

XmTextField*FontList—set to user font

Modifying Color Resources

Style Manager provides the ability to change application colors dynamically. The application must be an OSF/Motif 1.1 or 1.2 client. Clients written with other toolkits cannot change color dynamically; color changes take effect when the client is restarted.

The easiest way to use the dynamic colors provided by the desktop is to remove any application color resources for background and foreground color.