Asian Application Developer's Guide

Adding Bitmap Fonts

This section describes how to add a new bitmap font to your environment. The steps assume the working directory is your font directory.


Note -

Solaris 2.6 includes the Font Admin tool, which you may prefer to use for configuring fonts. However, the tools is available only if you install the entire cluster. For information about the Font Admin tool, see System Administration Guide.


  1. Move the .pcf file for the new font into your font directory.

  2. Run the mkfontdir command:


    system% mkfontdir
    

  3. If you have an XLFD name for the font, put the definition of this font into fonts.alias, as in the following example:

    For a Korean font:


    system% cat >> fonts.alias
    -new-myfont-medium-r-normal--18-160-75-75-c-160-ksc5601.1987-0 
    Myfont-Medium16
    ^D
    

    For a Simplified Chinese font:


    system% cat >> fonts.alias
    -new-myfont-medium-r-normal--18-160-75-75-c-160-gb2312.1980-0 
    Myfont-Medium16
    ^D
    

    For a Traditional Chinese font:


    system% cat >> fonts.alias
    -new-myfont-medium-r-normal--18-160-75-75-c-160-cns11643-16 
    Myfont-Medium16
    ^D
    

  4. Set the user preference options of the display, as follows:


    system% xset +fp `pwd`
    system% xset fp rehash [[[optional]]]