4 * Copyright 2009 Dmitry Timoshkov
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
42 INT16 dfInternalLeading
;
43 INT16 dfExternalLeading
;
51 BYTE dfPitchAndFamily
;
64 /* Fields, introduced for Windows 3.x fonts */
75 SHORT dfVersion
; /* Version */
76 int dfSize
; /* Total File Size */
77 char dfCopyright
[60]; /* Copyright notice */
78 FONTINFO16 fi
; /* FONTINFO structure */
82 /* FIXME: recognize and dump also NE/PE wrapped fonts */
84 enum FileSig
get_kind_fnt(void)
86 const WINFNT
*fnt
= PRD(0, sizeof(WINFNT
));
87 if (fnt
&& (fnt
->dfVersion
== 0x200 || fnt
->dfVersion
== 0x300) &&
88 PRD(0, fnt
->dfSize
) != NULL
)
95 const WINFNT
*fnt
= PRD(0, sizeof(WINFNT
));
97 printf("dfVersion %#x, dfSize %d bytes, dfCopyright %.60s\n",
98 fnt
->dfVersion
, fnt
->dfSize
, fnt
->dfCopyright
);
104 "dfInternalLeading %d\n"
105 "dfExternalLeading %d\n"
113 "dfPitchAndFamily %#x\n"
118 "dfDefaultChar %#x\n"
121 fnt
->fi
.dfType
, fnt
->fi
.dfPoints
, fnt
->fi
.dfVertRes
, fnt
->fi
.dfHorizRes
,
122 fnt
->fi
.dfAscent
, fnt
->fi
.dfInternalLeading
, fnt
->fi
.dfExternalLeading
,
123 fnt
->fi
.dfItalic
, fnt
->fi
.dfUnderline
, fnt
->fi
.dfStrikeOut
, fnt
->fi
.dfWeight
,
124 fnt
->fi
.dfCharSet
, fnt
->fi
.dfPixWidth
, fnt
->fi
.dfPixHeight
, fnt
->fi
.dfPitchAndFamily
,
125 fnt
->fi
.dfAvgWidth
, fnt
->fi
.dfMaxWidth
, fnt
->fi
.dfFirstChar
, fnt
->fi
.dfLastChar
,
126 fnt
->fi
.dfDefaultChar
, fnt
->fi
.dfBreakChar
, fnt
->fi
.dfWidthBytes
);