T.R | Title | User | Personal Name | Date | Lines |
---|
1082.1 | A working example of a BDF file | SDSVAX::SWEENEY | Honey, I iconified the kids | Mon Jul 10 1989 12:23 | 84 |
| Here's a file that can be compiled with the command
$ FONT MYFONT.DECW$BDF
--cut here--
STARTFONT 2.1
FONT -Sweeney-Myfont-Medium-R-Normal--12-120-75-75-P-74-Sweeney-FONTSPECIFIC
SIZE 12 75 75
FONTBOUNDINGBOX 14 16 -1 -4
STARTPROPERTIES 23
COMMENT Begin LogicalFontDescription
FONTNAME_REGISTRY ""
FAMILY_NAME "Myfont"
FOUNDRY "Sweeney"
WEIGHT_NAME "Medium"
SETWIDTH_NAME "Normal"
SLANT "R"
ADD_STYLE_NAME ""
PIXEL_SIZE 12
POINT_SIZE 120
RESOLUTION_X 75
RESOLUTION_Y 75
SPACING "P"
AVERAGE_WIDTH 74
CHARSET_REGISTRY "Sweeney"
CHARSET_ENCODING "FONTSPECIFIC"
COMMENT END LogicalFontDescription
CHARSET_COLLECTIONS "FONTSPECIFIC"
FONT_DESCENT 3
FONT_ASCENT 9
CAP_HEIGHT 9
X_HEIGHT 6
FULL_NAME "Myfont"
DEVICE_FONT_NAME "Myfont"
COPYRIGHT "Copyright (c) 1984 Adobe Systems, Inc., Portions Copyright 1988 Digital Equipment Corp."
COMMENT Not sure about the copyright, but just to be safe and not sorry
COMMENT ***** end of inserted font properties
ENDPROPERTIES
CHARS 2
STARTCHAR space
ENCODING 32
SWIDTH 250 0
DWIDTH 3 0
BBX 1 1 0 0
BITMAP
00
ENDCHAR
STARTCHAR bar
ENCODING 33
SWIDTH 333 0
DWIDTH 4 0
BBX 1 9 1 0
BITMAP
80
80
80
80
80
80
80
80
80
ENDCHAR
ENDFONT
---cut here--
Copy the resulting MYFONT.DECW$FONT to SYS$COMMON:[SYSFONT.DECW.USER_75DPI]
You must RESTART THE SERVER to recognize _any_ new fonts.
I you don't believe me then try this out as
DECW$USER_DEFAULTS:DECW$NOTEPAD.DAT (line > 80 chars follows)
---cut here---
*DwtText.font: -Sweeney-Myfont-Medium-R-Normal--12-120-75-75-P-74-Sweeney-FONTSPECIFIC
---cut here---
RESTART THE SERVER!!!
Startup the notepad application and !!! become |||
It's a working example but don't expect it to do much, or expect the
values that I put into the font file to be blessed by anyone.
|
1082.2 | | VWSENG::KLEINSORGE | Toys 'R' Us | Tue Jul 11 1989 20:51 | 90 |
|
Pat's reply looks to be XLFD, a superset of BDF.
The documentation is less than great, you can start by looking in the
notesfile: HANNAH::FONT_ARCHITECTURE there is a reference in note 3
to the BDF description and in one of the other early notes is a XLFD
description. The files that they reference are not on
HUMAN::FONT_ARCH$: they are in HANNAH::FONT$ARCH: (note the change in
the logical name as well as the node).
The MIT documentation makes me want to scream. All I've found so far
is Bitmap Distribution Format 2.1 (from the X Window System, Version 11
Release 3 documentation). This 4 page document is the readers digest
condensed version, there is no expanded, understandable one that I can
locate.
In short it says:
A USASCII encoded, human readable file. Characters 40-176 are
allowed plus CR and LF. Record format is variable length records
with CR/LF or just LF termination.
1) STARTFONT followed by the version number which is 2.1
2) COMMENT these lines are ignored and can happen anywhere
3) FONT followed by the full name of the font, it can contain spaces
4) SIZE folloed by the POINT SIZE followed by the X resolution and
then the Y resolution
5) FONTBOUNDINGBOX followed by the WIDTH IN X, HEIGHT IN X and the
X and Y displacements from the lower corner to the origin of
the characters. These are in device units.
6) STARTPROPERTIES (this is optional) followed by the number of
properties.
7) The properties:
FONT_ASCENT which is the offset from the baseline to the
top of the cell.
FONT_DESCENT which is the offset from the baseline to the
bottom of the cell.
DEFAULT_CHAR the default character
8) If there were properties: ENDPROPERTY
9) CHARS followed by the number of characters in the font
10) a variable number of character definitions:
STARTCHAR followed by the character name
ENCODING followed by some bizzare encoding value that
is usually the character number which actually
says it's part of the standard Adobe encoding.
SWIDTH Scalable width, both X and Y. Another wild value.
Here's the definition:
"Scalable widths are in units of 1/1000th of the
size of the character. If the size of the
character is p points, the width information must
be scaled by p/1000 to get the width in printer's
points. This width information should be
considered as a vector indication the position
of the next character's origin relative to the
origin of this character. To convert the
scalable width to the width in device pixels,
multiply the SWIDTH times p/1000 times r/72 where
r is the device resolution in pixels per inch.
The result is a real number giving the ideal
print width in device pixels. The actual device
width must of course be an integral number of
device pixels and is given in the next entry."
Y is usually zero BTW
DWIDTH Device width for X and Y. Y is always 0.
BBX Bounding Box. 4 values: Width, Height, X
displacement, Y displacement. The displacement
defines the offset from the lower left to the
origin of the character.
ATTRIBUTES - This is explicitly undefined in the document
BITMAP No parameters on this line
Some number of HEX encoded data each line represents
a row in the character definition. The data is BIG ENDIAN
and the RIGHT edge rounded if the width isn't a multiple
of 8 and padded with zero bits.
ENDCHAR
11) ENDFONT
|
1082.3 | You can't live without documnetation | SMURF::HOFFMAN | anywhere in the universe | Wed Jul 12 1989 17:21 | 14 |
| I did everything I could to help make proper documentation
of fonts happen in the ULTRIX DECwindows product, but no one
had the time or resources. So we did a 40 page Release Note,
which was reduced to about 10 pages after a last minute
insertion into the product software of files containing the
font names. Not very good for the customer or the DEC user, right?
So I wrote a High Priority QAR against the (lack of) documentation
and made sure it got stuck pretty high in someone's list of
action items. Bug reports are a last desperate resort, but
I am a fairly desperate person at times.
John
|
1082.4 | | VWSENG::KLEINSORGE | Toys 'R' Us | Wed Jul 12 1989 18:31 | 5 |
|
How about putting the unabridged release note here?
|
1082.5 | 40 pages of release notes? Here? Please no! | LESLIE::LESLIE | andy ��� leslie | Wed Jul 12 1989 18:48 | 4 |
| How about putting in a pointer instead?
- ���
|
1082.6 | No one asked, but... | SDSVAX::SWEENEY | Honey, I iconified the kids | Wed Jul 12 1989 19:09 | 2 |
| XLFD = X Logical Font Description
|
1082.7 | Release Notes are in the product | SMURF::HOFFMAN | anywhere in the universe | Thu Jul 13 1989 13:43 | 17 |
| re .4
Sorry, the only place I know of to get the Release Note is
in the UWS V2.0 product documentation. Generally, it
contained information provided by Jim Flowers (Font Architecture
office) and heavily augmented by Bob Barrie (VMS Servers)
and ULTRIX-ized by me. The information dealt largely with
how to invoke fonts from .Xdefaults or application defaults
files. There wasn't much if any on the BDF format itself.
That lack of comprehensive information and documentation
effort was why I wrote the high priority QAR in the first place.
Good luck,
John
|