Glyph Designer 2 1 – Bitmap Font Generator Excel

Posted on  by

Font design isn't easy, but FontCreator simplifies the process with an intuitive interface and tons of features. Its specialized drawing tools allow you to design glyphs one by one. Up to three axes, any number of font masters, independent layers, glyph-based alternate and intermediate masters: You can do it all in Glyphs. Easily switch between masters, control outline compatibility and style linking, and generate a whole family in one go. Glyph Designer 2 is a powerful bitmap font designer. The application helps you create beautiful designs using highly configurable effects, definable backgrounds, custom images, editable glyph metrics, and more.

How to make a TrueType font based on your own handwriting
Using Font Creator Program 4 (henceforth 'FCP') from High Logic, and Adobe Photoshop.
1) Get FCP.

If you haven't already, that is. A 30 day trial version can be downloaded here: http://www.high-logic.com/fcp.htmlExcel
The information in this tutorial applies to version 4, public as of summer 2003.
2) Design your font.
Write your glyphs (characters) on paper using your writing implement of choice. A fairly complete list of glyphs can be obtained here: http://www.htmlhelp.com/reference/charset/latin1.gif
You can of course pick and choose which characters you wish to include. For a comic lettering font for example, you may want to skip small letters. For a title font you may want letters only, skipping numerals and punctuation.Bitmap
I highly recommend checking the list out, since there is quite a bunch of characters which are easily overlooked.
3) Scan it.
Scan as high-resolution (600 DPI) monochrome bitmap. Be careful to get the base line perfectly horizontal.
4) Split the glyphs.
Copy and export the glyphs from the bitmap to individual files in the .BMP format. You can use the glyph list above as a reference for naming the files, since the FCP follows the same naming scheme.
Since there are a couple of steps do for each glyph, you will want to make this process as smooth as possible.
Here's how to do it in Photoshop 7:
  • Make sure guides are visible, and that the 'snap to grid' option is selected (that is, both view->snap and view->snap to->guides). Make guides around all your glyphs, i.e. one guide above and one below each line of glyphs, as well as between them. Each glyph should have some whitespace around it on each side.
    Bring up the rectangular marquee tool options, and set Style to 'fixed size' and size to roughly the same size as the grid size formed by the guides.
    Set up a macro for copying and creating the new glyph file. (Basically ctrl+C, ctrl+N, set Mode to Bitmap and Width and Height to your marquee size, Ok, ctrl+V, ctrl+W)
    Select and export the glyphs one by one, using the rectangular marquee tool and your macro.

Glyph Designer 2 1 – Bitmap Font Generator Excel Word

Do not worry if the glyphs are not perfectly placed, since they will be re-aligned during import.
5) Create a new font file.
Open FCP and create a new file. Give it a name. Leave the default settings for Character Set and Font Style. A window called 'Yourfont.ttf' appears, containing greyed out 'ghost' versions of all glyphs.
6) Import the glyphs.
Again, this is a repetetive process, so I recommend using the keyboard shortcuts in order to speed things up. To speed things up even further, you might want to check out a keyboard macro program, as suggested in this post by Bhikkhu Pesala.
For each glyph,
  • Open it, either by double-clicking it or selecting it and pressing enter. The Glyph window appears.
    Choose Tools->Import Image (Alt+L, Alt+I)
    Choose Load (Alt+L)
    Browse to the folder containing your character bitmaps, and open the current glyph file (i.e. A.BMP) by typing it into the 'Filename' box, or by double-clicking it in the browser window.
    Typing is generally faster, since you only have to type the first few letters, then select the desired filename using the Down arrow.
    Choose Generate (Alt+G). The bitmap data is vectorized. If necessary, adjust the vertical placement of the glyph, by Selecting All (ctrl+A) and using the arrow keys. Since generated glyphs are placed relative to the baselines (the red intersecting lines), this is necessary for characters that should extend over these lines; for instance ',' and 'j'.
    If necessary, adjust the spacing lines (black, vertical, dashed lines). These should normally be about one whole grid square from the glyph on each side, except brackets and the like, which should have less space on the inside.
    Close the Glyph window (Ctrl+F4).
If the newly imported glyph appears in a different size than the surrounding ghost glyphs, you will have to adjust the Size Multiplier under the Glyph tab of the Import Image window. I recommend you re-import the glyph, since this ensures that all imported glyphs will be the same scale.
For a glyph bitmap of 200x200 pixels, Size Multiplier should be about 10.
Make sure that you check the 'default' box under the Glyph tab, or you will have to adjust this setting again for each glyph.
7) Re-map glyphs (Optional: Single case fonts only)
To make single-case fonts (for instance ALL CAPS ones), there are basically two approaches: the Quick Way and the Right Way.
The Quick Way is to simply select all letters (A..Z) and copy them to the other case (a..z). This is bad for a couple of reasons: for one, the font file will unnecessarily bloated, since the same set of glyph data is stored twice. And more importantly, it means more kerning pairs, which translates to more work for you in the end. If this doesn't bother you though, then by all means, go right ahead.
The Right Way is to add a new character mapping for each one of the letters, like so:
  • Choose Format->Mappings... (Alt+O, Alt+M)
    If you are making a PC font, select 'Microsoft Unicode' in the Platforms list.
    Highlight a glyph in the Glyphs list.
    Choose Select (Alt+S)
    Find and select the desired mapping (for example 'LATIN SMALL LETTER A'), and press Ok.
    If a warning dialog appears about the character already being mapped to another glyph, just click OK.
The letters a..z have mapping values that are the same as A..Z + $20, so it will be quicker for you to type the value into the index box and press Add for these, than going via the Select window.
You may erase the unused letters (a..z) in the main window, but I would recommend this only if you know that you will not be needing them later.
8 ) Auto Kern it.
  • Choose Tools->Auto Kern...
    Choose Next.
    Select the character you wish to auto kern in the left-hand list, and choose '>' to bring them to the right-hand list. You will probably want to kern them all. Be aware though, that there is an upper limit of 128 characters at a time for auto kern.
    Choose Next.
    For a reasonably tight font, type 300 into the 'White space between characters' box.
    Choose Next. Kerning pairs are automagically calculated.
9) Test it.
You are now ready to take your font for a test drive.
The Test window (Font->Test or F5) will NOT display the font with kerning, so you will have to install the font in order to view it properly.
  • Choose Font->Install... You will be asked if you wish to save the font.
    Choose Yes. The Font Installation Wizard appears.
    Choose Next, Next and Finish. Your font is now installed.
    If you run into problems writing the font, try closing other applications which use fonts (such as Word or Photoshop).
    If still no go, check the 'Launch Windows Fonts Folder' box, and remove the old version of the font manually.
    Open up any application that can handle TTF fonts, for example Photoshop, and type away.
10) Polish it.
You will most likely discover a bunch of visual quirks and problems. Pay special attention to how the text flows in larger blocks.
  • PROBLEM
    All characters appear too close together or too far apart.
    SOLUTION
    Adjust the Metrics (individual vertical spacing), using Tools->Auto Metrics
    You will probably have to do the kerning all over again after this.
    PROBLEM
    Some characters appear too close together or too far apart.
    SOLUTION
    Adjust the kerning pairs, using format->kerning.
    PROBLEM
    Some characters do not appear at all!
    SOLUTION
    Either you missed importing them, in which case you just have to do that, or the characters in question have no mapping, in which case you will have to add mapping for them using Format->Mappings.
    PROBLEM
    Some characters need minor adjustments.
    SOLUTION
    Adjusting individual anchor points in the Glyph window is fairly straight-forward.
    PROBLEM
    Diacritical marks (little marks above or below some non-english characters) appear clipped.
    SOLUTION
    Adjust the top or bottom lines (solid, black, horizontal lines) in the Glyph window.
When you have performed your adjustments, test it again!
11) Describe it.
FCP adds some copyright information automatically to the english language version. You will probably want to change some of it, at least add your name as the copyright owner. The TTF format also supports a bunch of additional data about the font. To edit it, do as follows:
  • Choose Format->Naming.
    For PC fonts, choose Microsoft Unicode under Platform.
    Select English in the Language list.
    Change or uncheck the undesired information, and press Ok.
    There is even more information added by FCP as default. This can be found and modified in the Advanced Naming section, found by pressing the 'Advanced...' button.
12) Publish it (Optional)
These forums have a Gallery section, where you can post a link to your font to have other FCP users give their input on your work.
This is also a good place to get help (after first consulting the Help file, of course).
13) Mac export (Optional)
If you want Mac users to be able to use your font, you will have to convert it to Mac TTF. There is a tool called CrossFont from Acute systems that does this. It is shareware and costs $45 to buy. It can be downloaded here: http://www.asy.com/scrcf.htm
Usage of this software is outside of the scope of this tutorial, though, sorry.
Don't forget to add Mapping and Naming information for the Macintosh platform to your Mac fonts!
14) Buy the program.
If you haven't already and enjoy the program, please consider purchasing it. It's not only much easier to use than other professional font design programs out there, it's reasonably priced as well.

Glyph Designer 2 1 – Bitmap Font Generator Excel Shortcut


HAPPY FONTING!
Johan C. Brandstedt
2003-09-04
Download my free fonts at http://johancb.freelancers.net.
Comments and suggestions are welcome!

II. Glyph Outlines

This section describes the way scalable representations of glyph images, called outlines, are used by FreeType as well as client applications.

1. Pixels, points, and device resolutions

Though it is a very common assumption when dealing with computer graphics programs, the physical dimensions of a given pixel (be it for screens or printers) are not squared. Often, the output device exhibits varying resolutions in both horizontal and vertical directions, and this must be taken care of when rendering text.

It is thus common to define a device's characteristics through two numbers expressed in dpi (dots per inch). For example, a printer with a resolution of 300×600 dpi has 300 pixels per inch in the horizontal direction, and 600 in the vertical one. The resolution of a typical computer monitor varies with its size (10″ and 25″ monitors don't have the same pixel sizes at 1024×768), and of course the graphics mode resolution.

As a consequence, the size of text is usually given in points, rather than device-specific pixels. Points are a physical unit, where 1 point equals 1/72th of an inch in digital typography. As an example, most books using the Latin script are printed with a body text size somewhere between 10 and 14 points.

It is thus possible to compute the size of text in pixels from the size in points with the following formula:

pixel_size = point_size * resolution / 72

The resolution is expressed in dpi. Since horizontal and vertical resolutions may differ, a single point size usually defines a different text width and height in pixels.

Unlike what is often thought, the ‘size of text in pixels’ is not directly related to the real dimensions of characters when they are displayed or printed. The relationship between these two concepts is a bit more complex and depends on some design choices made by the font designer. This is described in more detail in the next sub-section (see the explanations on the EM square).

2. Vectorial representation

The source format of outlines is a collection of closed paths called contours. Each contour delimits an outer or inner region of the glyph, and can be made of either line segments or Bézier arcs.

The arcs are defined through control points, and can be either second-order (these are conic Béziers) or third-order (cubic Béziers) polynomials, depending on the font format. Note that conic Béziers are usually called quadratic Béziers in the literature. Hence, FreeType associates each point of the outline with flags to indicate its type (normal or control point). As a consequence, scaling the points will scale the whole outline.

Each glyph's original outline points are located on a grid of indivisible units. The points are usually stored in a font file as 16-bit integer grid coordinates, with the grid's origin being at (0,0); they thus range from -32768 to 32767. (Even though point coordinates can be floats in other formats such as Type 1, we will restrict our analysis to integer values for simplicity).

Glyph Designer 2 1 – Bitmap Font Generator Excel Free

The grid is always oriented like the traditional mathematical two-dimensional plane, i.e., the X axis goes from the left to the right, and the Y axis from bottom to top.

In creating the glyph outlines, a type designer uses an imaginary square called the EM square. Typically, the EM square can be thought of as a tablet on which the characters are drawn. The square's size, i.e., the number of grid units on its sides, is very important for two reasons:

  • It is the reference size used to scale the outlines to a given text dimension. For example, a size of 12pt at 300×300 dpi corresponds to 12*300/72 = 50 pixels. This is the size the EM square would appear on the output device if it was rendered directly. In other words, scaling from grid units to pixels uses the formula:

    pixel_size = point_size * resolution / 72
    pixel_coord = grid_coord * pixel_size / EM_size

    Another acronym used for the pixel size is ppem (pixel per EM); this value can be fractional also. Note that fractional ppem values are not supported everywhere.

  • The greater the EM size is, the larger resolution the designer can use when digitizing outlines. For example, in the extreme example of an EM size of 4 units, there are only 25 point positions available within the EM square which is clearly not enough. Typical TrueType fonts use an EM size of 2048 units; Type 1 or CFF PostScript fonts traditionally use an EM size of 1000 grid units (but point coordinates can be expressed as floating values).

Note that glyphs can freely extend beyond the EM square if the font designer wants so. The EM square is thus just a convention in traditional typography.

Grid units are very often called font units or EM units.

As said before, pixel_size computed in the above formula does not directly relate to the size of characters on the screen. It simply is the size of the EM square if it was to be displayed. Each font designer is free to place its glyphs as it pleases him within the square. This explains why the letters of the following text have not the same height, even though they are displayed at the same point size with distinct fonts:

As one can see, the glyphs of the Courier family are smaller than those of Times New Roman, which themselves are slightly smaller than those of Arial, even though everything is displayed or printed at a size of 16 points. This only reflects design choices.

Glyph Designer 2 1 – Bitmap Font Generator Excel Spreadsheet

3. Hinting and Bitmap rendering

The outline as stored in a font file is called the ‘master’ outline, as its point coordinates are expressed in font units. Before it can be converted into a bitmap, it must be scaled to a given size and resolution. This is done with a very simple transformation, but especially at small sizes undesirable artifacts can appear, in particular stems of different width or height in letters like ‘E’ or ‘H’ can occur.

As a consequence, proper glyph rendering needs the scaled points to be aligned along the target device pixel grid, through an operation called grid-fitting (often called hinting). One of its main purposes is to ensure that important widths and heights are respected throughout the whole font (for example, it is very often desirable that the ‘I’ and the ‘T’ glyphs have their central vertical line of the same pixel width), as well as to manage features like stems and overshoots, which can cause problems at small pixel sizes.

There are several ways to perform grid-fitting properly; most scalable formats associate some control data or programs with each glyph outline. Here is an overview:

  • explicit grid-fitting

    The TrueType format defines a stack-based virtual machine, for which programs (also called bytecode) can be written with the help of more than 200 operators, most of them related to geometrical operations. Each glyph is thus made of both an outline and a control program to perform the actual grid-fitting in the way defined by the font designer.

  • implicit grid-fitting (also called hinting)

    The Type 1, CFF, and CFF2 formats take a much simpler approach: Each glyph is made of an outline as well as several pieces called hints which are used to describe some important features of the glyph, like the presence of stems, some width regularities, and the like. There aren't a lot of hint types, and it is up to the final renderer to interpret the hints in order to produce a fitted outline.

  • automatic grid-fitting

    Some formats include no control information with each glyph outline, apart from font metrics like the advance width and height. It is then up to the renderer to ‘guess’ the more interesting features of the outline in order to perform some decent grid-fitting.

The following table summarizes the pros and cons of each scheme.

grid-fitting schemeadvantagesdisadvantages

explicit

Quality. Excellent results at small sizes are possible. This is very important for screen display.

Consistency. All renderers produce the same glyph bitmaps (at least in theory).

Speed. Interpreting bytecode can be slow if the glyph programs are complex.

Size. Glyph programs can be long.

Technical difficulty. It is extremely difficult to write good hinting programs. Very few tools available.

implicit

Size. Hints are usually much smaller than explicit glyph programs.

Speed. Grid-fitting is usually a fast process.

Quality. Often questionable at small sizes. Better with anti-aliasing though.

Inconsistency. Results can vary between different renderers, or even distinct versions of the same engine.

automatic

Size. No need for control information, resulting in smaller font files.

Speed. Depends on the grid-fitting algorithm. Usually faster than explicit grid-fitting.

Quality. Often questionable at small sizes. Better with anti-aliasing though.

Speed. Depends on the grid-fitting algorithm.

Inconsistency. Results can vary between different renderers, or even distinct versions of the same engine.