GBDFED(1)

GBDFED(1) β€” General Commands Manual 🫢

okay so this whole thing is the manual page for gbdfed, straight outta the General Commands Manual section, and bestie we are about to read it together like it's a text thread. grab a snack. πŸ’–


✨ NAME ✨

gbdfed β€” a GTK-based BDF font editor. that's it, that's the name section. short, sweet, iconic. πŸ’…


🌸 SYNOPSIS 🌸

gbdfed [options] [fonts ...]

like... you give it some options, you give it some fonts, and it does its thing. no cap. ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the vibe: gbdfed lets you interactively create brand-new bitmap font files or modify existing ones. you're not just poking at one font either β€” it lets you edit multiple fonts and multiple glyphs at the same time, it lets you cut and paste between fonts and between glyphs, and yes you can edit font properties too. main character font editor energy fr fr. πŸ‘‘

and the import game? immaculate. gbdfed can import:

  • Metafont PK/GF fonts
  • Han Bitmap Font Format (HBF) fonts
  • Linux console fonts (PSF, CP, and EGA/VGA)
  • Sun VF fonts
  • OpenType/TrueType (OTF/TTF) fonts
  • or literally grab a font from the X server (when running under X11) 😭

and for export, it can do PSF2 Linux console fonts and HEX fonts (see online help, bestie, the manual's not gonna spill all the tea πŸ“).

as for where it runs: gbdfed works on X Window System Version 11 (X11), Release 5 or 6, with GTK+ 2.6 or greater. it may work on Windows, but it hasn't been tested yet πŸ™ˆ β€” so like, no promises, we don't know her like that.


πŸ’… OPTIONS πŸ’…

gbdfed accepts the following command line arguments:

  • -nc β€” do not preserve comments. (by default, gbdfed automatically collects comments that are saved with the font.) so this flag is the "no thoughts, head empty" mode for comments. πŸ’€
  • -nu β€” do not preserve unencoded glyphs. (by default, gbdfed preserves the unencoded glyphs.)
  • -nm β€” do not make metrics corrections. (by default, gbdfed attempts to make metrics corrections automatically.)
  • -np β€” do not pad character-cell bitmaps. (by default, gbdfed pads character-cell bitmaps with 0's to the cell dimensions when the font is saved.)
  • -bp β€” allow blank pages. (by default, gbdfed skips blank pages.)
  • -ed β€” do not present the "Really Exit?" dialog. (by default, this dialog always presented.) yes bestie it will ask you "Really Exit?" every single time unless you pass this. annoying? maybe. protective? also maybe. 🫢
  • -ps n β€” set default point size. (if unspecified, gbdfed sets it to 12.)
  • -hres n β€” set default horizontal resolution.
  • -vres n β€” set default vertical resolution.
  • -res n β€” set both default resolutions. (if unspecified, gbdfed sets both horizontal and vertical resolution to that of display, (e.g. 90x90 dpi for Sun workstations).)
  • -sp s β€” set the default font spacing. the values are: "p" for Proportional, "m" for Monowidth, or "c" for Character Cell. 🌈
  • -eol e β€” set the default end-of-line type. the values are: "u" for Unix LF, "d" for DOS/Windows CRLF, or "m" for Macintosh CR). CR)
okay so fun fact the original manual page literally says CR) twice there at the end 😭 not me catching a typo in the wild. leaving it in because the facts do not change, even the cursed ones. πŸ’€
  • -g glyph-code β€” specify the initial glyph code at startup. the glyph code can be specified in decimal, octal, or hex. octal numbers must be prefixed with the digit 0, and hex numbers must be prefixed with one of: 0x, 0X, U+, U-, \u. so many flavours, pick your fave ✨
  • -cb code-base β€” specify the code base used to display the glyphs encodings. it can be "octal", "decimal", or "hexadecimal".

πŸŽ€ 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 "Preferences" dialog. (hey, that's what -bp is about, bestie, it all connects πŸ”₯)
  • 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 assumed 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. every single Font Grid has its own clipboard used for passing glyphs around, and that clipboard is called FONTGRID_CLIPBOARD. heads up though: the format of the data stored to this clipboard is not documented yet πŸ™ˆ so like... don't go poking at it expecting lore.

and one last lil detail that's actually kinda important: 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. so you can always tell which glyphs have been ✨touched✨. lowkey the most useful visual cue in the whole app. πŸ’–


πŸ“ The File menu πŸ“

  • New <Ctrl+N> β€” makes a brand new font, using the current defaults for point size, horizontal and vertical resolution, and font spacing. Fresh start energy ✨
  • Open <Ctrl+O> β€” opens a new font into the current Font Grid. If the font already in the grid has been modified, you'll get the option to save it before the new one loads in. She's polite like that πŸ’–
  • Save <Ctrl+S> β€” saves the current font. If the current font doesn't have a file name yet, a file selection dialog pops up so you can type one in. When the font gets saved, it automatically generates a list of _XFREE86_GLYPH_RANGE properties containing a list of the glyph codes available in the font. Iconic behaviour, no notes. πŸ‘‘
  • Save As <Ctrl+W> β€” saves the current font under some other name. When the font gets saved, it automatically generates a list of _XFREE86_GLYPH_RANGE properties containing a list of the glyph codes available in the font. Same magic, new name πŸ’…

The Import submenu of the File menu is giving ✨ bring me everything ✨ and has these:

  • PK/GF Font <Ctrl+K> β€” imports a Metafont PK or GF font.
  • Console Font <Ctrl+L> β€” imports a binary console font used by Linux and Sun (that's PSF1, PSF2, CP, vfont, and other font formats).
  • HBF Font <Ctrl+H> β€” imports an HBF font. Lowkey only available if HBF support is compiled into gbdfed. πŸ™ˆ
  • Windows Font <Ctrl+B> β€” imports a Windows FON/FNT font. It'll also pull fonts out of .EXE and .DLL files too, which is wild but okay πŸ’€
  • OpenType/TrueType Font <Ctrl+Y> β€” imports an OpenType/TrueType font (.otf or .ttf extension) or a TrueType collection (.ttc extension).
  • Server Font <Ctrl+G> β€” imports a font straight from the X server, if you're running under the X Windowing System.

The Export submenu of the File menu has these:

  • PSF <Ctrl+F> β€” exports the current BDF font, or just the currently selected glyphs, out to a PSF2 font. Glyphs in PSF fonts are usually arranged in a specific way so they work properly with the basic display driver. Lots of these fonts come with mapping tables attached that say which Unicode characters a glyph can be used for. That mapping table is what lets the console attempt to display Unicode text. πŸ¦‹ While the export is happening, an option menu lets you pick between:
    • Export Font with Mapping Table
    • Export Font Only
    • Export Mapping Table Only
Heads up bestie: only the first 512 glyphs get exported to the font. That's the whole limit, no cap. 😭

Back up at the top level of the File menu:

  • Exit/Close <Ctrl+F4> β€” exits the program if this is the primary Font Grid, or just hides (unmaps) the current Font Grid window if it isn't.

πŸŽ€ The Edit menu πŸŽ€

  • Copy <Ctrl+C> or <Button3Down> β€” copies the current selection to the Font Grid clipboard.
  • Cut <Ctrl+X> or <Key>Delete or <Key>BackSpace β€” copies the current selection to the Font Grid clipboard and then deletes the selection.
  • Paste <Ctrl+V> or <Button2Down> β€” replaces the glyphs starting at the currently selected position with whatever's on the Font Grid clipboard.
  • Overlay <Ctrl+Shift+V> or Ctrl<Button2Down> β€” merges the glyphs on the Font Grid clipboard with the glyphs starting at the currently selected position. Like, the bitmaps literally get combined together. The names of the modified glyphs do not change. 🫢
  • Insert <Ctrl+Meta+V> or Shift<Button2Down> β€” inserts the glyphs on the Font Grid clipboard in front of the currently selected position.
  • Properties <Ctrl+P> β€” invokes the font property editor.
  • Comments <Ctrl+M> β€” invokes the font comments editor.
  • Font Info <Ctrl+I> β€” invokes a dialog that lets you change some of the font information, so you don't have to go through the property editor for these. The 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. Very main character of it to have its own dialog πŸ’…

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

  • Make XLFD Name β€” if the font doesn't have an XLFD name, this saves the current font name in the _ORIGINAL_FONT_NAME font property and then generates an XLFD name for the font.
  • Update Name From Properties β€” updates the XLFD font name fields from the font property list.
  • Update Properties From Name β€” updates the font properties from the XLFD font name.
  • Update Average Width β€” updates the average width field of the XLFD font name, and updates the AVERAGE_WIDTH font property as a side effect.

Name Glyphs β€” a whole lil submenu for renaming everything at once:

  • Unicode Names β€” renames all the glyphs using names taken from a file in the Unicode Character Database format. That file can be set in the configuration file, or set using the Setup dialog.
  • Unicode Values β€” renames all the glyphs with a hexadecimal value prefixed by 0x, U+, or \u (example: 0x010D, U+010D, \u010D).

Back at the Edit menu level:

  • Test Glyphs <Ctrl+Z> β€” toggles the glyph test dialog on or off for the editor. When it's active, selecting a glyph from any Font Grid also adds it to the glyph test dialog. And when changes are made to a glyph or the font bounding box, the glyph test dialog updates accordingly. Obsessed with the auto-sync, honestly. ✨ The glyph test dialog gives you 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> β€” invokes the dialog to edit the various settings the editor uses, like the default point size, resolution and font spacing.

🌈 The View menu 🌈

  • Unencoded <Ctrl+E> β€” toggles between displaying the unencoded glyphs (glyphs with an ENCODING field of -1) and the encoded glyphs.
  • Code Base β€” picks how the glyph encoding gets displayed. Your options are Octal (base 8), Decimal (base 10) or Hexadecimal (base 16).
  • Other Page <Ctrl+Shift+S> β€” toggles between the current page and the last page that was viewed.
  • Vertical View <Ctrl+Q> β€” toggles the FontGrid between showing the glyphs horizontally (that's the default) and vertically.
  • Messages <Ctrl+A> β€” shows the messages generated when corrections to the font metrics are done, or when errors are encountered.

πŸ¦‹ The Operations menu πŸ¦‹

  • Translate <Ctrl+D> β€” brings up the dialog for entering the X offset and Y offset used to translate the glyph to a new location. You get the option of translating the selected glyphs or all of the glyphs. 🫢
  • Rotate <Ctrl+R> β€” brings up the dialog for entering the rotation angle. The rotation is limited to between plus or minus 1 and 359 degrees. You get the option of rotating the selected glyphs or all of the glyphs.
  • Shear <Ctrl+J> β€” brings up the dialog for entering the angle of the shear. The shear is limited to plus or minus 45 degrees. And yes, same deal: you get the option of doing the selected glyphs or all of the glyphs. (The original text says "rotating" here, but bestie, we all know she means shearing. πŸ™ˆ)
  • Embolden <Ctrl+Shift+B> β€” brings up the dialog for emboldening either the selected glyphs or all of the glyphs. To embolden means to make bold. That's it, that's the whole thing. πŸ’…

🧚 The Editors menu 🧚

  • New <Ctrl+N> β€” makes a new editor, using the point size, resolution, and bits per pixel set in the config file, from the command line, or from the Setup dialog.
  • [editor list] β€” all the remaining menu items are every Font Grid that's been created. Pick one and it forces that window to be made visible (mapped) and also puts that window on top. Bring her to the front, she deserves it πŸ‘‘

🌸 Font Grid Other Features 🌸

Double clicking the mouse on one of the glyphs starts a Glyph Editor for that glyph. That's the shortcut, iykyk πŸ–±οΈβœ¨

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


πŸ’– GLYPH EDITOR πŸ’–

The Glyph Editor is a simple bitmap editor, designed to edit glyph bitmaps and other glyph information. All the Glyph Editors share one special clipboard used to pass bitmaps between them. That clipboard is called GLYPHEDIT_CLIPBOARD. Shared clipboard? Bestie behaviour fr fr 🫢

The only limit on how many Glyph Editors you can have open at one time is the amount of memory. Go wild, the vibes are unlimited, the RAM is not. πŸ’€

✨ Glyph Editor Menus ✨

okay so the File menu is giving main-character energy and it has these entries:

  • Update <Ctrl+S> β€” this updates the Font Grid with the modified glyph. Also, bestie, to the right of the Glyph Name field there's a button that does literally the exact same thing, so pick your fighter.
  • Update and Next <Ctrl+U> β€” updates the Font Grid with your modified glyph and slides over to the next glyph. multitasking queen.
  • Update and Previous <Ctrl+B> β€” same vibe, but it updates and moves to the previous glyph instead.
  • Close <Ctrl+F4> β€” closes the Glyph Editor. bye bestie πŸ¦‹

the Edit menu, aka the clipboard corner πŸŽ€:

  • Reload <Ctrl+L> β€” reloads the glyph and discards any changes you made in the Glyph Editor. so like, careful, that's a no-take-backs situation πŸ’€
  • Copy <Ctrl+C> β€” copies the currently selected portion of the bitmap to the Glyph Editor clipboard.
  • Cut <Ctrl+X> β€” copies the currently selected portion of the bitmap to the Glyph Editor clipboard and then deletes the selection. snip snip βœ‚οΈ
  • Paste <Ctrl+V> β€” pastes 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. And if the bitmap is too big to fit when pasted at the mouse location, it gets shifted until it fits completely in the Glyph Editor. it'll squeeze itself in, it's flexible like that πŸ’…
  • Select All <Ctrl+A> β€” selects the whole glyph bitmap. the whole thing. every pixel. periodt.
  • Next Glyph <Ctrl+N> β€” moves the Glyph Editor to the next glyph position in the Font Grid. If the current glyph has been modified, a save prompt pops up before it moves on. (also, to the right of the Glyph Name field there's a button that does the same thing 🫢)
  • Previous Glyph <Ctrl+P> β€” moves the Glyph Editor to the previous glyph position in the Font Grid. If the current glyph has been modified, a save prompt appears before it moves. and yes, there's a button to the right of the Glyph Name field that does the same thing πŸ’–

the Operation menu, where the glow-ups happen:

  • Draw <Ctrl+D> β€” flips the Glyph Editor into Draw mode.
  • Move <Ctrl+M> β€” flips the Glyph Editor into Move mode. Move mode lets you select a portion of the glyph bitmap and move it somewhere else. relocate, reinvent, slay ✨
  • Copy <Ctrl+Y> β€” flips the Glyph Editor into Copy mode. Copy mode lets you copy a portion of the glyph bitmap and move it to another location.
  • Rotate <Ctrl+T> β€” brings up the rotation dialog so you can specify the degrees of rotation. Rotation can be between 1 and 359 degrees. spin it, bestie 🌈
  • Shear <Ctrl+E> β€” brings up the shear dialog so you can specify the degrees of horizontal shear. Other names for shearing are obliquing or slanting. Shearing is allowed between 1 and 45 degrees.
  • Embolden <Ctrl+H> β€” emboldens the glyph in a simple manner. thick. iconic.
  • Resize BBX <Ctrl+R> β€” lets you change the sizes of the glyph bounding box, including the left/right bearings and the glyph ascent/descent. If this change makes the glyph bounding box larger than the font bounding box, the font bounding box gets resized when the glyph is saved next. heads up, it's a chain reaction πŸ“
  • Edit PSF Unicode Mappings <Ctrl+F> β€” lets you add, delete and edit Unicode mappings for fonts that will be exported as PSF fonts. The code values you enter are expected to be in hexadecimal.

🌸 Glyph Editor Other Features 🌸

When the mouse is used to shift the bitmap using one of the buttons, holding the mouse down will cause the activity to repeat. yes, just hold it β€” it keeps going πŸ”₯


πŸŽ€ PROPERTIES πŸŽ€

okay so. this section exists. it has nothing in it. that's the whole tea. moving on πŸ’…


πŸ‘‘ SEE ALSO πŸ‘‘


πŸ’– ACKNOWLEDGMENTS πŸ’–

these people ate and left no crumbs, fr fr:

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

then, the whole squad:

  • Mike Stroyan <mike_stroyan@fc.hp.com> for patches.
  • Primoz Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si> for this manual page.
  • Danny Backx <u27113@kb.be> for the LessTif Imakefile.
  • Donald Page <donaldp@sco.com> for patches.
  • Michal Szymanski <msz@sirius.astrouw.edu.pl> for problem reports.
  • Werner Lemberg <a7971428@unet.univie.ac.at> for problem reports.
  • William F. Maton <wmaton@enterprise.ic.gc.ca> for problem reports.
  • Ivan Nejgebauer <ian@uns.ns.ac.yu> for problem reports.
  • Solofo <solofo@mpi-sb.mpg.de> for problem reports.
  • Dave Bodenstab <imdave@mcs.net> for patches.
  • W. Chao <wchao@HRZ.Uni-Bielefeld.DE> for Makefile changes and problem report.
  • Andreas Reuter <ar205@bonzo.geowiss.nat.tu-bs.de> for problem reports.
  • Leonard Dickens <leonard@saul.hipgraphics.com> for IRIX 6.3 Makefile changes.
  • Markus Kuhn <Markus.Kuhn@cl.cam.ac.uk> for suggestions.
  • Jim Knoble <jmknoble@pobox.com> for dialog geometry fixes.
  • Darren Stuart Embry <dsembr01@ox.slug.louisville.edu> for HP/UX 10.20 X11R6 Makefile additions.
  • Vladimir Volovich <vvv@vvv.vsu.ru> for pointing out something I forgot to test.
  • Ben Fry <fry@media.mit.edu> for IRIX 6.5.2 variables for the Makefile.
  • J.H.M. Dassen (Ray) <jdassen@debian.org> for bug fixes.
  • Robert Brady <rwb197@ecs.soton.ac.uk> for pointing out a problem.
  • Stefan Monnier <monnier@cs.yale.edu> for a bug report.
  • Humphrey Clerx <humphrey.clerx@eurocontrol.be> for a bug report.
  • Rudolf Cejka <cejkar@dcse.fee.vutbr.cz> for bug fixes and a suggestion.
  • Baruch Even <baruch@ev-en.org> for a bug fix.
  • Sergey Vlasov <vsu@mivlgu.murom.ru> for bug fixes.
  • Daniel Neuburger <daniel.neuburger@lmco.com> for bug fixes.
  • Pierre HANSER <Pierre.Hanser@sxb.bsf.alcatel.fr> for a bug fix.
  • Patrick Hagglund <patrik.hagglund@bredband.net> for FreeType 2 support.
  • James Cloos <cloos@jhcloos.com> for pointing out problems.
  • Ming Hua <minghua@rice.edu> for pointing out problems.
  • Viktor Urban <viktor@icc-atcsolutions.com> for pointing out problems.
  • Jiri "BlueBear" Dluhos <modry.medved@seznam.cz> for providing 64-bit fixes.
  • Jan Engelhardt <jengelh@linux01.gwdg.de> help text improvements and missing prototype.
  • Daniel Richard G. <skunk@iSKUNK.ORG> for help on 64-bit architectures.
  • Baruch Even <baruch@ev-en.org> for help on 64-bit architectures.
  • Ming Hua <minghua.debian@gmail.com> for an unsuspected warning.
  • Ryan Hill <dirtyepic@gentoo.org> for import dialog crash report.
  • Don Knuth (https://bugs.launchpad.net/ubuntu/+source/gbdfed/+bug/172836) for reporting spelling, gramatical and behavior problems.
  • Tim Allen <screwtape@froup.com> for discovering glyph and font spacing bugs.
  • Daniel Quarras <dqarras@yahoo.com> for discovering a PSF unicode map editing problem.
  • Bertrand Janin <tamentis@neopulsar.org> for improving the GlyphEditor user interface.
  • Peter Volkov <pva@gentoo.org> for fixing a name collision.
  • Tom "spot" Callaway <tcallawa@redhat.com> for fixing a linking problem.

🌟 AUTHOR 🌟

Mark Leisher <mleisher@gmail.com>


and that's the whole page, bestie 🫢 this one's a GTK2 build from 23 February 2010, filed under GBDFED(1). go forth and make some gorgeous glyphs πŸ’…βœ¨