Edit Commands

Edit->Undo

The effect of the last change to the current character is canceled with the Undo command. An Undo to an Undo cancels the former Undo; the character is thus restored to its state before the former Undo. No effect takes place if the character has not been modified yet.

Edit->Again

The last menu command can be repeated with the Again command. This command is usually bound to one of the user-definable function keys; see Function Key Definitions.

Edit->Cut

For a raster character, the selected parts get cut out (blanked). They are copied away in temporary store for later re-insertion using the Edit->Copy command. Features stored by previous Cut or Edit->Copy operations are discarded.

For a curve character, the selected curve sequence gets cut out. If more than one sequence is selected, the operation will not be performed. Cutting a path will require to move either the preceding or the following curve end point, to remain with a connected sequence of curves.

The user is thus prompted to select the stationary path end point. After cutting out the selected path, TYPO will move the non-stationary end point to coincide with the stationary one. For example, take three successive straight lines, where the path to be cut consists of the middle one. This is demonstrated in the following figure.

A path to be cut
A path to be cut


Selecting point A to be stationary will cause the third line to begin at A, as shown in the second part of the figure, and selecting point B will cause the first line to end at B, as shown in the third part of the figure.

Similarly as for raster characters, the path cut out is kept in temporary store for later re-insertion using the Edit->Copy command. Features stored by previous Edit->Cut or Edit->Copy operations are discarded.

Edit->Copy

The Copy command is identical to the Edit->Cut command insofar as raster features and curve sequences get copied away to temporary storage. The current character does, however, not get changed.

Edit->Paste

The cut or copied items can be copied into the current character with the Paste command.

For raster characters, the copied pixels can be inserted into the current character. The user fixes the upper left corner of the destination by positioning. The stored pixels get inserted at that position, depending on the raster operation menu in the input pop-up window.

For curve characters, the user must have selected a point at which the cut or copied path can be inserted into the current character (unless the current character is empty, in which case insertion takes place at the focus). The new path gets displayed and an input pop-up window gets displayed. The user may now determine whether to reverse the path direction (from its end to its beginning), whether to mirror the path horizontally, or whether to mirror the path vertically, by making the appropriate choices.

For example, to create a symmetrical shape, one can create its left half, copy it away using Edit->Copy, and insert it at the end point, reversing the orientation (the second half of the path runs in the opposite direction), and mirroring the curve horizontally.

Edit->Delete

To perform a Edit->Cut operation without copying away features for re-insertion (and, thus, without destroying the temporary storage), use the Delete command in the same fashion.

Edit->Select All

The Select All command selects the whole (raster or curve) current character.

Edit->Copy from Back

The background character is copied into the current character with the Copy from Back command. The current character and the background character must both be raster characters, or both must be curve characters.

Edit->Paint/Fill

For raster characters, Paint/Fill fills a closed four-connected white area (i.e. two points are considered connected if they are next to each other horizontally or vertically). Filling begins at the focus, which the user must have priorly placed, for instance, with the Focus Tool.

The user can choose the fill pattern from the menu in the input pop-up window. Available fill patterns are:

The command is finalized with OK or cancelled with Cancel. Note that a Paint/Fill command from outside a closed area causes the whole outside of the character to be filled.

For curve characters, we can change the paint mode for a contour or contour sequence in the current character. The sequence is that selected prior to entering the Paint/Fill. To see the character as it would appear, use the Typeset Window. The character is initially shown in the character window according to the paint mode for its font. If paint changes were already applied to the character, their effects are shown as well. Then the user chooses from the Paint mode menu, in the input pop-up window, a new paint mode for the selected contour sequence, and sets the parameters for that paint mode. Paint modes and parameters are described in the section on Painting Curve Characters. The special entry Default in the Paint mode menu resets the paint mode for the selected contour sequence to the font default. Upon clicking the left mouse button at Apply button, the changes are applied to the character, and it is shown in the Typeset window in its new appearance. The command is finalized with OK or cancelled with Cancel.

Edit->Raster<->Curve

Raster<->Curve scan-converts a character from a curve font into a raster character, or auto-traces a character from a raster font into a curve character. The user is prompted for the character key or numeric position in the font (as in Character->Open Character).

If the current character is a raster character, the current font must be a curve font. The user is then presented with a slider in an input pop-up window to choose the scale factor for scan-conversion (initially 1). The slider shows the range [0.01,5], with increments of 0.01 (0.0001 when choosing Fine). While determining the scale factor, each time the left mouse button is released or an arrow is hit, the result is pre-shown. Pressing SHIFT-CONTROL-Left mouse button resets the scale factor to 1. After the conversion is completed (with the middle mouse button), often the Edit->Paint/Fill command will be used to fill the converted outline with some pattern or black.

A whole curve font can be converted to a raster font on storing the font. This is described in the section on Converting Fonts.

To convert a raster character into an outline character, the outlines of a black raster area with are traced with curve paths (i.e. curve paths are fit to the raster area outline). The user is presented with a slider in an input pop-up window to choose the scale factor for scan-conversion (initially 1). The slider shows the range [0.01,5], with increments of 0.01 (0.0001 when choosing Fine). While determining the scale factor, each time the left mouse button is released or an arrow is hit, the result is pre-shown. Pressing SHIFT-CONTROL-Left mouse button resets the scale factor to 1.

A black area may have one or more outlines. The digit '1', for instance, has no holes and thus only one outline. The digit '0' has one hole and thus two outlines, one on the inside and one on the outside. Similarly, the digit '8' has three outlines.

A curve path is fit to each outline of the character, governed by the settings in the input pop-up window. These curve paths are appended to the current character. If the OK button is depressed, the result gets fixed. Otherwise, the settings can be changed and retracing occurs whenever Apply is pressed.

A whole raster font can be converted to a curve font upon storing the font. This is described in the section on Converting Fonts.

Note that outline fitting involves the fitting of mathematically precise curves to a discrete raster image. This process can, by its nature, not be absolutely precise. Manual corrections are often necessary after the conversion operation, in particular if the original raster characters are not large enough. The Adjust commands perform such corrections.

The following settings appear in the input pop-up window when the Show Options button is pressed (they disappear after the Hide Options button is pressed):

Maximal tolerance, Average Tolerance

Raster outlines are ragged. Fitting a smooth curve to a part of an outline will create a curve which does not coincide with all the centers of all the raster pixels. Rather, the curve will pass each pixel center at some distance. The maximal allowable distance is specified with Maximal tolerance; its default is 1 (i.e. a single outline pixel may be up to one pixel distant from the curve). The average allowable distance is specified with Average tolerance; its default is 0.5. The user is recommended to not set the Maximal tolerance or the Average tolerance to values less than 0.8 and 0.4, respectively. Otherwise, fitting will be too precise, yielding too many very short curves. The user is warned by TYPO in this case.

Recommended values for outline tracing of scanned font art at large sizes are Maximal tolerance=3, Average tolerance=1. For raster art which is already in high quality, such as high resolution raster fonts, the defaults of 1 and 0.5 are usually adequate.

Minimal curve length

It is often desirable to obtain only reasonably long curves on outline tracing. The Minimal curve length indicates the minimal length of curves generated between corners.

The minimal distance between corners is also influenced by this value. Corners must always be at least five pixels apart. In addition, if the Minimal curve length is above 5 and below 10, then this will also be the minimal distance between corners. If the Minimal curve length is above 10, then 10 is used as the minimal corner distance.

Maximal corner angle

A point at the boundary of the raster image is considered a corner if the angle at this point is below the Maximal corner angle, and the curves matched will meet at the appropriate angle. At all other points, the fitted outline will be smooth. The maximal corner angle must be between 90 and 150 degrees, and should exceed 130 degrees only in very high resolution artwork.

Minimal path length

Raster images are often created by scanning. A typical artifact of the scanning process are small holes, i.e. unwanted white spots in the black area, or small black spots. Such a spot will be ignored if the number of the points in its outline is less than the value specified for the Minimal path length (default 10).

Initial match size

The initial number of pixels to which TYPO attempts to fit a single curve is specified with Initial match size. This value governs the speed of the fitting process, and its suggested setting is about 10% of the height or width of the black area.

Split curves

The resulting curve paths can automatically be split at minima/maxima or inflection points. The setting of Split Curves governs splitting. Its possible values (with the obvious meanings) are: The default is Inflections.

Scale and align curves

The raster background character can appear zoomed or scrolled. If it is required to trace the black area in the background character the way it appears on the screen (zoomed/scrolled), this is achieved by setting Scale and align curves to Yes (this is the default). Otherwise, tracing is performed by coordinates; tracing takes place as if the background character would appear with zoom factor '1' and not scrolled.

Edit->Insert Text

Insert Text inserts a string of raster or curve characters into a raster or curve character. This command is particularly useful for creating icons and logos. The user is prompted for the string to be inserted. After entering the desired string, the user is shown the characters, enclosed by a character box, positioned at the focus. Dragging the base point moves the location of the text. Dragging the mouse along one of the two shown diagonals scales the character uniformly in both dimensions, preserving the aspect ratio. Dragging along one of the horizontal or vertical lines scales in that dimension only. Nonprintable characters can be specified in the text by their font position (ASCII code) in one of four ways, as for Character->Open Character:

For any kind of insertion, the user is presented with an input pop-up window that contains the insert position X and Y, Horizontal Scale, Vertical Scale, and Angle.

To insert text into a raster character, the input pop-up window contains also the raster pixel operation menu. If Copy is chosen, the text is inserted as is, ignoring the original contents of the current character below the text. For Or, the text is put on top transparently, i.e. black pixels of the original character are preserved. For Xor, whenever a black pixel gets put on top of a pixel in the original character, that pixel reverses its color, otherwise it stays the same. For And, the only black pixels are those which are black both in the kept rectangle and in the original character. This is, for instance, useful if the text is to be clipped against a shape, as described for Edit->Paste.

Moving, scaling, changing the raster operation can be done repeatedly, pressing the Apply button to make the changes effective. The result is fixed by depressing the OK button and cancelled by pressing Cancel.

When inserting raster text into a curve character, the Show Options button shows the same options as for the Edit->Raster<->Curve command.

Edit->Shape Text

Text from either outline or raster fonts can be inserted into an outline character following a prescribed path. The path must be selected prior to entering the command. The user is asked to input the text to shape, as in the Edit->Insert Text command.

A pop-up input window is shown. There, the user can choose the scale factor on a slider. The characters are aligned either at their base points or at their midpoints such that their slopes are the same as that of the path at the corresponding point where the characters are put.

To insert raster characters, the same conversion options as in Edit->Raster<->Curve are shown in addition when the Show Options button is hit.