[comp.windows.x] Difference in X11/DECwindows .snf format?

jmerrill@jarthur.claremont.edu (Generic User) (02/07/91)

Is there a difference between the two?  I copied some fonts from a local
DECstation onto the X machine I'm on, but mkfontdir doesn't like them.  How
are they different, and what's the easiest way to convert between them?

--
Jason Merrill					jmerrill@jarthur.claremont.edu

jeffery@venice.SEDD.TRW.COM (Jeffery Cavallaro) (02/08/91)

In article <JMERRILL.91Feb6160040@fenris.claremont.edu> jmerrill@jarthur.claremont.edu (Generic User) writes:
>Is there a difference between the two?  I copied some fonts from a local
>DECstation onto the X machine I'm on, but mkfontdir doesn't like them.  How
>are they different, and what's the easiest way to convert between them?

Not an answer, just a side note.  Same problem with HP .scf fonts.  Was not
able to use them under MIT X11R4.  But, HP and DEC wouldn't do anything
proprietary, would they?  Their entire corporate history has been one of
complete openess (is that a word?) (smile).

Jeff

erik@westworld.esd.sgi.com (Erik Fortune) (02/08/91)

In article <990@venice.SEDD.TRW.COM>, jeffery@venice.SEDD.TRW.COM (Jeffery Cavallaro) writes:
>>In article <JMERRILL.91Feb6160040@fenris.claremont.edu> jmerrill@jarthur.claremont.edu (Generic User) writes:
>>Is there a difference between the two?  I copied some fonts from a local
>>DECstation onto the X machine I'm on, but mkfontdir doesn't like them.  How
>>are they different, and what's the easiest way to convert between them?
>
>Not an answer, just a side note.  Same problem with HP .scf fonts.  Was not
>able to use them under MIT X11R4.  But, HP and DEC wouldn't do anything
>proprietary, would they?  Their entire corporate history has been one of
>complete openess (is that a word?) (smile).

<mini flame on>
When you consider the fact that the sample server and xlib implementations
were originally written by DEC and *donated* to MIT, the "openess" crack
seems a little uncalled for.
<mini flame off>

Now, some info (from the STANDARDS file in the X distribution):
>Bitmap Distribution Format (BDF), defined in doc/bdf/, is a standard font
>source interchange format.  BDF is a non-exclusive standard; the Consortium
>does not preclude adopting other formats in the future.  Vendors providing
>servers are expected to provide a compiler to convert BDF format to whatever
>formats are usable by those servers.  The sample compiler provided in
>fonts/bdftosnf/ is not a Consortium standard, and the SNF format used in the
>sample server is not a Consortium standard.
In other words, you shouldn't expect to be able to move compiled fonts from
one system to another (any more than you can expect to move compiled programs
from one architecture to another).

SNF format is highly machine-dependent by its nature.    SNF format has bit
and byte order dependencies that are not specified anywhere in the file.
Because DEC machines are little-endian while most of the world is big-endian,
it is unlikely that you could simply copy compiled fonts from a DECstation
to some other machine.

There is a program somewhere (called getbdf, I think) that can turn create a
bdf file for any font.  Look on expo.   Some information from the BDF file
is lost in the conversion to SNF, so getbdf will have to fake values for some
fields.    If you can find BDFs, you'll be better off.

DECs font format is called PCF, which stands for "Portable Compiled Format."
PCF fonts specify the bit and byte ordering of the information in the file,
and can read font files with a different order (at a substantial cost to
performance).   PCF fonts include all of the information from the BDF file,
which makes Display Postscript happy (DPS needs glyph names and scalable widths
of characters) -- this is the reason DEC went with PCF in the first place.

Unless plans have changed recently, the R5 X server and sample font server will
both accept PCF format fonts.   There is some code for dealing with PCF fonts in 
contrib/server/<I forget a few directories in here>/pcf (or PCF) on expo.

Hope this helps,
    Erik