1 | /**************************************************************************** |
2 | * |
3 | * winfnt.h |
4 | * |
5 | * FreeType font driver for Windows FNT/FON files |
6 | * |
7 | * Copyright (C) 1996-2023 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 | |
20 | #ifndef WINFNT_H_ |
21 | #define WINFNT_H_ |
22 | |
23 | |
24 | #include <freetype/ftwinfnt.h> |
25 | #include <freetype/internal/ftdrv.h> |
26 | |
27 | |
28 | FT_BEGIN_HEADER |
29 | |
30 | |
31 | typedef struct |
32 | { |
33 | FT_UShort ; |
34 | /* skipped content */ |
35 | FT_UShort ; |
36 | |
37 | } ; |
38 | |
39 | |
40 | typedef struct |
41 | { |
42 | FT_UShort ; |
43 | /* skipped content */ |
44 | FT_UShort ; |
45 | FT_UShort ; |
46 | |
47 | } ; |
48 | |
49 | |
50 | typedef struct |
51 | { |
52 | FT_ULong ; |
53 | FT_UShort ; |
54 | FT_UShort ; |
55 | /* skipped content */ |
56 | FT_UShort ; |
57 | /* skipped content */ |
58 | FT_UShort ; |
59 | /* skipped content */ |
60 | FT_ULong ; |
61 | FT_ULong ; |
62 | /* skipped content */ |
63 | |
64 | } ; |
65 | |
66 | |
67 | typedef struct WinPE32_SectionRec_ |
68 | { |
69 | FT_Byte name[8]; |
70 | /* skipped content */ |
71 | FT_ULong virtual_address; |
72 | FT_ULong size_of_raw_data; |
73 | FT_ULong pointer_to_raw_data; |
74 | /* skipped content */ |
75 | |
76 | } WinPE32_SectionRec; |
77 | |
78 | |
79 | typedef struct WinPE_RsrcDirRec_ |
80 | { |
81 | FT_ULong characteristics; |
82 | FT_ULong time_date_stamp; |
83 | FT_UShort major_version; |
84 | FT_UShort minor_version; |
85 | FT_UShort number_of_named_entries; |
86 | FT_UShort number_of_id_entries; |
87 | |
88 | } WinPE_RsrcDirRec; |
89 | |
90 | |
91 | typedef struct WinPE_RsrcDirEntryRec_ |
92 | { |
93 | FT_ULong name; |
94 | FT_ULong offset; |
95 | |
96 | } WinPE_RsrcDirEntryRec; |
97 | |
98 | |
99 | typedef struct WinPE_RsrcDataEntryRec_ |
100 | { |
101 | FT_ULong offset_to_data; |
102 | FT_ULong size; |
103 | FT_ULong code_page; |
104 | FT_ULong reserved; |
105 | |
106 | } WinPE_RsrcDataEntryRec; |
107 | |
108 | |
109 | typedef struct WinNameInfoRec_ |
110 | { |
111 | FT_UShort offset; |
112 | FT_UShort length; |
113 | FT_UShort flags; |
114 | FT_UShort id; |
115 | FT_UShort handle; |
116 | FT_UShort usage; |
117 | |
118 | } WinNameInfoRec; |
119 | |
120 | |
121 | typedef struct WinResourceInfoRec_ |
122 | { |
123 | FT_UShort type_id; |
124 | FT_UShort count; |
125 | |
126 | } WinResourceInfoRec; |
127 | |
128 | |
129 | #define WINFNT_MZ_MAGIC 0x5A4D |
130 | #define WINFNT_NE_MAGIC 0x454E |
131 | #define WINFNT_PE_MAGIC 0x4550 |
132 | |
133 | |
134 | typedef struct FNT_FontRec_ |
135 | { |
136 | FT_ULong offset; |
137 | |
138 | FT_WinFNT_HeaderRec ; |
139 | |
140 | FT_Byte* fnt_frame; |
141 | FT_ULong fnt_size; |
142 | FT_String* family_name; |
143 | |
144 | } FNT_FontRec, *FNT_Font; |
145 | |
146 | |
147 | typedef struct FNT_FaceRec_ |
148 | { |
149 | FT_FaceRec root; |
150 | FNT_Font font; |
151 | |
152 | } FNT_FaceRec, *FNT_Face; |
153 | |
154 | |
155 | FT_EXPORT_VAR( const FT_Driver_ClassRec ) winfnt_driver_class; |
156 | |
157 | |
158 | FT_END_HEADER |
159 | |
160 | |
161 | #endif /* WINFNT_H_ */ |
162 | |
163 | |
164 | /* END */ |
165 | |