Korean Solaris User's Guide

Using the Font Editor

Setting Up in 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 Up the Font Editor

Korean Solaris software provides the Font Editor for editing fonts.

    Start up Font Editor:


system% fontedit 

A Font Editor window is displayed.

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

Preparing a Font File

    Get the font file you plan to edit in BDF format.

Its encoding should start at 8481 (0x2121). For an example, consider that you have a BDF file like the following 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 plan 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 popup.

    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 0x4751.

    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 Korean 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, resembling the following:

    Graphic
  8. Edit this 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 5 through 9 to edit each glyph you choose in this font.

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

Converting BDF to PCF Format

Before Solaris applications can use the modified BDF file, it must be converted to an PCF format file.

    Use the bdftopcf command to make the BDF font file usable by the Korean Solaris operating environment by converting it to PCF format as follows:


    system% bdftopcf -o myfont14.pcf myfont14.bdf
    

For more information, see the bdftopcf(1) man page and the mkfont(1) man page.

Installing and Checking the Edited Font

  1. To add a new bitmap to the Solaris operating environment, put the .pcf font file in your font directory. You may compress the .pcf font file before moving it to your font directory:


    system% compress myfont14.pcf
    

  2. Run the following commands in your font directory.

    Note that the .bdf file should not be in the font directory.


    system% cat >> fonts.alias
    -new-myfont-medium-r-normal--16-140-75-75-c-140-ksc5601.1987-0 
    Myfont-Medium14
    ^D
    system% mkfontdir
    system% xset +fp `pwd`
    

  3. You can view your font by entering:


    system% xfd -fn Myfont-Medium14