Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!decwrl!decvax!ima!bbn!rochester!ken From: ken@cs.rochester.edu (Ken Yap) Newsgroups: comp.windows.x Subject: Re: creating new font files in X11 Message-ID: <7188@sol.ARPA> Date: 27 Feb 88 08:18:11 GMT References: <443@hub.ucsb.edu> Reply-To: ken@cs.rochester.edu (Ken Yap) Organization: U of Rochester, CS Dept, Rochester, NY Lines: 62 In article <443@hub.ucsb.edu> grmp@papaya.ucsb.edu (xperts@cornu.ucsb.edu) writes: |Questions about Font files: | |I read the documentation about the fonts in X11/doc/bdf.ps. |Are there any more documentations explaining bdf in detail? |I need information about the different 'properties' of fonts |('MinSpace' was used in the doc. but was not explained), |the reason behind calculating 'SWIDTH' & 'DWIDTH', ... etc. The document actually tells you all you need to know. Well, no, not quite, you need to understand something about font metrics. SWIDTHs are the ratios of the width and height of a character to design size (point size). Ideally, the 'x' in 10 point and the 'x' in 12 point of the same font should have the same SWIDTHs although their DWIDTHs will differ. The numbers following SWIDTH are intended to be reals. They will typically range in the high hundreds. DWIDTHs are in units of pixels and obviously whole numbers. `fc' ignores SWIDTH. It appears BDF is an Adobe standard for distributing hi-res fonts, adapted for X11 use. What gets put in the PROPERTIES fields depends on the compiler. MinSpace is obviously some property the Adobe compiler is interested in. |If I am interested in creating a 16 bit font, how should I |set up the 'STARTCHAR' and the 'ENCODING'? |(ENCODING is restricted to 0 to 255 ?) What comes after STARTCHAR is just a label. It is meant to be a phrase for human consumption like "grave accent". What comes after ENCODING is a decimal number. You could put a 16 bit number here if your compiler groks it. I don't think `fc' generates 16 bit fonts. (Haven't checked.) |After creating a 'snf' font file using the 'fc'. |How can I print a text file using this new font ? |How does X handles output using a font file with a poscript |printer? It doesn't. Snf is just for screen fonts at the moment, as far as I can tell. You could translate BDF into something that can be downloaded into a printer. But remember the fonts supplied are for ~80 dpi and your printer is probably 300 dpi. So the characters you get with the supplied fonts will be too small to read on your printer. |One method I am exploring is using 'enscript'. |But, the '*.afm' (font metrics files) |format is different then the '*.bdf' format. |How can I add my 'snf' font file into the library, |so that I can do something similar to enscript? Well, bdf files contain both metrics and bitmaps. afm files contain only metrics, the bitmaps are inside the printer ROMS. If you have some downloadable font, you should also send along width specs with the bitmaps. Or explicitly put spacing commands in the PostScript code, like some dvi to ps filters do. Bottom line: forget about using the supplied bdf fonts for printing - they are screen fonts. BDF can be used as a font description language though. Ken