Commit fef71865 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

Make fnt2bdf produce correct fonts.

parent e58bd1ba
...@@ -112,6 +112,7 @@ typedef struct ...@@ -112,6 +112,7 @@ typedef struct
LONG dfBitsPointer; LONG dfBitsPointer;
LONG dfBitsOffset; LONG dfBitsOffset;
CHAR dfReserved; CHAR dfReserved;
/* Fields, introduced for Windows 3.x fonts */
LONG dfFlags; LONG dfFlags;
INT16 dfAspace; INT16 dfAspace;
INT16 dfBspace; INT16 dfBspace;
......
#include <stdio.h> #include "wine/wingdi16.h"
#include "pshpack1.h"
enum data_types {dfChar, dfShort, dfLong, dfString}; enum data_types {dfChar, dfShort, dfLong, dfString};
...@@ -10,48 +12,16 @@ enum data_types {dfChar, dfShort, dfLong, dfString}; ...@@ -10,48 +12,16 @@ enum data_types {dfChar, dfShort, dfLong, dfString};
typedef struct tagFontHeader typedef struct tagFontHeader
{ {
unsigned char dfVersion[2]; /* Version (always 0x3000) */ short dfVersion; /* Version */
unsigned char dfSize[4]; /* Total File Size */ long dfSize; /* Total File Size */
unsigned char dfCopyright[60]; /* Copyright notice */ char dfCopyright[60]; /* Copyright notice */
unsigned char dfType[2]; /* Vector or bitmap font */ FONTINFO16 fi; /* FONTINFO structure */
unsigned char dfPoints[2]; /* Nominal point size */
unsigned char dfVertRes[2]; /* Vertical Resolution */
unsigned char dfHorizRes[2]; /* Horizontal Resolutionchar */
unsigned char dfAscent[2]; /* Character ascent in pixels */
unsigned char dfInternalLeading[2]; /* Leading included in character defn */
unsigned char dfExternalLeading[2]; /* Leading to be added by Windows */
unsigned char dfItalic[1]; /* 1=Italic font */
unsigned char dfUnderline[1]; /* 1=underlined font */
unsigned char dfStrikeOut[1]; /* 1=strike-out font */
unsigned char dfWeight[2]; /* Weight: 400=normal */
unsigned char dfCharSet[1]; /* Character Set for this font */
unsigned char dfPixWidth[2]; /* Character width (0 for proportional) */
unsigned char dfPixHeight[2]; /* Character height */
unsigned char dfPitchAndFamily[1]; /* Font Pitch and family */
unsigned char dfAvgWidth[2]; /* Average character width */
unsigned char dfMaxWidth[2]; /* Maximum character width */
unsigned char dfFirstChar[1]; /* Firwst character of the font */
unsigned char dfLastChar[1]; /* Last character of the font */
unsigned char dfDefaultChar[1]; /* Missing character */
unsigned char dfBreakChar[1]; /* Character to indicate word breaks */
unsigned char dfWidthBytes[2]; /* Number of bytes in each row */
unsigned char dfDevice[4]; /* Offset to device name */
unsigned char dfFace[4]; /* Offset to type face name */
unsigned char dfBitsPointer[4];
unsigned char dfBitsOffset[4]; /* Offset to bitmaps */
unsigned char dfReserved[1];
unsigned char dfFlags[4]; /* Bitmapped flags */
unsigned char dfAspace[2];
unsigned char dfBspace[2];
unsigned char dfCspace[2];
unsigned char dfColorTable[2]; /* Offset to Color table */
unsigned char dfReserved1[4];
} fnt_hdrS; } fnt_hdrS;
typedef struct WinCharStruct typedef struct WinCharStruct
{ {
unsigned int charWidth; unsigned int charWidth;
unsigned int charOffset; long charOffset;
} WinCharS; } WinCharS;
typedef struct fntFontStruct typedef struct fntFontStruct
...@@ -65,10 +35,4 @@ typedef struct fntFontStruct ...@@ -65,10 +35,4 @@ typedef struct fntFontStruct
short *dfColorTableP; short *dfColorTableP;
} fnt_fontS; } fnt_fontS;
extern int return_data_value(enum data_types, void *); #include "poppack.h"
extern int dump_bdf(fnt_fontS*, unsigned char* );
extern int dump_bdf_hdr(FILE* fp,fnt_fontS*, unsigned char* );
extern int parse_fnt_data(unsigned char* file_buffer, int length);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment