Reference

xmbdfed(1x)

Motif-based BDF font editor

NAME

xmbdfed - Motif-based BDF font editor

SYNOPSIS

xmbdfed [options] [fonts ...]

DESCRIPTION

xmbdfed lets you interactively create new bitmap font files or modify existing ones. It allows editing multiple fonts and multiple glyphs, it allows cut and paste operations between fonts and glyphs and editing font properties. xmbdfed can import Metafont PK/GF fonts, Han Bitmap Font Format (HBF) fonts, Linux console fonts (PSF, CP, and EGA/VGA) fonts, Sun VF fonts, TrueType (TTF) fonts, or grab a font from the X server. xmbdfed can export PSF Linux fonts.

xmbdfed works on X Window System Version 11 (X11), Release 5 or Release 6, with Motif 1.2.x or Motif 2.x.

OPTIONS

xmbdfed accepts the following command line arguments:

-nc

do not preserve comments (by default, xmbdfed automatically collects comments that are saved with the font)

-nu

do not preserve unencoded glyphs (by default, xmbdfed preserves the unencoded glyphs)

-nm

do not make metrics corrections (by default, xmbdfed attempts to make metrics corrections automatically)

-np

do not pad character-cell bitmaps (by default, xmbdfed pads character-cell bitmaps with 0's to the cell dimensions)

-bp

allow blank pages (by default, xmbdfed skips blank pages)

-ed

do not present the "Really Exit?" dialog (by default, this dialog always presented)

-ps n

set default point size (if unspecified, xmbdfed sets it to 12)

-hres n

set default horizontal resolution

-vres n

set default vertical resolution

-res n

set both default resolutions (if unspecified, xmbdfed sets both horizontal and vertical resolution to that of display, (e.g. 90x90 dpi for Sun workstations)

-sp s

set the default font spacing ("p" for Proportional, "m" for Monospaced, or "c" for Character Cell)

FONT GRID

At the top of each editor window there are some fields and buttons. These are:

The "Font" text field is where the font name is set so it can be edited.

The "Glyph" field is a label that provides some information about glyph name, encoding, and metrics when a glyph is selected. When a range of glyphs are selected, this field displays the start and end codes of the range.

The push buttons are used to navigate through the glyph pages. The "Previous Page" and "Next Page" buttons normally skip glyph pages that are empty, but that can be changed using the "Setup" dialog.

If the Shift key is held down while the "Next" or "Previous" page buttons is pressed, then the paging behavior will be opposite of the current paging behavior.

The "Page" field indicates the current glyph page and also allows a specific page number to be entered. Once a page number is entered, pressing the Return key will cause the Font Grid to shift to that page. The page number entered is expected to be a decimal number.

The "Code" field is provided for situations where the page number is not known, but the encoding is known. The encoding entered in this field must be in the base (8, 10, or 16) that is currently being used to display glyph encodings (see the "View" menu below). Once the encoding is entered, pressing the Return key will cause the Font Grid to shift to the page containing the encoding.

The main window of each font editor is called the Font Grid. Each Font Grid has a clipboard used for passing glyphs around. This clipboard is called FONTGRID_CLIPBOARD. The format of the data stored to this clipboard is not documented yet.

When a glyph has been modified either by the user or by automatic metrics corrections when the font is loaded, the glyph code above the glyph cell will be highlighted.

Font Grid Menus

The File menu has the following entries:

New <Ctrl+N>

This creates a new font using the current defaults for point size, horizontal and vertical resolution, and font spacing.

Open <Ctrl+O>

This opens a new font in the current Font Grid. If the font in the grid has been modified, the option to save the font before loading a new one will be given.

Save <Ctrl+S>

Save the current font. If the current font does not have a file name, a file selection dialog will pop up so a file name can be entered.

Save As <Ctrl+W>

Save the current font with some other name.

The Import submenu of the File menu has the following entries:

PK/GF Font <Ctrl+K>

Import a Metafont PK or GF font.

Console Font <Ctrl+L>

Import a binary console font used by Linux and Sun (PSF, CP, vfont, and other font formats).

HBF Font <Ctrl+H>

Import an HBF font.

Windows Font <Ctrl+B>

Import a Windows FON/FNT font. This will also import fonts from .EXE and .DLL files as well.

TrueType Font <Ctrl+Y>

Import a TrueType font (.ttf extension) or a TrueType collection (.ttc extension).

Server Font <Ctrl+G>

Import a font from the X server.

Export PSF <Ctrl+F>

This will export the current BDF font to a PSF font if the BDF font is less than 8 pixels wide and is a character cell font.

Only the first 512 or 256 glyphs will be exported depending on how many glyphs are in the font. A mapping table will be appended to the end of the font if there is any break in the encodings of the glyphs.

Exit/Close <Ctrl+F4>

Exit the program if this is the primary Font Grid or simply hide (unmap) the current Font Grid window.

The Edit menu has the following entries:

Copy <Ctrl+C> or <Button3Down>

This copies the current selection to the Font Grid clipboard.

Cut <Ctrl+X> or <Key>Delete or <Key>BackSpace

This copies the current selection to the Font Grid clipboard and then deletes the selection.

Paste <Ctrl+V> or <Button2Down> or Shift<Button2Down>

This pastes the Font Grid clipboard at the currently selected position. If <Button2Down> is used, the Font Grid clipboard will be pasted starting with the glyph cell where the button was pressed. If Shift<Button2Down> is used, the Font Grid clipboard will be inserted in front of the glyph cell where the button was pressed. Any glyphs that were moved past the 0xffff encoding to make room for the clipboard contents will be moved to the unencoded area. This option always inserts, no matter what mode the font grid is in.

Properties <Ctrl+P>

This invokes the font property editor.

Comments <Ctrl+M>

This invokes the font comments editor.

Font Info <Ctrl+I>

This invokes a dialog that allows changes to some of the font information so these values do not have to be changed using the property editor. These values include the default character, font device width (for monowidth and character cell fonts), font ascent and descent, font vertical and horizontal resolution, and the font spacing.

The Font Name submenu of the Edit menu has the following four entries:

Make XLFD Name

If the font does not have an XLFD name, this will save the current font name in the _ORIGINAL_FONT_NAME font property and then generate an XLFD name for the font.

Update Name From Properties

This will update the XLFD font name fields from the font property list.

Update Properties From Name

This will update the font properties from the XLFD font name.

Update Average Width

This will update the average width field of the XLFD font name and will update the AVERAGE_WIDTH font property as a side effect.

Test Glyphs <Ctrl+Z>

This will toggle the glyph test dialog on or off for the editor. When this is active, selecting a glyph from any Font Grid will also add it to the glyph test dialog. When changes are made to a glyph or the font bounding box, the glyph test dialog will be updated accordingly.

The glyph test dialog provides a toggle to turn the baseline on or off and another toggle to draw from right to left instead of left to right.

Setup <Ctrl+T>

This will invoke the dialog to edit various settings used by the editor such as the default point size, resolution and font spacing.

The View menu has the following entries:

Unencoded <Ctrl+E>

This will toggle between displaying the unencoded (glyphs with an ENCODING field of -1) and encoded glyphs.

Code Base

Selects displaying of glyph encoding. Options are Octal (base 8), Decimal (base 10) or Hexadecimal (base 16).

Messages <Ctrl+A>

This will show messages generated when corrections to the font metrics are done or errors are encountered.

The Operations menu has the following entries:

Translate <Ctrl+D>

This will bring up the dialog for entering the X offset and Y offset used to translate the glyph to a new location.

The option of translating the selected glyphs or all of the glyphs is provided.

Rotate <Ctrl+R>

This will bring up the dialog for entering the rotation angle. The rotation is limited to between plus or minus 1 and 359 degrees.

The option of rotating the selected glyphs or all of the glyphs is provided.

Shear <Ctrl+J>

This will bring up the dialog for entering theangle of the shear. The shear is limited to plus or minus 45 degrees.

The option of rotating the selected glyphs or all of the glyphs is provided.

The Editors menu has the following entries:

New <Ctrl+N>

This will cause a new editor to be created.

[editor list]

The remaining menu items are all the Font Grid's that have been created. Choosing one will force that window to be made visible (mapped) and also put that window on top.

Font Grid Other Features

Double clicking the mouse on one of the glyphs will start a Glyph Editor for that glyph.

The font name can be edited in the Font Grid and page switching can be done with the buttons on the Font Grid.

GLYPH EDITOR

The Glyph Editor provides a simple bitmap editor designed to edit glyph bitmaps and other glyph information. The Glyph Editors all use a special clipboard used to pass bitmaps between the Glyph Editors. This clipboard is called GLYPHEDIT_CLIPBOARD.

The only limit on the number of Glyph Editors that can be open at one time is the amount of memory.

Glyph Editor Menus

The File menu has the following entries:

Update <Ctrl+S>

This will update the Font Grid with the modified glyph.

Update and Next <Ctrl+U>

This will update the FontGrid with the modified glyph and move to the next glyph.

Update and Previous <Ctrl+B>

This will update the FontGrid with the modified glyph and move to the previous glyph.

Import XBM <Ctrl+I>

This will pop up a file selection dialog so an X Bitmap file (.xbm extension) can be selected to be imported into the glyph editor.

The imported bitmap is handled the same way as bitmaps pasted. They are inserted as a selection with the move operation active and do not destroy any bitmap that already exists in the editor.

Export XBM <Ctrl+O>

This will pop up a file selection dialog so that the glyph image can be exported as an X Bitmap file (.xbm extension).

Close <Ctrl+F4>

This will close the Glyph Editor.

The Edit menu has the following entries:

Reload <Ctrl+L>

This will reload the glyph and discard any changes made in the GlyphEditor.

Resize <Ctrl+R>

This will allow changing the sizes of the glyph left/right bearings and the glyph ascent/descent.

Copy <Ctrl+C>

This will copy the currently selected portion of the bitmap to the Glyph Editor clipboard.

Cut <Ctrl+X>

This will copy the currently selected portion of the bitmap to the Glyph Editor clipboard and then delete the selection.

Paste <Ctrl+V>

This will paste the contents of the Glyph Editor clipboard into the current Glyph Editor with the top-left coordinate of the bitmap on the clipboard pasted at the location of the mouse. If the bitmap is too big to fit if it is pasted at the mouse location, the bitmap will be shifted until it fits completely in the Glyph Editor.

Select All <Ctrl+A>

This will select the whole glyph bitmap.

Next Glyph <Ctrl+N>

This will move the Glyph Editor to the next glyph position in the Font Grid. If the current glyph has been modified, a save prompt will appear before moving to the next glyph.

Previous Glyph <Ctrl+P>

This will move the Glyph Editor to the previous glyph position in the Font Grid. If the current glyph has been modified, a save prompt will appear before moving to the previous glyph.

The Operation menu has the following entries:

Draw <Ctrl+D>

Change the Glyph Editor into Draw mode.

Move <Ctrl+M>

Change the Glyph Editor into Move mode. Move mode allows selecting a portion of the glyph bitmap and moving it to another location.

Copy <Ctrl+Y>

Change the Glyph Editor into Copy mode. Copy mode allows copying a portion of the glyph bitmap and moving it to another location.

Rotate <Ctrl+T>

This will invoke the rotation dialog that allows the degrees of rotation to be specified. Rotation can be between 1 and 359 degrees.

Shear <Ctrl+E>

This will invoke the shear dialog that allows the degrees of horizontal shear to be specified. Other names for shearing are obliquing or slanting. Shearing is allowed between 1 and 45 degrees.

Glyph Editor Other Features

When the mouse is used to shift the bitmap by one of the buttons, holding the mouse down will cause the activity to repeat.

RESOURCES

The program understands all of the core X Toolkit resource names and classes as well as:

noComments (Boolean)

Specify whether xmbdfed preserves comments or not (default False).

noUnencodedGlyphs (Boolean)

Specify whether xmbdfed preserves unencoded glyphs (character code -1) or not (default False).

noMetricsCorrections (Boolean)

Specify whether xmbdfed does metrics corrections or not (default False).

padCharacterCells (Boolean)

Specify whether character-cell glyphs should be padded to cell geometry (default False).

skipBlankGlyphPages (Boolean)

Specify whether xmbdfed skips blank pages or not (default True).

fontPointSize (Cardinal)

Sets default point size.

fontHorizontalResolution (Cardinal)

Sets default horizontal resolution.

fontVerticalResolution (Cardinal)

Sets default vertical resolution.

fontResolution (Cardinal)

Sets both default horizontal and vertical resolutions.

fontSpacing (String)

Sets the default font spacing ("p", "m", or "c")

SEE ALSO

xfed(1), bdftopcf(1), bdftosnf(1)
Glyph Bitmap Distribution Format (BDF) Specification, Application Note 5005, Adobe System Inc, 1993
X Logical Font Description, X Consortium

ACKNOWLEDGMENTS

Ross Patterson for his HBF code.
der Mouse for his "getbdf" code.
K. Carothers and A. Korobka for their "fnt2bdf" code in Wine.

Mike Stroyan <[email protected]> for patches.
Primoz Peterlin <[email protected]> for this manual page.
Danny Backx <[email protected]> for the LessTif Imakefile.
Donald Page <[email protected]> for patches.
Michal Szymanski <[email protected]> for problem reports.
Werner Lemberg <[email protected]> for problem reports.
William F. Maton <[email protected]> for problem reports.
Ivan Nejgebauer <[email protected]> for problem reports.
Solofo <[email protected]> for problem reports.
Dave Bodenstab <[email protected]> for patches.
W. Chao <[email protected]> for Makefile changes and problem report.
Andreas Reuter <[email protected]> for problem reports.
Leonard Dickens <[email protected]> for IRIX 6.3 Makefile changes.
Markus Kuhn <[email protected]> for suggestions.

AUTHOR

Mark Leisher
Computing Research Lab
New Mexico State University
Email: [email protected]

History