Simplified Chinese Solaris User's Guide

Editing Fonts With fontedit

This section shows you how to edit or create and install new characters in Portable Compiled Format (PCF) format fonts used by the Simplified Chinese Solaris operating environment. You can then save your changes and use the edited font(s) on your local system. This process involves the following steps:

  1. Preparing a workspace for the font(s) you edit or create.

  2. Editing Bitmap Distribution Format (BDF) font file(s) with Font Editor.

  3. Converting BDF font file(s) to PCF format.

  4. Making the font(s) usable on your system.

Setting Up a Working Directory

  1. Create a new directory workspace for editing fonts, for example:


    system% mkdir /tmp/newfont 
    
  2. Change your working directory to that directory:


    system% cd /tmp/newfont 
    

Starting the Font Editor

The Simplified Chinese Solaris operating environment provides the Font Editor for editing bitmap fonts.

    Start the Font Editor.

A Font Editor window is displayed.


system% fontedit 

Font Editor does not operate on PCF format font files (.pcf file extension), which are used by Solaris software. This tool handles only fonts in BDF, a portable format defined by the MIT X Consortium.

Preparing a Font File

    Locate the Simplified Chinese font file you want to edit in BDF format.

Its encoding should start at 8481 (0x2121). For example, say you have a BDF file such as myfont14.bdf:


STARTFONT 2.1
COMMENT Sample Font
FONT Myfont-Medium14
SIZE 14 75 75...
STARTCHAR C101
ENCODING 8481
...

Editing a BDF Font File

  1. Hold down the MENU mouse button on the Font Editor window's File button and select Load... on the pull down menu.

  2. Type the name of the BDF file you want to edit, for example myfont14.bdf, in the Font Name field of the Load pop-up window.

  3. Click SELECT on the Load button in the pop-up.

    This loads the file.

  4. Click SELECT on the Font Editor main window Select button.

    This displays the Select window, where you do the following steps.

  5. Type the high and low bytes of the font encoding code for the character you want to edit, for example 0x3302.

    You can use the Next (right arrow) button or Previous (left arrow) button to increase or decrease the high or low byte.

    Graphic
  6. Set Code Length to MultiByte for this Simplified Chinese font.

    You would set Code Length to SingleByte for an ASCII/English font.

  7. Click on the Edit button (in the Fontedit: Select window) to display the glyph on the main canvas.

    The specified glyph appears in the Font Editor window.

    Graphic
  8. Edit the glyph on the main canvas by turning pixels on/off:

    • Click the SELECT mouse button to turn on a pixel.

    • Click the ADJUST mouse button to turn off a pixel.

    • Hold down the MENU mouse button for a menu of additional functions.


    Note -

    The character glyph in the upper left corner of the main window shows the actual appearance of the glyph as you turn its pixels on and off.


  9. When you finish editing the glyph, click SELECT on the Store button.

  10. Repeat the preceding steps Step 5 through Step 9 to edit other glyphs in this font.

  11. After you finish editing, hold down MENU on the File button and select Save... to save the edited glyph(s) in the font file.