-
Notifications
You must be signed in to change notification settings - Fork 3
/
gbdfed.man
711 lines (690 loc) · 19.5 KB
/
gbdfed.man
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
.TH GBDFED 1 "23 February 2010" "GTK2"
.SH NAME
gbdfed \- GTK-based BDF font editor
.SH SYNOPSIS
.B gbdfed
[\fIoptions\fP] [\fIfonts ...\fP]
.SH DESCRIPTION
.I gbdfed
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.
.I gbdfed
can import Metafont PK/GF fonts, Han Bitmap Font Format (HBF) fonts, Linux
console fonts (PSF, CP, and EGA/VGA) fonts, Sun VF fonts, OpenType/TrueType
(OTF/TTF) fonts, or grab a font from the X server (when running under X11).
.I gbdfed
can export PSF2 Linux console fonts and HEX fonts (see online help).
.I 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 hasn't been tested yet.
.SH OPTIONS
.I gbdfed
accepts the following command line arguments:
.PP
.TP 8
.I -nc
do not preserve comments (by default,
.I gbdfed
automatically collects comments that are saved with the font).
.PP
.TP 8
.I -nu
do not preserve unencoded glyphs (by default,
.I gbdfed
preserves the unencoded glyphs).
.PP
.TP 8
.I -nm
do not make metrics corrections (by default,
.I gbdfed
attempts to make metrics corrections automatically).
.PP
.TP 8
.I -np
do not pad character-cell bitmaps (by default,
.I gbdfed
pads character-cell bitmaps with 0's to the cell dimensions when the font is
saved).
.PP
.TP 8
.I -bp
allow blank pages (by default,
.I gbdfed
skips blank pages).
.PP
.TP 8
.I -ed
do not present the "Really Exit?" dialog (by default, this dialog always
presented).
.PP
.TP 8
.I -ps n
set default point size (if unspecified,
.I gbdfed
sets it to 12).
.PP
.TP 8
.I -hres n
set default horizontal resolution.
.PP
.TP 8
.I -vres n
set default vertical resolution.
.PP
.TP 8
.I -res n
set both default resolutions (if unspecified,
.I gbdfed
sets both horizontal and vertical resolution to that of display,
(e.g. 90x90 dpi for Sun workstations).
.PP
.TP 8
.I -sp s
set the default font spacing ("p" for Proportional, "m" for Monowidth, or "c"
for Character Cell).
.PP
.TP 8
.I -eol e
set the default end-of-line type ("u" for Unix LF, "d" for DOS/Windows CRLF,
or "m" for Macintosh CR).
CR)
.PP
.TP 8
.I -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: \fI0x, 0X, U+, U-, \\u\fP.
.PP
.TP 8
.I -cb code-base
specify the code base used to display the glyphs encodings (can be "octal",
"decimal", or "hexadecimal").
.SH FONT GRID
At the top of each editor window there are some
fields and buttons. These are:
.IP
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.
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.
.PP
The main window of each font editor is called the
.I Font Grid.
Each Font Grid has a clipboard used for passing glyphs around.
This clipboard is called
.I FONTGRID_CLIPBOARD.
The format of the data stored to this clipboard is not documented yet.
.sp
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.
.SH Font Grid Menus
The
.I File
menu has the following entries:
.PP
.TP 4
.I New <Ctrl+N>
This creates a new font using the current defaults for point size, horizontal
and vertical resolution, and font spacing.
.PP
.TP 4
.I 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.
.PP
.TP 4
.I 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.
.br
When the font is saved, it will automatically generate a list of
_XFREE86_GLYPH_RANGE properties containing a list of glyph codes available in
the font.
.PP
.TP 4
.I Save As <Ctrl+W>
Save the current font with some other name.
.br
When the font is saved, it will automatically generate a list of
_XFREE86_GLYPH_RANGE properties containing a list of glyph codes available in
the font.
.PP
The
.I Import
submenu of the
.I File
menu has the following entries:
.PP
.TP 8
.in 4
.I PK/GF Font <Ctrl+K>
Import a Metafont PK or GF font.
.PP
.TP 8
.in 4
.I Console Font <Ctrl+L>
Import a binary console font used by Linux and Sun (PSF1, PSF2, CP, vfont, and
other font formats).
.PP
.TP 8
.in 4
.I HBF Font <Ctrl+H>
Import an HBF font. Only available if HBF support is compiled into gbdfed.
.PP
.TP 8
.in 4
.I Windows Font <Ctrl+B>
Import a Windows FON/FNT font. This will also import fonts from .EXE
and .DLL files as well.
.PP
.TP 8
.in 4
.I OpenType/TrueType Font <Ctrl+Y>
Import an OpenType/TrueType font (.otf or .ttf extension) or a TrueType
collection (.ttc extension).
.PP
.TP 8
.in 4
.I Server Font <Ctrl+G>
Import a font from the X server if running under the X Windowing System.
.PP
The \fIExport\fR submenu of the \fIFile\fR menu has the following entries:
.PP
.TP 8
.in 4
.I PSF <Ctrl+F>
This will export the current BDF font or the currently selected glyphs to a
PSF2 font. Glyphs in PSF fonts are usually arranged in a specific way to make
them work properly with the basic display driver. Many of these fonts come
with mapping tables attached that indicate which Unicode characters a glyph
can be used for. The mapping table allows the console to attempt to display
Unicode text.
.sp
During the export, an option menu will let you select whether to:
.TP 10
.in 10
Export Font with Mapping Table
.br
Export Font Only
.br
Export Mapping Table Only
.TP 8
.in 8
Only the first 512 glyphs will be exported to the font.
.PP
.TP 8
.in 4
.I HEX
.br
This will export the current BDF font into the HEX format (see
http://czyborra.com/unifont/).
.PP
.TP 4
.I Exit/Close <Ctrl+F4>
Exit the program if this is the primary Font Grid or simply hide (unmap) the
current Font Grid window.
.PP
The
.I Edit
menu has the following entries:
.PP
.TP 4
.I Copy <Ctrl+C> or <Button3Down>
This copies the current selection to the Font Grid clipboard.
.PP
.TP 4
.I Cut <Ctrl+X> or <Key>Delete or <Key>BackSpace
This copies the current selection to the Font Grid clipboard and
then deletes the selection.
.PP
.TP 4
.I Paste <Ctrl+V> or <Button2Down>
This replaces the glyphs starting at the currently selected position with the
Font Grid clipboard.
.PP
.TP 4
.I Overlay <Ctrl+Shift+V> or Ctrl<Button2Down>
This merges the glyphs on the Font Grid cliboard with the glyphs starting at
the currently selected position. This means that the bitmaps are actually
combined together. The names of the modified glyphs are not
changed.
.PP
.TP 4
.I Insert <Ctrl+Meta+V> or Shift<Button2Down>
This inserts the glyphs on the Font Grid clipboard in front of the currently
selected position.
.PP
.TP 4
.I Properties <Ctrl+P>
This invokes the font property editor.
.PP
.TP 4
.I Comments <Ctrl+M>
This invokes the font comments editor.
.PP
.TP 4
.I 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.
.PP
The
.I Font Name
submenu of the
.I Edit
menu has the following four entries:
.PP
.TP 8
.in 4
.I Make XLFD Name
If the font does not have an XLFD name, this
will save the current font name in the
.I _ORIGINAL_FONT_NAME
font property and then generate an XLFD name
for the font.
.PP
.TP 8
.in 4
.I Update Name From Properties
This will update the XLFD font name fields from
the font property list.
.PP
.TP 8
.in 4
.I Update Properties From Name
This will update the font properties from the
XLFD font name.
.PP
.TP 8
.in 4
.I Update Average Width
This will update the average width field of the
XLFD font name and will update the
.I AVERAGE_WIDTH
font property as a side effect.
.PP
.TP 8
.I Name Glyphs
.PP
.TP 8
.in 4
.I Unicode Names
This will rename all the glyphs using names taken from a file in the Unicode
Character Database format. This file can be set in the configuration file
or set using the \fISetup\fR dialog.
.PP
.TP 8
.in 4
.I Unicode Values
This will rename all the glyphs with a hexadecimal value prefixed by \fC0x\fR,
\fCU+\fR, or \fC\\u\fR (example: 0x010D, U+010D, \\u010D).
.PP
.TP 8
.I 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.
.sp
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.
.PP
.TP 8
.I 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.
.PP
The
.I View
menu has the following entries:
.PP
.TP 4
.I Unencoded <Ctrl+E>
This will toggle between displaying the unencoded (glyphs with an
.I ENCODING
field of -1) and encoded glyphs.
.PP
.TP 4
.I Code Base
Selects displaying of glyph encoding. Options are Octal
(base 8), Decimal (base 10) or Hexadecimal (base 16).
.PP
.TP 4
.I Other Page <Ctrl+Shift+S>
This will toggle between the current page and the last page
that was viewed.
.PP
.TP 4
.I Vertical View <Ctrl+Q>
This will toggle the FontGrid between showing the glyphs
horizontally (default) and vertically.
.PP
.TP 4
.I Messages <Ctrl+A>
This will show messages generated when corrections to the font metrics are
done or errors are encountered.
.PP
The
.I Operations
menu has the following entries:
.PP
.TP 4
.I 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.
.sp
The option of translating the selected glyphs or all of the glyphs is
provided.
.PP
.TP 4
.I 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.
.sp
The option of rotating the selected glyphs or all of the glyphs is provided.
.PP
.TP 4
.I 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.
.sp
The option of rotating the selected glyphs or all of the glyphs is provided.
.PP
.TP 4
.I Embolden <Ctrl+Shift+B>
This will bring up the dialog for emboldening either the selected or all
glyphs.
.sp
To \fIembolden\fP means to make bold.
.PP
The
.I Editors
menu has the following entries:
.PP
.TP 4
.I New <Ctrl+N>
This will cause a new editor to be created using the point size, resolution,
and bits per pixel set in the config file, from the command line or from the
Setup dialog.
.PP
.TP 4
.I [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.
.SH Font Grid Other Features
Double clicking the mouse on one of the glyphs will start a Glyph Editor for
that glyph.
.sp
The font name can be edited in the Font Grid and page switching can be done
with the buttons on the Font Grid.
.SH GLYPH EDITOR
The
.I 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
.I GLYPHEDIT_CLIPBOARD.
.sp
The only limit on the number of Glyph Editors that
can be open at one time is the amount of memory.
.SH Glyph Editor Menus
The
.I File
menu has the following entries:
.PP
.TP 4
.I Update <Ctrl+S>
This will update the Font Grid with the modified glyph.
.br
To the right of the Glyph Name field is a button that performs the same
function.
.PP
.TP 4
.I Update and Next <Ctrl+U>
This will update the FontGrid with the modified glyph and move to the next
glyph.
.PP
.TP 4
.I Update and Previous <Ctrl+B>
This will update the FontGrid with the modified glyph and move to the previous
glyph.
.PP
.TP 4
.I Close <Ctrl+F4>
This will close the Glyph Editor.
.PP
The
.I Edit
menu has the following entries:
.PP
.TP 4
.I Reload <Ctrl+L>
This will reload the glyph and discard any changes made in the GlyphEditor.
.PP
.TP 4
.I Copy <Ctrl+C>
This will copy the currently selected portion of the bitmap to the Glyph
Editor clipboard.
.PP
.TP 4
.I Cut <Ctrl+X>
This will copy the currently selected portion of the bitmap to the Glyph
Editor clipboard and then delete the selection.
.PP
.TP 4
.I 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.
.PP
.TP 4
.I Select All <Ctrl+A>
This will select the whole glyph bitmap.
.PP
.TP 4
.I 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.
.br
To the right of the Glyph Name field is a button that performs the same
function.
.PP
.TP 4
.I 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.
.br
To the right of the Glyph Name field is a button that performs the same
function.
.PP
The
.I Operation
menu has the following entries:
.PP
.TP 4
.I Draw <Ctrl+D>
Change the Glyph Editor into Draw mode.
.PP
.TP 4
.I 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.
.PP
.TP 4
.I 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.
.PP
.TP 4
.I 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.
.PP
.TP 4
.I 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.
.PP
.TP 4
.I Embolden <Ctrl+H>
This will embolden the glyph in a simple manner.
.PP
.TP 4
.I Resize BBX <Ctrl+R>
This will allow changing the sizes of the glyph bounding box including the
left/right bearings and the glyph ascent/descent. If this change causes the
glyph bounding box to be larger than the font bounding box, the font bounding
box will be resized when the glyph is saved next.
.PP
.TP 4
.I Edit PSF Unicode Mappings <Ctrl+F>
This allows adding, deleting and editing of Unicode mappings for fonts that
will be exported as PSF fonts. The code valued entered are expected to be
in hexadecimal.
.SH 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.
.SH PROPERTIES
.SH "SEE ALSO"
xmbdfed(1), xfed(1), bdftopcf(1), bdftosnf(1), psfaddtable(1), psfgettable(1), fontforge(1)
.br
\fIGlyph Bitmap Distribution Format (BDF) Specification\fP, Application
Note 5005, Adobe System Inc, 1993
.br
\fIX Logical Font Description\fP, X Consortium
.SH ACKNOWLEDGMENTS
Ross Patterson for his HBF code.
.br
der Mouse for his "getbdf" code.
.br
K. Carothers and A. Korobka for their "fnt2bdf" code in Wine.
.sp
Mike Stroyan <[email protected]> for patches.
.br
Primoz Peterlin <[email protected]> for this manual page.
.br
Danny Backx <[email protected]> for the LessTif Imakefile.
.br
Donald Page <[email protected]> for patches.
.br
Michal Szymanski <[email protected]> for problem reports.
.br
Werner Lemberg <[email protected]> for problem reports.
.br
William F. Maton <[email protected]> for problem reports.
.br
Ivan Nejgebauer <[email protected]> for problem reports.
.br
Solofo <[email protected]> for problem reports.
.br
Dave Bodenstab <[email protected]> for patches.
.br
W. Chao <[email protected]> for Makefile changes and problem report.
.br
Andreas Reuter <[email protected]> for problem reports.
.br
Leonard Dickens <[email protected]> for IRIX 6.3 Makefile changes.
.br
Markus Kuhn <[email protected]> for suggestions.
.br
Jim Knoble <[email protected]> for dialog geometry fixes.
.br
Darren Stuart Embry <[email protected]> for HP/UX 10.20 X11R6
Makefile additions.
.br
Vladimir Volovich <[email protected]> for pointing out something I forgot to
test.
.br
Ben Fry <[email protected]> for IRIX 6.5.2 variables for the Makefile.
.br
J.H.M. Dassen (Ray) <[email protected]> for bug fixes.
.br
Robert Brady <[email protected]> for pointing out a problem.
.br
Stefan Monnier <[email protected]> for a bug report.
.br
Humphrey Clerx <[email protected]> for a bug report.
.br
Rudolf Cejka <[email protected]> for bug fixes and a suggestion.
.br
Baruch Even <[email protected]> for a bug fix.
.br
Sergey Vlasov <[email protected]> for bug fixes.
.br
Daniel Neuburger <[email protected]> for bug fixes.
.br
Pierre HANSER <[email protected]> for a bug fix.
.br
Patrick Hagglund <[email protected]> for FreeType 2 support.
.br
James Cloos <[email protected]> for pointing out problems.
.br
Ming Hua <[email protected]> for pointing out problems.
.br
Viktor Urban <[email protected]> for pointing out problems.
.br
Jiri "BlueBear" Dluhos <[email protected]> for providing 64-bit fixes.
.br
Jan Engelhardt <[email protected]> help text improvements and missing
prototype.
.br
Daniel Richard G. <[email protected]> for help on 64-bit architectures.
.br
Baruch Even <[email protected]> for help on 64-bit architectures.
.br
Ming Hua <[email protected]> for an unsuspected warning.
.br
Ryan Hill <[email protected]> for import dialog crash report.
.br
Don Knuth (https://bugs.launchpad.net/ubuntu/+source/gbdfed/+bug/172836) for
reporting spelling, gramatical and behavior problems.
.br
Tim Allen <[email protected]> for discovering glyph and font spacing bugs.
.br
Daniel Quarras <[email protected]> for discovering a PSF unicode map editing
problem.
.br
Bertrand Janin <[email protected]> for improving the GlyphEditor user
interface.
.br
Peter Volkov <[email protected]> for fixing a name collision.
.br
Tom "spot" Callaway <[email protected]> for fixing a linking problem.
.SH AUTHOR
Mark Leisher <[email protected]>