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
52 INT16 dfInternalLeading
;
53 INT16 dfExternalLeading
;
61 BYTE dfPitchAndFamily
;
74 /* Fields, introduced for Windows 3.x fonts */
85 SHORT dfVersion
; /* Version */
86 LONG dfSize
; /* Total File Size */
87 char dfCopyright
[60]; /* Copyright notice */
88 FONTINFO16 fi
; /* FONTINFO structure */
92 /* FIXME: recognize and dump also NE/PE wrapped fonts */
94 enum FileSig
get_kind_fnt(void)
96 const WINFNT
*fnt
= PRD(0, sizeof(WINFNT
));
97 if (fnt
&& (fnt
->dfVersion
== 0x200 || fnt
->dfVersion
== 0x300) &&
98 PRD(0, fnt
->dfSize
) != NULL
)
105 const WINFNT
*fnt
= PRD(0, sizeof(WINFNT
));
107 printf("dfVersion %#x, dfSize %d bytes, dfCopyright %.60s\n",
108 fnt
->dfVersion
, fnt
->dfSize
, fnt
->dfCopyright
);
114 "dfInternalLeading %d\n"
115 "dfExternalLeading %d\n"
123 "dfPitchAndFamily %#x\n"
128 "dfDefaultChar %#x\n"
131 fnt
->fi
.dfType
, fnt
->fi
.dfPoints
, fnt
->fi
.dfVertRes
, fnt
->fi
.dfHorizRes
,
132 fnt
->fi
.dfAscent
, fnt
->fi
.dfInternalLeading
, fnt
->fi
.dfExternalLeading
,
133 fnt
->fi
.dfItalic
, fnt
->fi
.dfUnderline
, fnt
->fi
.dfStrikeOut
, fnt
->fi
.dfWeight
,
134 fnt
->fi
.dfCharSet
, fnt
->fi
.dfPixWidth
, fnt
->fi
.dfPixHeight
, fnt
->fi
.dfPitchAndFamily
,
135 fnt
->fi
.dfAvgWidth
, fnt
->fi
.dfMaxWidth
, fnt
->fi
.dfFirstChar
, fnt
->fi
.dfLastChar
,
136 fnt
->fi
.dfDefaultChar
, fnt
->fi
.dfBreakChar
, fnt
->fi
.dfWidthBytes
);