sdk-world v2026.11.05
PS2 SDK - world tier (copyleft-allowed, non-essential packages)
Loading...
Searching...
No Matches
winfnt.h
Go to the documentation of this file.
1/****************************************************************************
2 *
3 * winfnt.h
4 *
5 * FreeType font driver for Windows FNT/FON files
6 *
7 * Copyright (C) 1996-2025 by
8 * David Turner, Robert Wilhelm, and Werner Lemberg.
9 * Copyright 2007 Dmitry Timoshkov for Codeweavers
10 *
11 * This file is part of the FreeType project, and may only be used,
12 * modified, and distributed under the terms of the FreeType project
13 * license, LICENSE.TXT. By continuing to use, modify, or distribute
14 * this file you indicate that you have read the license and
15 * understand and accept it fully.
16 *
17 */
18
19
24#ifndef WINFNT_H_
25#define WINFNT_H_
26
27
28#include <freetype/ftwinfnt.h>
30
31
32FT_BEGIN_HEADER
33
34
35 typedef struct WinMZ_HeaderRec_
36 {
37 FT_UShort magic;
38 /* skipped content */
39 FT_UShort lfanew;
40
41 } WinMZ_HeaderRec;
42
43
44 typedef struct WinNE_HeaderRec_
45 {
46 FT_UShort magic;
47 /* skipped content */
48 FT_UShort resource_tab_offset;
49 FT_UShort rname_tab_offset;
50
51 } WinNE_HeaderRec;
52
53
54 typedef struct WinPE32_HeaderRec_
55 {
56 FT_ULong magic;
57 FT_UShort machine;
58 FT_UShort number_of_sections;
59 /* skipped content */
60 FT_UShort size_of_optional_header;
61 /* skipped content */
62 FT_UShort magic32;
63 /* skipped content */
64 FT_ULong rsrc_virtual_address;
65 FT_ULong rsrc_size;
66 /* skipped content */
67
68 } WinPE32_HeaderRec;
69
70
71 typedef struct WinPE32_SectionRec_
72 {
73 FT_Byte name[8];
74 /* skipped content */
75 FT_ULong virtual_address;
76 FT_ULong size_of_raw_data;
77 FT_ULong pointer_to_raw_data;
78 /* skipped content */
79
80 } WinPE32_SectionRec;
81
82
83 typedef struct WinPE_RsrcDirRec_
84 {
85 FT_ULong characteristics;
86 FT_ULong time_date_stamp;
87 FT_UShort major_version;
88 FT_UShort minor_version;
89 FT_UShort number_of_named_entries;
90 FT_UShort number_of_id_entries;
91
92 } WinPE_RsrcDirRec;
93
94
96 {
97 FT_ULong name;
98 FT_ULong offset;
99
100 } WinPE_RsrcDirEntryRec;
101
102
104 {
105 FT_ULong offset_to_data;
106 FT_ULong size;
107 FT_ULong code_page;
108 FT_ULong reserved;
109
110 } WinPE_RsrcDataEntryRec;
111
112
113 typedef struct WinNameInfoRec_
114 {
115 FT_UShort offset;
116 FT_UShort length;
117 FT_UShort flags;
118 FT_UShort id;
119 FT_UShort handle;
120 FT_UShort usage;
121
122 } WinNameInfoRec;
123
124
125 typedef struct WinResourceInfoRec_
126 {
127 FT_UShort type_id;
128 FT_UShort count;
129
130 } WinResourceInfoRec;
131
132
133#define WINFNT_MZ_MAGIC 0x5A4D
134#define WINFNT_NE_MAGIC 0x454E
135#define WINFNT_PE_MAGIC 0x4550
136
137
138 typedef struct FNT_FontRec_
139 {
140 FT_ULong offset;
141
142 FT_WinFNT_HeaderRec header;
143
144 FT_Byte* fnt_frame;
145 FT_ULong fnt_size;
146 FT_String* family_name;
147
148 } FNT_FontRec, *FNT_Font;
149
150
151 typedef struct FNT_FaceRec_
152 {
153 FT_FaceRec root;
154 FNT_Font font;
155
156 } FNT_FaceRec, *FNT_Face;
157
158
159 FT_EXPORT_VAR( const FT_Driver_ClassRec ) winfnt_driver_class;
160
161
162FT_END_HEADER
163
164
165#endif /* WINFNT_H_ */
166
167
168/* END */