<s>
The	O
Glyph	B-Device
Bitmap	I-Device
Distribution	I-Device
Format	I-Device
(	O
BDF	B-Device
)	O
by	O
Adobe	O
is	O
a	O
file	O
format	O
for	O
storing	O
bitmap	O
fonts	O
.	O
</s>
<s>
BDF	B-Device
is	O
typically	O
used	O
in	O
Unix	B-Application
X	B-Operating_System
Window	I-Operating_System
environments	O
.	O
</s>
<s>
It	O
has	O
largely	O
been	O
replaced	O
by	O
the	O
PCF	B-General_Concept
font	O
format	O
which	O
is	O
somewhat	O
more	O
efficient	O
,	O
and	O
by	O
scalable	O
fonts	O
such	O
as	O
OpenType	O
and	O
TrueType	O
fonts	O
.	O
</s>
<s>
the	O
current	O
version	O
of	O
BDF	B-Device
is	O
2.2	O
.	O
</s>
<s>
Earlier	O
versions	O
were	O
referred	O
to	O
as	O
the	O
Character	B-Device
Bitmap	I-Device
Distribution	I-Device
Format	I-Device
.	O
</s>
<s>
In	O
1988	O
,	O
the	O
X	B-Operating_System
Consortium	O
adopted	O
BDF	B-Device
2.1	O
as	O
a	O
standard	O
for	O
X	B-Operating_System
Window	I-Operating_System
screen	O
fonts	O
,	O
but	O
X	B-Operating_System
Windows	I-Operating_System
has	O
largely	O
moved	O
to	O
other	O
font	O
standards	O
such	O
as	O
PCF	B-General_Concept
,	O
Opentype	O
,	O
and	O
Truetype	O
.	O
</s>
<s>
For	O
example	O
,	O
glyphs	B-Application
in	O
a	O
BDF	B-Device
2.2	O
font	O
definition	O
can	O
specify	O
rendering	O
from	O
top-to-bottom	O
rather	O
than	O
simply	O
left-to-right	O
.	O
</s>
<s>
A	O
BDF	B-Device
font	O
file	O
contains	O
three	O
sections	O
:	O
</s>
<s>
a	O
global	O
section	O
that	O
applies	O
to	O
all	O
glyphs	B-Application
in	O
a	O
font	O
;	O
</s>
<s>
This	O
is	O
an	O
example	O
font	O
containing	O
one	O
glyph	B-Application
,	O
for	O
ASCII	B-Protocol
capital	O
'	O
A	O
 '	O
.	O
</s>
<s>
This	O
glyph	B-Application
is	O
taken	O
from	O
the	O
GNU	O
Unifont	O
.	O
</s>
<s>
"	O
STARTFONT	O
2.1	O
"	O
defines	O
the	O
version	O
of	O
this	O
BDF	B-Device
file	O
as	O
version	O
2.1	O
.	O
</s>
<s>
"	O
FONT	O
-gnu-unifont-medium-r-normal--16-160-75-75-c-80-iso10646-1	O
"	O
defines	O
the	O
font	O
family	O
and	O
face	O
names	O
as	O
an	O
X	B-Application
logical	I-Application
font	I-Application
description	I-Application
.	O
</s>
<s>
"	O
SIZE	O
16	O
75	O
75	O
"	O
defines	O
this	O
to	O
be	O
a	O
16	O
point	O
font	O
,	O
with	O
an	O
X-axis	O
resolution	O
of	O
75	O
dots	O
per	O
inch	O
(	O
dpi	O
)	O
and	O
a	O
Y-axis	O
resolution	O
of	O
75	O
dpi	O
.	O
</s>
<s>
This	O
is	O
the	O
norm	O
under	O
X	B-Operating_System
Window	I-Operating_System
.	O
</s>
<s>
"	O
FONTBOUNDINGBOX	O
16	O
16	O
0	O
-2	O
"	O
defines	O
a	O
bounding	O
box	O
for	O
the	O
font	O
of	O
16	O
pixels	O
wide	O
by	O
16	O
pixels	O
high	O
,	O
with	O
the	O
lower	O
left-hand	O
corner	O
starting	O
at	O
x	B-Operating_System
=	O
0	O
,	O
y	O
=	O
-2	O
.	O
</s>
<s>
Note	O
that	O
although	O
the	O
bounding	O
box	O
is	O
defined	O
to	O
be	O
a	O
16	O
by	O
16	O
cell	O
,	O
this	O
can	O
be	O
overridden	O
for	O
individual	O
glyphs	B-Application
.	O
</s>
<s>
The	O
"	O
A	O
"	O
glyph	B-Application
,	O
for	O
example	O
,	O
is	O
only	O
8	O
pixels	O
wide	O
.	O
</s>
<s>
"	O
STARTPROPERTIES	O
"	O
is	O
optional	O
in	O
the	O
BDF	B-Device
specification	O
.	O
</s>
<s>
X	B-Operating_System
Window	I-Operating_System
allows	O
the	O
properties	O
FONT_ASCENT	O
and	O
FONT_DESCENT	O
to	O
show	O
the	O
height	O
above	O
and	O
below	O
the	O
baseline	O
,	O
respectively	O
,	O
for	O
all	O
glyphs	B-Application
.	O
</s>
<s>
Although	O
Adobe	O
now	O
refers	O
to	O
this	O
file	O
format	O
as	O
the	O
Glyph	B-Application
BDF	B-Device
,	O
they	O
have	O
retained	O
the	O
keyword	O
"	O
CHARS	O
"	O
in	O
the	O
final	O
version	O
of	O
the	O
specification	O
.	O
</s>
<s>
Lines	O
beginning	O
with	O
the	O
word	O
"	O
COMMENT	O
"	O
can	O
be	O
inserted	O
within	O
a	O
BDF	B-Device
file	O
.	O
</s>
<s>
Following	O
the	O
above	O
global	O
declarations	O
,	O
the	O
following	O
entries	O
may	O
repeat	O
for	O
each	O
glyph	B-Application
.	O
</s>
<s>
"	O
STARTCHAR	O
U+0041	O
"	O
specifies	O
the	O
start	O
of	O
a	O
character	O
in	O
version	O
2.1	O
and	O
earlier	O
,	O
or	O
of	O
a	O
glyph	B-Application
in	O
version	O
2.2	O
.	O
</s>
<s>
The	O
string	O
name	O
of	O
this	O
particular	O
character	O
is	O
"	O
U+0041	O
"	O
,	O
expressing	O
in	O
the	O
Unicode	O
convention	O
the	O
code	O
point	O
hexadecimal	O
41	O
(	O
decimal	O
65	O
,	O
the	O
ASCII	B-Protocol
character	I-Protocol
"	O
A	O
"	O
)	O
.	O
</s>
<s>
In	O
version	O
2.2	O
,	O
the	O
glyph	B-Application
name	O
string	O
can	O
contain	O
up	O
to	O
65,535	O
characters	O
.	O
</s>
<s>
"	O
ENCODING	O
65	O
"	O
declares	O
the	O
decimal	O
code	O
point	O
for	O
this	O
glyph	B-Application
in	O
the	O
font	O
.	O
</s>
<s>
"	O
SWIDTH	O
500	O
0	O
"	O
declares	O
the	O
Scalable	O
Width	O
of	O
500	O
on	O
the	O
X-axis	O
and	O
0	O
(	O
default	O
)	O
on	O
the	O
Y-axis	O
.	O
</s>
<s>
This	O
will	O
result	O
in	O
an	O
X-axis	O
offset	O
to	O
the	O
next	O
glyph	B-Application
,	O
but	O
no	O
Y-axis	O
offset	O
to	O
the	O
next	O
glyph	B-Application
(	O
i.e.	O
,	O
the	O
glyphs	B-Application
appear	O
straight	O
across	O
in	O
a	O
line	O
)	O
.	O
</s>
<s>
Because	O
75	O
is	O
approximately	O
equal	O
to	O
72	O
,	O
the	O
number	O
of	O
pixels	O
is	O
the	O
full	O
width	O
of	O
a	O
glyph	B-Application
(	O
defined	O
globally	O
as	O
16	O
pixels	O
)	O
times	O
500	O
/	O
1000	O
,	O
or	O
in	O
other	O
words	O
the	O
width	O
of	O
this	O
glyph	B-Application
is	O
8	O
pixels	O
.	O
</s>
<s>
"	O
DWIDTH	O
8	O
0	O
"	O
declares	O
the	O
Device	O
Width	O
of	O
a	O
glyph	B-Application
.	O
</s>
<s>
In	O
this	O
case	O
,	O
after	O
the	O
glyph	B-Application
is	O
rendered	O
,	O
the	O
start	O
of	O
the	O
next	O
glyph	B-Application
is	O
offset	O
8	O
pixels	O
on	O
the	O
X-axis	O
and	O
0	O
pixels	O
on	O
the	O
Y-axis	O
from	O
the	O
current	O
glyph	B-Application
origin	O
.	O
</s>
<s>
Note	O
that	O
the	O
Device	O
Width	O
is	O
not	O
necessarily	O
equal	O
to	O
the	O
width	O
of	O
the	O
glyph	B-Application
.	O
</s>
<s>
It	O
is	O
simply	O
the	O
offset	O
on	O
the	O
X-axis	O
to	O
move	O
the	O
current	O
point	O
to	O
the	O
start	O
of	O
the	O
next	O
glyph	B-Application
.	O
</s>
<s>
The	O
Scalable	O
Width	O
is	O
used	O
to	O
calculate	O
the	O
width	O
of	O
a	O
high-resolution	O
glyph	B-Application
on	O
a	O
printer	O
,	O
whereas	O
the	O
Device	O
Width	O
is	O
used	O
to	O
calculate	O
the	O
width	O
of	O
a	O
glyph	B-Application
on	O
a	O
display	O
device	O
.	O
</s>
<s>
The	O
lower	O
left-hand	O
corner	O
of	O
the	O
character	O
is	O
offset	O
by	O
0	O
pixels	O
on	O
the	O
X-axis	O
and	O
-2	O
pixels	O
on	O
the	O
Y-axis	O
.	O
</s>
<s>
"	O
BITMAP	O
"	O
begins	O
the	O
bitmap	O
for	O
the	O
current	O
glyph	B-Application
.	O
</s>
<s>
In	O
this	O
example	O
the	O
glyph	B-Application
is	O
16	O
pixels	O
tall	O
,	O
so	O
16	O
lines	O
follow	O
.	O
</s>
<s>
In	O
this	O
example	O
,	O
the	O
glyph	B-Application
is	O
exactly	O
8	O
pixels	O
wide	O
,	O
and	O
so	O
occupies	O
exactly	O
8	O
bits	O
(	O
one	O
byte	O
)	O
per	O
line	O
so	O
that	O
there	O
is	O
no	O
padding	O
.	O
</s>
<s>
"	O
ENDCHAR	O
"	O
ends	O
the	O
current	O
glyph	B-Application
.	O
</s>
<s>
The	O
declarations	O
"	O
STARTCHAR	O
"	O
through	O
"	O
ENDCHAR	O
"	O
are	O
repeated	O
for	O
each	O
glyph	B-Application
in	O
a	O
font	O
.	O
</s>
<s>
"	O
ENDFONT	O
"	O
appears	O
as	O
the	O
last	O
line	O
in	O
the	O
file	O
,	O
after	O
all	O
glyphs	B-Application
in	O
the	O
font	O
have	O
been	O
enumerated	O
.	O
</s>
<s>
Version	O
2.2	O
of	O
the	O
BDF	B-Device
specification	O
adds	O
support	O
for	O
non-Western	O
fonts	O
.	O
</s>
<s>
These	O
additions	O
allow	O
moving	O
the	O
origin	O
by	O
a	O
positive	O
or	O
negative	O
movement	O
on	O
the	O
X	B-Operating_System
and	O
Y	O
axes	O
.	O
</s>
<s>
DWIDTH1	O
must	O
be	O
present	O
for	O
a	O
METRICSET	O
1	O
glyph	B-Application
.	O
</s>
<s>
VVECTOR	O
defines	O
an	O
X-axis	O
offset	O
and	O
a	O
Y-axis	O
offset	O
to	O
transition	O
from	O
a	O
mode	O
0	O
glyph	B-Application
to	O
a	O
mode	O
1	O
glyph	B-Application
.	O
</s>
<s>
An	O
opposite	O
offset	O
is	O
applied	O
during	O
a	O
mode	O
1	O
to	O
mode	O
0	O
glyph	B-Application
transition	O
.	O
</s>
<s>
Fonts	O
can	O
conceivably	O
contain	O
thousands	O
of	O
glyphs	B-Application
,	O
some	O
of	O
which	O
should	O
be	O
written	O
left-to-right	O
,	O
some	O
right-to-left	O
,	O
and	O
some	O
top-to-bottom	O
.	O
</s>
<s>
Such	O
multi-directional	O
writing	O
requires	O
creative	O
use	O
of	O
DWIDTH1	O
and	O
SWIDTH1	O
for	O
each	O
glyph	B-Application
.	O
</s>
<s>
X	B-Operating_System
Window	I-Operating_System
font	O
utilities	O
support	O
several	O
properties	O
that	O
can	O
be	O
specified	O
in	O
the	O
STARTPROPERTIES	O
section	O
of	O
a	O
BDF	B-Device
file	O
.	O
</s>
<s>
A	O
generic	O
BDF	B-Device
file	O
is	O
in	O
ASCII	B-Protocol
encoding	O
.	O
</s>
<s>
X	B-Operating_System
Window	I-Operating_System
properties	O
are	O
specified	O
using	O
ISO	O
8859-1	O
encoding	O
,	O
which	O
is	O
an	O
extension	O
of	O
ASCII	B-Protocol
.	O
</s>
<s>
DEFAULT_CHAR	O
positive	O
—	O
the	O
default	O
character	O
(	O
glyph	B-Application
)	O
to	O
display	O
for	O
an	O
undefined	O
glyph	B-Application
.	O
</s>
<s>
FONT	O
string	O
—	O
the	O
X	B-Operating_System
Window	I-Operating_System
name	O
of	O
the	O
font	O
.	O
</s>
<s>
X_HEIGHT	O
integer	O
—	O
the	O
height	O
above	O
the	O
baseline	O
of	O
a	O
lower-case	O
'	O
x	B-Operating_System
 '	O
(	O
See	O
x-height	O
)	O
.	O
</s>
