Troubleshooting Font Displays on S-PLUS 6.2 for UNIX/Linux

There are occasionally display problems with S-PLUS when running natively on a Solaris or Linux machine, or running emulation software to access S-PLUS from a Windows machine.

Insightful has tested the following three X-windows software packages to launch S-PLUS for UNIX/Linux from a Windows machine:

 

Display Problems

Running S-PLUS with Java (Splus -j) or the GUI (Splus -g) on Solaris or Linux machines can generate display problems. You may see the following messages:

Warning: Cannot convert string "<Key>Escape,_Key_Cancel" to type
VirtualBinding
Warning: Cannot convert string "<Key>Home,_Key_Begin" to type
VirtualBinding
Warning: Cannot convert string "<Key>F1,_Key_Help" to type VirtualBinding
Warning: Cannot convert string "Shift<Key>F10,_Key_Menu" to type
VirtualBinding
Warning: Cannot convert string "<Key>F10,Shift_Key_Menu" to type
VirtualBinding
Warning: Cannot convert string "<Key>KP_Enter,_Key_Execute" to type
VirtualBinding
Warning: Cannot convert string "Alt<Key>Return,Alt_Key_KP_Enter" to type
VirtualBinding

Starting Splus -j or Splus -g on a Solaris or Linux machine from a console may generate different errors:

asdemo-con ~/s52 <1380> Splus -j
Warning: Cannot convert string
"-monotype-arial-regular-r-normal--*-140-*-*-p-*-iso8859-1" to type FontStruct


With a Solaris 2.8 console as the X-server, and Redhat 8.0 as the platform, you may receive
the following messages:

Warning: Missing charsets in String to FontSet Conversions
Warning: Missing charsets in String to FontSet Conversions

The Java virtual machine (JVM), when running on a Unix server, is configured to employ a set of fonts which are available on that server. When a Java application is run natively on the server, all of the fonts are found and the display is fine.

When the display of the Java application is exported to a remote X-server (like X-Win32), the application asks the X-server to use the same set of fonts that it uses natively. In this case, though, the X-server is a completely different machine which may or may not have all of the fonts that the Java application is requesting. If any of the fonts are not found, the X-server reports this error back to the application, and the "font warnings" appear in the xterm from which the application is launched. Normally, these font warnings are not fatal and may be safely ignored.

These font errors can be eliminated in one of the following ways:

 

Possible Solutions

For Linux and Cygwin:

  1. Find the file

/usr/X11R6/lib/X11/fonts/75dpi/fonts.alias

Note the actual path may vary across Linux distributions.

  1. Edit fonts.alias to add lines such as

-monotype-arial-regular-r-normal--*-140-*-*-p-*-iso8859-1 \
-b&h-lucida-medium-r-normal-sans-14-140-75-75-p-81-iso8859-1

This should be all on one line, omitting the "\" continuation indicator shown above. The second entry, -b&h...-1, may need to be modified to match the actual fonts installed on your box. This may vary across Linux distributions. Save the change to fonts.alias.

  1. Finally, you need to force the X-server to re-read the fonts. If you are not using a font server, then from an x-term run

  > xset fp rehash

If you are using a font server (default on some Redhat distributions), then you will need to restart the font server. On a Redhat machine, become root and execute:

  > /etc/rc.d/init.d/xfs restart

Alternatively, if you are running a font server, a reboot of the machine will cause the fonts to be re-read.

For X-Win32:

  1. Open the X-Win32 configuration utility (X-Util32).

  2. Select Fonts > Alias.

  3. Double-click 75dpi, and then double click fonts.alias.

  4. In the Font Alias dialog, in the Alias from field, enter:

-monotype-arial-regular-r-normal--*-140-*-*-p-*-iso8859-1

  1. In the Alias to field, enter:

-b&h-lucida-medium-r-normal-sans-14-140-75-75-p-81-iso8859-1

  1. Click Add.

Similar configuration procedures will probably work on other X-server products. On X-Win32 (version 5.3) the procedure was slightly different:

  1. Run X-Config

2. Select the session

  1. Select the Font tab.

4. Highlight the line that contains

...\lib\Fonts\75dpi

  1. Select the Edit Alias File tab.

  2. Edit the file (in Notepad).

  3. Close all open x-terms and reset X-Win32 (from the context menu).