HPLX-L Archive for August 1997    The HP Palmtop Paper, Online
[Date Index] [Thread Index] [Date Prev][Date Next][Thread Prev][Thread Next]

Re: Changing font (I Have the Answer!)



It just so happens that I have a several thousand page PC sourcebook
which contains a page on Windows 2.0 font file info.  I will reproduce it
here as it is of interest to all in this newsgroup who are interested in cool
fonts.

6.014.  FONT FILE FORMAT
field           size    description             allowable values
dfVersion               word    Version of the file             Currently must 
be 100 (256)
dfSize          d word  Total file size in bytes        Unsigned 32-bit int
dfCopyright     60 bytes        Copyright information   ASCIIZ string
dfType          word    Font file type          LObit0=0 (raster-type file)
                                                LObit0=1 (vector-type file)
                                                LObit3=1 (bitmap in ram)
                                                HO=0 (GDI realized std font)
dfPoints                word    nominal pt size for best look
dfVertRes               word    nominal vert resolution dpi     Size at which 
font was digitized
dfHorizRes      word    nominal horiz resultion dpi     Size at which font was 
digitized
dfAscent                word    dist from top of char to baseline
dfInternalLeading       word    area inside dfPixHeight for accent marks
dfExternalLeading       Word    extra leading requested between rows
dfItalic                byte    Italic?                 0-no, 1-yes
dfUnderline     byte    Underlined?             0-no, 1-yes
dfStrikeout     byte    Overstruck?             0-no, 1-yes
dfWeight                word    character weight                Range 1-1000 
(200=normal)
dfCharSet               byte    character set used              FF (255)=IBM PC 
char set
dfPixWidth      word    grid width for vector fonts     Size at which font was 
digitized
                        width of all chars for raster   0=variable width
dfPixHeight     word    grid height for vector fonts    size at which font was 
digitized
                        height of bitmap for raster
dfPitch&Family  byte    pitch and family of font        LObit=1 (variable 
pitch)
                                                LObit=0 (fixed pitch)
                                                HO4bits=0000 (FF_DONTCARE)
                                                HO4bits=0001 (FF_ROMAN)
                                                HO4bits=0010 (FF_SWISS)
                                                HO4bits=0011 (FF_MODERN)
                                                HO4bits=0100 (FF_SCRIPT)
                                                HO4bits=0101 (FF_DECORATIVE)
dfAvgWidth      word    average width of chars in font  usually "X"
dfMaxWidth      word    max pixel width of any char in font
dfFirstChar     byte    character code of first char defined
dfLastChar      byte    character code of last char defined
dfDefaultChar   byte    character to substitute for missing chars
dfBreakChar     byte    character used to define word breaks
dfWidthBytes    word    # of bytes in each row of bitmap (raster fonts only)
dfDevice                d word  offset in file to device name str        -- 
0=raster device
dfFace          d word  offset in file to face name string
dfBitsPointer   d word  absolute address of bitmap      (set by GDI at load 
time)
dfBitsOffset    d word  offset in file to beginning of bitmap
dfCharOffset    word ea.        offset in bmp rows to each char in set 
(var-spaced raster fonts)
                0 bytes not used                        fixed-spaced raster
                word ea.        offset in bmp to str for each char in set 
(fix-spaced vector)
                word    offset in bmp to char strokes for each char (var-spaced 
vector)
                word    pixel width of character
(filename)              string  Name of typeface                ASCIIZ string
(devicename)    string  device designed for             ASCIIZ string
(bitmap)                bytes   bitmap containing font data     Each row must 
start on word boundary

Version:        Applies to all versions of Windows beginning with 2.0.

Source: Microsoft Windows 2.0 SDK Programmer's Refrence, pages 639 through 645
        Microsoft Windows Device Driver Kit, Device Driver Adaptaion Guide 
pages 13-1-13-15

This is quoted directly from "The PC Programmer's Sourcebook, 2nd Edition", by
Thom Hogan, pages 6-18 through 6-19.  You need this book.  ISBN 1-55615-321-X.

Have a ball with this one....

Ian Butler
Advanced Software Systems, Inc.
Check the dull homepage at <http://www.caspers.net/ianrb/>
200LX Programmers Group page coming soon! <~/200lx.html>

P.S.  People like you ought to be shot.

----------
>         Well, the good news is that you can make your own .fon file, and make
> your Hp200 use it. So you can redefine all the character set. That is what I
> want. But, I must know the format of a Windows 2.0 font file. I have looked
> inside the .fon file the Hp has built in, and discovered how the
> character data is stored ( thanks hp48, you've been very helpful ), but I
> don't know what are several hundred bytes around the data. Can anyone help 
>me?
> I've tried to find info about that 'Windows 2.0 font file' but with no luck.

-------------------------------------------------------------------------
***DO NOT POST BINARY FILES TO THIS LIST***
List Archives & FAQ links can be found at:
www.sp.uconn.edu/~mchem1/HPLX.shtml

Archive Home