Usage Note 42277: How to change the fonts used for menus in interactive SAS® sessions in UNIX environments
To change the SAS system font used for the menus in interactive SAS sessions in UNIX environments, you must create an X resources file for SAS to use, and specify your desired font in that file. The steps are as follows:
- First, make sure your X emulator is running.
- From a UNIX/Linux terminal command line, enter the appropriate command for your operating system:
Solaris: /usr/openwin/bin/xlsfonts > $HOME/fonts.txt
AIX: /usr/bin/X11/xlsfonts > $HOME/fonts.txt
Linux: /usr/bin/xlsfonts > $HOME/fonts.txt
HP-UX: /usr/bin/X11/xlsfonts > $HOME/fonts.txt
This command creates a file that contains a list of all the fonts available on the system. Beginning on the left, the fields in the records contain the font family, weight (medium or bold), pixel size, point size, and so on. For full details, see X Logical Font Description Conventions
- Using any text editor (vi, a SAS program editor, and so on), create a file named SAS (all uppercase is critical) in your Linux/UNIX home directory. SAS used this file by default to look for X resource settings. Insert a line in this file similar to the following:
SAS.systemFont: -adobe-times-medium-r-normal-*-24-120-*-*-*-*-iso8859-9
In the line above, the portion to the right of SAS.SystemFont: is the font specification from the list that you have selected. As a starting point, the above specification could be used. This action should work if this font is installed on your system. Using xlsfonts enables you to build a font based only on the fonts that are actually available, so it is the preferred method.
- Launch a new SAS session. Your specified font is used for the menus. If you need to make adjustments (make the font smaller or larger, or bold), you can edit the font specification in the SAS file. The updated font is used the next time a SAS session is launched.
- You need to use trial and error to select a font from the generated list to use as the value for SAS.SystemFont until you find the one that you want.
- If you want to implement this font selection for all users on the system, edit the !SASROOT/sasv9_local.cfg file and insert the following line:
-set XAPPLRESDIR /path/to/the/directory
In the line above, /path/to/the/directory is the correct path to the world-readable directory containing the world-readable SAS file that you have added the font specification as detailed above.
If you have the xfontsel utility installed on your system, this can be used to interactively select a font. The utility enables you to select each portion of the font specification using drop-down menus from the fonts available on the system. As each selection is made, the resulting font is displayed in the window, allowing you to more easily select a font.
Operating System and Release Information
| SAS System | Base SAS | Tru64 UNIX | | |
| Solaris for x64 | | |
| Solaris | | |
| OpenVMS Alpha | | |
| OpenVMS on HP Integrity | | |
| Linux on Itanium | | |
| Linux for x64 | | |
| Linux | | |
| HP-UX | | |
| HP-UX IPF | | |
| AIX | | |
| ABI+ for Intel Architecture | | |
| 64-bit Enabled HP-UX | | |
| 64-bit Enabled Solaris | | |
| 64-bit Enabled AIX | | |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
To change the fonts used for the menus in interactive SAS® sessions on UNIX, you must create an X resources file and specify the SAS.systemFonnt resource.
| Type: | Usage Note |
| Priority: | medium |
| Date Modified: | 2011-06-07 19:42:49 |
| Date Created: | 2011-02-03 09:59:28 |