Importing PCX pictures


Introduction

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.

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, by inspection, to be used for selecting the Maximum Cell Size.


Read a PCX to a Font

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. At the top of the screen will be a Dialogue Bar containing extra controls used during the Read process. There are two groups of controls:

Left, used to set Cell dimensions.
Cursor - set the main cursor size, Left, Top, Bottom and Right
Base - set the Baseline
Right, used to select characters.
Select - pick a character
Code - set the ASCII code
Read - initiate Read

First the .PCX file will 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, this may be done in two ways:

Loading an existing DVL font with the correct dimensions.
This will Load a DVL font and use its parameters to Set the Cell Size. 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.

Setting the size with the Mouse, a Blank font will be created.
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.

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

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.

Then each character is Read and allocated to an ASCII code.
The Read mode starts in Select as default. Using the Mouse Cursor and LEFT button select the character positioning so that the Cell shape 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, below. This cannot be right of the maximum width. This move is absolutely necessary for Proportional 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.

Bitmap Cell Definition

A 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.


Reading a PCX Logo or Signature

A Logo or Signature may be Read as a whole to a Single character font or as Tiles to a Multi character font.

Single Character Read
The limiting size for reading a Logo picture is .7 inch square to be sure that it is not too large for the bit-mapped Editor or for the Draw module. The PCX picture can, however, be edited by other software before reading and a larger size used.

It is intended to be used, as is, to print the Signature or Logo as THE character in a single character font at character 33 '!'.

For the above reason it is recommended that the picture be scanned at a suitable resolution, such as 300 dots per inch, ready for printing.

Multi Character Read
The PCX picture will be Read and analysed. The user will be asked to select the number of characters to be used for horizontal tiling and the for vertical tiling. This is to enable a previous tiling sequence to be repeated.

The sequence will start at ASCII code 65 (uppercase A).

On completion the number of characters will be repeated together with the bits per character used. It is recommended that a note be made at this point for later use.

Finally, the resulting Bitmap font may be converted to TrueType, but that is in another article.