Read a PCX to a Font

PCX Pictures General

A PCX file can be read with these modules. The PCX file MUST be a black and white file, which is the normal result of a digital scanner. See BitMap definition below.

The PCX picture may be Read as a whole as a single character into a font, for logos or signatures, or character by character into a normal font.

The size of the PCX picture is important and is limited. If the Bitmap Editor is needed the the limit is that of the internal Bit Maps (400 X 400 pixels, about 1.3 X 1.3 inches at 300 dpi). Picture larger than this should be edited in a package such as Paint Brush before Reading.

When Reading a PCX the total limit is 800 X 800 pixels.

PCX Font Preparation

To Prepare for Reading a PCX into a Font, first Print the PCX picture and mark it with the ASCII codes for each character.

Find the the widest character of the font, to be used for selecting the Maximum Cell Size.

PCX to Font bitmap operation

This will convert the PCX picture to a bitmap font in the internal (DVL) format.

The dimensions of the PCX picture are limited to 800 X 800 pixels. The Screen will scroll if the picture is too big for the screen. A larger font may be used but must be divided into smaller parts to conform to this limitation. the divided parts may still be read into the bitmap font.

First the .PCX file must be unpacked. Normally a picture is held in a compressed form. Secondly, cell size must be set. This cell size sets the Maximum Cell size for whole font, and at the same time forms a cursor used to select the characters.

The setting of Maximum cell size may set in two ways:

  1. Loading an existing DVL font with the correct dimensions.
  2. Setting the size with the Mouse, a Blank font will be created.
    then:
  3. Each character is Read and allocated to an ASCII code.

The Menu reflects these three operations:

  1. File Open - a simple option
  2. Load DVL
  3. Cell Size
  4. Read Character

At the top of the screen will be a Dialogue Bar containing extra controls used during the Read process.

Load DVL

This will Load a DVL font and use its parameters to Set the Cell Size, and the cursor used to select characters.

The DVL font MUST be of the correct dimensions..

The main use for this option is to allow the building of a font in stages. The first stage would, typically, use CellSize to initiate the dimensions and subsequent stages would reload this font and reuse these dimensions.

Cell Size

The selection of Cell Size is fairly easy, BUT should be made with care because once set it cannot be changed later.

Click option Cell Size and selection starts. Click Cursor (this is the default on start) and then with Mouse Cursor and LEFT button select the Top/Left corner of the Cell then with the RIGHT button the Bottom/Right corner. Remember to include descender space for 'p' and 'g' and also topspace for line space and accents etc., also it must be wide enough to include the widest character.

When done click Base and set the position of the Baseline and then Cursor to return to Cell mode.

Continue until satisfied. Use the LEFT button to move to another character if required. Finally click option Read on the main Menu to end and move to Read mode.

If a Cell Size is already set then this option will prepare to abort.

Read Character

The Read mode starts in Select as default. Using the Mouse Cursor and LEFT button select the character positioning so that the Cell shape, or cursor is on the left of the character with the Basline at the base of the character.

Use the RIGHT button to select the Right Margin of the Cell. See Bitmap Cell Definition. This cannot be right of the maximum width. This is required for proportionall spaced fonts.

Ensure that the ASCII code selected is correct for the character. This code will increment automatically after Read assuming that characters will be picked in sequence.

Click Read and the character will be Read, Saved and the code incremented.

Continue until all characters have been read.

Converting to TrueType

The DVL file must be converted to the TBF (internal format). Using the TrueType option on the front menu and then Draw from DVL. Select File and choose New to start a new TBF file, then with a click on Template open the DVL file, you will be asked for a scale, this is for possible adjustment, leave at 100% for the moment. Finally select a character with NewCharacter.

You will now see the Design screen with the bitmap font superimposed, together with blue margins set according the escapement on Read. You have two options. You can trace the character using the mouse in exactly the same as the Vector Design in the Tutorial. Or you can use Auto-Trace, position the mouse cursor just above a line, or contour, to be Traced and press 'T'. Make sure that you Trace every contour, an 'O' has two, one inside and one outside. Note the TrueType Rules, the outside MUST go clockwise and the inside MUST go anti-clockwise. The Auto-Trace always starts left to right so placing the cursor just above a line it will be correct.

If a font is reverse, white on black, then the procedure is much the same. Ensure that the outline is copied, the Black bit and the the inside contours, don't miss little things like the top triangle of the A.

Correcting a TBF

The trace will have produced a TBF font with two possible problems. It may have too many dots, if it can't identify a straight line it has to do this. Vertical and horizontal lines should be OK as will 45 degree and most 30 and 60. This can be done with the Delete button on the toolbar, or there is a hot key which will delete a position easily.

Next, the positions will be set as ON line, making curves from short straight lines. Making a position OFF curve will create curves that will be scaleable, similar to Bezier curves. There is a button for this too, but there is another hot key for this . By using these hot keys a character may be transformed fairly quickly to a satisfying state. These curves are necessary to ensure that the curves look good however large.

There is a further hot key to be used if there are many points on a straight line such as the sides of an A. Select a point by using the mouse pointer then the Logic NOT key (above TAB) then select another point with the mouse and the DEL key. You will get a warning then all the points BETWEEN will be deleted.

Now use Export to Build the TTF file.

Bitmap Cell Definition

Bitmapped font character, or Cell, is defined by the number of dots high, Height, and the number of dots wide, Width. The font also has a Height and Width but these apply to maximums for the font, the Cell Width is usually less than the Maximum.

There another 'width', often referred to as HMI, which is the distance between characters or printer movement.

The Left Offset alters to the start position of a character.

The Baseline is the vertical reference point of the Cell.