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
22 #include "wine/port.h"
30 #ifdef HAVE_SYS_TYPES_H
31 # include <sys/types.h>
33 #ifdef HAVE_SYS_MMAN_H
38 #define NONAMELESSUNION
39 #define NONAMELESSSTRUCT
54 INT16 dfInternalLeading
;
55 INT16 dfExternalLeading
;
63 BYTE dfPitchAndFamily
;
76 /* Fields, introduced for Windows 3.x fonts */
87 SHORT dfVersion
; /* Version */
88 LONG dfSize
; /* Total File Size */
89 char dfCopyright
[60]; /* Copyright notice */
90 FONTINFO16 fi
; /* FONTINFO structure */
94 /* FIXME: recognize and dump also NE/PE wrapped fonts */
96 enum FileSig
get_kind_fnt(void)
98 const WINFNT
*fnt
= PRD(0, sizeof(WINFNT
));
99 if (fnt
&& (fnt
->dfVersion
== 0x200 || fnt
->dfVersion
== 0x300) &&
100 PRD(0, fnt
->dfSize
) != NULL
)
107 const WINFNT
*fnt
= PRD(0, sizeof(WINFNT
));
109 printf("dfVersion %#x, dfSize %d bytes, dfCopyright %.60s\n",
110 fnt
->dfVersion
, fnt
->dfSize
, fnt
->dfCopyright
);
116 "dfInternalLeading %d\n"
117 "dfExternalLeading %d\n"
125 "dfPitchAndFamily %#x\n"
130 "dfDefaultChar %#x\n"
133 fnt
->fi
.dfType
, fnt
->fi
.dfPoints
, fnt
->fi
.dfVertRes
, fnt
->fi
.dfHorizRes
,
134 fnt
->fi
.dfAscent
, fnt
->fi
.dfInternalLeading
, fnt
->fi
.dfExternalLeading
,
135 fnt
->fi
.dfItalic
, fnt
->fi
.dfUnderline
, fnt
->fi
.dfStrikeOut
, fnt
->fi
.dfWeight
,
136 fnt
->fi
.dfCharSet
, fnt
->fi
.dfPixWidth
, fnt
->fi
.dfPixHeight
, fnt
->fi
.dfPitchAndFamily
,
137 fnt
->fi
.dfAvgWidth
, fnt
->fi
.dfMaxWidth
, fnt
->fi
.dfFirstChar
, fnt
->fi
.dfLastChar
,
138 fnt
->fi
.dfDefaultChar
, fnt
->fi
.dfBreakChar
, fnt
->fi
.dfWidthBytes
);