|
|||||||||||||||
RoyalT Font Editor
ContentsAbout the RoyalT Font Editor
Copyright (c)1990,1991,1996 Apple Computer, Inc.
About the RoyalT Font EditorThe RoyalT Font Editor application allows you to create your own new
fonts by using a Macintosh computer to edit, manipulate, and apply instructions
to glyph outlines, and preview those outlines at different sizes. To begin, you must translate your present font in the 'sfnt' format employed
by the RoyalT Font Editor. Usually you will have to design your own translator,
since none are commercially available.
Opening your 'sfnt' documentDepending on the type of monitors you work with, you may find it useful
to open your 'sfnt' with the Option key held down. If you do so, the RoyalT
Font Editor will center all the windows on your main screen. You can then
move the windows, and the RoyalT Font Editor will remember their placement
the next time that document is opened.
The menusFile Menu Clicking the close box or choosing Close from the File menu works in
the standard way on most of the views. The exception is the Preview view,
which, if closed, will cause the entire document to be closed. The Dump command creates an MPW text file of the contents of the 'sfnt'
resource, in groupings with headers: The Print command prints the contents of the current window only.
In the Preview window, the Append command can be used to add glyphs to
the 'sfnt' description. The Find command will try to find the string of alphanumerics
that you enter into the Find mini-window. This is useful for finding certain
instructions, character element numbers, and Control Value Table entry numbers.
The filters allow you to specify what type of information you are looking
for. For instance, the point filter, in conjunction with a 16 typed into
the Find mini-window, will find instructions that have to do with point
16 on your glyph outline. The same holds true with the CVT (Control Value
Table entry numbers) and element (character element numbers) filters. You
can only use Find in the Preprogram and Instructions windows. If you check
the Global check box, the RoyalT Font Editor will look through all the glyphs
in the 'sfnt' to find every occurrence of the data. Command-period will
cancel a global find. This menu contains the names of all the view windows available to you:
Preview, Instructions, PreProgram, CVT, Text, Device, Outline, Info, Alpha,
FDEF, and Twilight. If you do not have a large enough screen to see all
the views at once, this allows you to select one or more views. The Edit command brings up the Edit Instruction mini-window for entering
instructions. (See Editing Instructions
for more information.) To see the effect of your instructions on the outline and bitmap at a
specific size, use the Recalc command.
This redraws the charcter in the Preview window in accordance with the current
instructions and writes it to the 'sfnt' resource. However, changes to the
'sfnt' are not saved until you explicitly save it via the Save or Save As
commands in the File menu. You can always invalidate Recalcs commands using
the Undo command in the Edit menu. Recalc is used by all of the instruction
windows (Preprogram, Instructions, and Outline) along with the Info view.
The Validate SFNT command checks through your 'sfnt' resource description
for errors. For example, you may get the message This instruction uses a
value not found in the Control Value Table. The Make SuitCase command puts your 'sfnt' in a resource that can be
installed in the system. Size Menu The Any Size command allows you to pick any point size not currently
available in the Size menu. If you would like a point size one removed from your current size, you
can use the Smaller (Command-[ ) and Larger (Command-] ) commands. For instance,
if you are currently working in point size 18 and would like to see point
size 17, choose the Smaller command. To see point size 16, choose Smaller
again. Changing the size affects the size of the text being edited in the windows
that have lists of instructions, to make reading and editing the instructions
easier. For the Preview, Alpha, and Text windows, changing the point size
affects the size of the outline being edited.
Editing InstructionsThis is what the Instructions window looks like when you first open the
font (which, for this example, is called Testfont), and the glyphs have
no instructions. The Append command from the File menu creates space for new instructions.
The default is Error[ ]. If you double-click on the Error command, you get a blinking cursor associated
with text editing. You can then edit the command as you like. You do not
have to type the command in uppercase letters; the font editor will take
care of this for you. For commands which do not take Boolean arguments, it is not necessary
to include the square brackets. For instance, you can type in the NPUSHB
command in this way: After pressing Return, the font editor enters the correct form of the
command as line 0 of the instruction set.
Component charactersFor building component characters with the RoyalT Font Editor, there
are two new instructions which look very much like the ones already presented
in the RoyalT Font Format document. In fact, they are not true
instructions at all. They are used only by this font editor. OFFSET sets up the main component of the character, with x and y offsets.
ANCHOR joins the two components together at the specified anchor points.
An anchor point is a contour on a character that consists only of that point.
(Contours are added using the Outline window.) OFFSET [ B ] a b c If 0, dont round after the offset and potentially lose grid-fitting If 1, round after offset and keep grid-fitting
There can be far more than two components in a component character. However,
the components can only be joined together two at a time. For instance, if you want to have an uppercase A which takes an umlaut,
you dont need to come up with a special outline for that character. If the
anchor point on the A (which for this example, is at glyph index 34) is
on the top of the A at point 11, and the anchor point on the umlaut (glyph
index 140) is between the dots at point 8, the two instructions to join
these characters would be:
There are two other instructions behave just like OFFSET and ANCHOR,
except they take a mandatory two-by-two matrix which is used for any special
effects (rotation, shrinkage, and so on). The matrix consists of the last
four entries in SOFFSET and SANCHOR and is in the form:
d e f g SOFFSET [ B ] a b c d e f g
The Preview windowWhen you open the RoyalT Font Editor, you see the Preview window. This
window can display a character in several ways: as bitmaps with or without
outlines; grid-fitted or not; with or without points.
![]()
To begin working on a character, you simply type the character on the keyboard. The character is shown with bits and outline on, but with no instructions applied to it. For this example, it will be a lowercase b: ![]() Outline without grid-fitting Outline after grid-fitting ![]() Bits and outline after grid-fitting ![]() Points and outline after grid-fitting ![]() This is an example of how to use the first F (first one on the top line).
Beginning at point 17, the mouse was dragged to point 16, leaving a line
not visible on the screen (because it follows the path of the curve, which
in this case is a straight line). When the cursor touched point 16, the
x and y measurements between these two points (in UPEM) appeared in the
lower left corner of the outline. No measurements are shown until the cursor
has reached an actual point on the curve. This is an example of how to use the second F. Beginning at point 21,
the mouse was dragged to point 27, leaving a line visible on the screen.
When the cursor touched point 27, the x and y measurements (in fractional
pixels) appeared in the lower left corner of the outline. No measurements
are shown until the cursor has reached an actual point on the curve. This is how the third F works. Note how the outline changed when point
17, which is on the curve, was moved down and to the left. This may give
some idea what the bitmap would look like at various point sizes with the
points in slightly different places.
This is an example of how to use the fourth F. Beginning at point 17,
the mouse was dragged to point 16, leaving a line not visible on the screen
(because it follows the path of the curve, which in this case is a straight
line). When the cursor touched point 16, the screen displayed the distance
between the points (in UPEM) and the angle between the baseline and the
line between those two points. No measurements are shown until the cursor
has reached an actual point on the curve.
The Instructions window
The top part of the window gives the current graphics state, both local
and global. GridFit, a check box in the Preview window, must be on for the
graphics state to appear. The graphics state only becomes visible when an
instruction for a particular character, which is shown in the Preview window,
has been selected. The values for the graphics state are those before the
instruction has taken effect. Once an instruction in this window has been
edited, the graphics state disappears until you use the Recalc command from
theSFNT menu. If you have selected an instruction that affects a point, that point
blinks in the Preview window. To see DELTA instructions work, select the line with the DELTA instruction
and press the Enter key.
Note how the graphics state changes in the sequential views of the Instructions
window below. (In particular note the Pts and the Stack.)
The Preprogram windowThe preprogram is typically used to store instructions that modify values
in the Control Value Table. When the preprogram is processed, there are
no specific characters in memory. The preprogram is executed by the RoyalT
Font Editor every time you change the size, style, or rotation.
The CVT window
The left column shows distances in resolution-independent units (UPEM)
and the right column shows fractional pixels calculated for the current
point size, resolution, and transformations that may be in effect. Avalue
also reflects any changes to the Control Value Table by the preprogram and
is the value accessed by the instructions. The right column is automatically
calculated from the value in the UPEM column in fractional pixels, measured
in 64ths. The Control Value Table contains a set of values that can be used, among
other things, to control and regularize characteristics for different glyphs
inside a particular font. These values can then be used by certain instructions.
For instance, the following information about the character set can be stored:
You can change values in the Control Value Table easily, using the instruction
set. If the values need to be changed for a specific point sizes of a particular
font, the preprogram (see the Preprogram
window) can be used to change the values. There is no standard definition for any entry in the Control Value Table.
The meaning of each entry is left to the discretion of the font manufacturer.
The Text window
This window allows you to see what your font looks like as normal, bold,
and oblique text. You type in the text window and choose the different styles
from the check boxes at the top of the window.
The Device window
These values change nothing in the font. They are useful for seeing how
the outlines behave under different raster conditions. This is the Device window after the Rotation radio button has been chosen,
the angle changed to 45, and the OK button clicked. Note that clicking the
OK button does not close the window but rather calculates the new information
provided. This is the outline with bits, after the rotation of 45 degrees has taken
effect.
The Outline windowYou can edit the actual coordinates of all of the points in an outline.
The coordinates are given in UPEM. An empty circle ( o ) next to an entry
means that this point is off the curve. A filled in point ( ) means the
point is on the curve. Adding a New Contour line tells the editor that a new contour is coming
up. The easiest way for entering a New Contour line is to use the Edit Outline
mini-window, which can be brought up by using the Edit command or by pressing
Return when you have a line in the window selected. You can also double-click
on a line and edit directly in the Outline window. If you are editing directly
in this manner, remember to use lowercase o and the option-8 bullet character
in order to fill in this information. Placing one point by itself in a new contour can be a signal that this
is where elements for a component character (for instance, a character with
an accent) can be joined. (See Component
characters for more information.)
The Info window
The information on the right side of the Info window is read in by the
RoyalT Font Editor from the header of the 'sfnt' resource. (Specifically,
these values are found in the Horizontal Layout section of the header.)
In order, the numbers are:
The next two entries are read in by the font editor from the Horizontal
Metrics table for that specific glyph. These values are found in the array
of type longHorMetric.
On the left side of the window are some default values are also read
in from the header of the 'sfnt' resource.
The Alpha windowThis window shows the current state of the entire font, at the point
size specified in the Size menu. Double-clicking on a character in this window will put that character
in the Preview window. Selecting a character and then pressing Return will
do the same thing. To map the character code to the glyph index of your choice, choose the
character and then select the Edit command from the SFNT menu. This will
bring up the Char-To-Glyph mini-window:
The Twilight windowThe Twilight window shows the current state of the point storage, a section
of the graphics state. You can store points here that the instructions can
use for storage or reference. What the window shows is the state of character
element 0, while the font editor is executing the character instructions.
The Twilight window is only for display, and it cannot be edited. |