* include/freetype/internal/fnttypes.h, src/winfnt/*.c: updating the type definitions of the Windows FNT font driver
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300
diff --git a/ChangeLog b/ChangeLog
index f5a3340..ccce223 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -13,6 +13,8 @@
(i.e. CFF_Font => CFF_FontRec
CFF_Font* => CFF_Font, etc...)
+ * include/freetype/internal/fnttypes.h, src/winfnt/*.c: updating
+ the type definitions of the Windows FNT font driver
2002-03-13 Antoine Leca <antoine@oriolnet.com>
diff --git a/include/freetype/internal/fnttypes.h b/include/freetype/internal/fnttypes.h
index 31edaa9..fbefa4b 100644
--- a/include/freetype/internal/fnttypes.h
+++ b/include/freetype/internal/fnttypes.h
@@ -28,26 +28,26 @@
FT_BEGIN_HEADER
- typedef struct WinMZ_Header_
+ typedef struct WinMZ_HeaderRec_
{
FT_UShort magic;
/* skipped content */
FT_UShort lfanew;
- } WinMZ_Header;
+ } WinMZ_HeaderRec;
- typedef struct WinNE_Header_
+ typedef struct WinNE_HeaderRec_
{
FT_UShort magic;
/* skipped content */
FT_UShort resource_tab_offset;
FT_UShort rname_tab_offset;
- } WinNE_Header;
+ } WinNE_HeaderRec;
- typedef struct WinNameInfo_
+ typedef struct WinNameInfoRec_
{
FT_UShort offset;
FT_UShort length;
@@ -56,22 +56,22 @@ FT_BEGIN_HEADER
FT_UShort handle;
FT_UShort usage;
- } WinNameInfo;
+ } WinNameInfoRec;
- typedef struct WinResourceInfo_
+ typedef struct WinResourceInfoRec_
{
FT_UShort type_id;
FT_UShort count;
- } WinResourceInfo;
+ } WinResourceInfoRec;
#define WINFNT_MZ_MAGIC 0x5A4D
#define WINFNT_NE_MAGIC 0x454E
- typedef struct WinFNT_Header_
+ typedef struct WinFNT_HeaderRec_
{
FT_UShort version;
FT_ULong file_size;
@@ -110,26 +110,26 @@ FT_BEGIN_HEADER
FT_UShort color_table_offset;
FT_Byte reserved2[4];
- } WinFNT_Header;
+ } WinFNT_HeaderRec, *WinFNT_Header;
- typedef struct FNT_Font_
+ typedef struct FNT_FontRec_
{
FT_ULong offset;
FT_Int size_shift;
- WinFNT_Header header;
+ WinFNT_HeaderRec header;
FT_Byte* fnt_frame;
FT_ULong fnt_size;
- } FNT_Font;
+ } FNT_FontRec, *FNT_Font;
typedef struct FNT_SizeRec_
{
FT_SizeRec root;
- FNT_Font* font;
+ FNT_Font font;
} FNT_SizeRec, *FNT_Size;
@@ -139,7 +139,7 @@ FT_BEGIN_HEADER
FT_FaceRec root;
FT_UInt num_fonts;
- FNT_Font* fonts;
+ FNT_Font fonts;
FT_CharMap charmap_handle;
FT_CharMapRec charmap; /* a single charmap per face */
diff --git a/src/winfonts/winfnt.c b/src/winfonts/winfnt.c
index 4a85efb..e26797c 100644
--- a/src/winfonts/winfnt.c
+++ b/src/winfonts/winfnt.c
@@ -41,7 +41,7 @@
const FT_Frame_Field winmz_header_fields[] =
{
#undef FT_STRUCTURE
-#define FT_STRUCTURE WinMZ_Header
+#define FT_STRUCTURE WinMZ_HeaderRec
FT_FRAME_START( 64 ),
FT_FRAME_USHORT_LE ( magic ),
@@ -54,7 +54,7 @@
const FT_Frame_Field winne_header_fields[] =
{
#undef FT_STRUCTURE
-#define FT_STRUCTURE WinNE_Header
+#define FT_STRUCTURE WinNE_HeaderRec
FT_FRAME_START( 40 ),
FT_FRAME_USHORT_LE ( magic ),
@@ -68,7 +68,7 @@
const FT_Frame_Field winfnt_header_fields[] =
{
#undef FT_STRUCTURE
-#define FT_STRUCTURE WinFNT_Header
+#define FT_STRUCTURE WinFNT_HeaderRec
FT_FRAME_START( 134 ),
FT_FRAME_USHORT_LE( version ),
@@ -112,7 +112,7 @@
static void
- fnt_font_done( FNT_Font* font,
+ fnt_font_done( FNT_Font font,
FT_Stream stream )
{
if ( font->fnt_frame )
@@ -124,11 +124,11 @@
static FT_Error
- fnt_font_load( FNT_Font* font,
+ fnt_font_load( FNT_Font font,
FT_Stream stream )
{
FT_Error error;
- WinFNT_Header* header = &font->header;
+ WinFNT_Header header = &font->header;
/* first of all, read the FNT header */
@@ -171,8 +171,8 @@
{
FT_Memory memory = FT_FACE(face)->memory;
FT_Stream stream = FT_FACE(face)->stream;
- FNT_Font* cur = face->fonts;
- FNT_Font* limit = cur + face->num_fonts;
+ FNT_Font cur = face->fonts;
+ FNT_Font limit = cur + face->num_fonts;
for ( ; cur < limit; cur++ )
@@ -189,7 +189,7 @@
FT_Error error;
FT_Stream stream = FT_FACE(face)->stream;
FT_Memory memory = FT_FACE(face)->memory;
- WinMZ_Header mz_header;
+ WinMZ_HeaderRec mz_header;
face->fonts = 0;
@@ -204,7 +204,7 @@
if ( mz_header.magic == WINFNT_MZ_MAGIC )
{
/* yes, now look for a NE header in the file */
- WinNE_Header ne_header;
+ WinNE_HeaderRec ne_header;
if ( FILE_Seek( mz_header.lfanew ) ||
@@ -261,7 +261,7 @@
}
if ( FILE_Seek( font_offset ) ||
- ALLOC_ARRAY( face->fonts, font_count, FNT_Font ) )
+ ALLOC_ARRAY( face->fonts, font_count, FNT_FontRec ) )
goto Exit;
face->num_fonts = font_count;
@@ -271,8 +271,8 @@
/* now read the offset and position of each FNT font */
{
- FNT_Font* cur = face->fonts;
- FNT_Font* limit = cur + font_count;
+ FNT_Font cur = face->fonts;
+ FNT_Font limit = cur + font_count;
for ( ; cur < limit; cur++ )
@@ -287,8 +287,8 @@
/* finally, try to load each font there */
{
- FNT_Font* cur = face->fonts;
- FNT_Font* limit = cur + font_count;
+ FNT_Font cur = face->fonts;
+ FNT_Font limit = cur + font_count;
for ( ; cur < limit; cur++ )
@@ -326,7 +326,7 @@
fnt_cmap_init( FT_CMap cmap )
{
FNT_Face face = (FNT_Face) FT_CMAP_FACE(cmap);
- FNT_Font* font = face->fonts;
+ FNT_Font font = face->fonts;
cmap->first = (FT_UInt32) font->header.first_char;
cmap->count = (FT_UInt32)(font->header.last_char - cmap->first + 1);
@@ -399,7 +399,7 @@
if ( charmap )
{
- FNT_Font* font = ((FNT_Face)charmap->face)->fonts;
+ FNT_Font font = ((FNT_Face)charmap->face)->fonts;
FT_Long first = font->header.first_char;
FT_Long count = font->header.last_char - first + 1;
@@ -422,7 +422,7 @@
char_code++;
if ( charmap )
{
- FNT_Font* font = ((FNT_Face)charmap->face)->fonts;
+ FNT_Font font = ((FNT_Face)charmap->face)->fonts;
FT_Long first = font->header.first_char;
@@ -472,7 +472,7 @@
if ( error )
{
/* this didn't work, now try to load a single FNT font */
- FNT_Font* font;
+ FNT_Font font;
if ( ALLOC( face->fonts, sizeof ( *face->fonts ) ) )
goto Exit;
@@ -492,9 +492,9 @@
/* fill the root FT_Face fields with relevant information */
{
FT_Face root = FT_FACE( face );
- FNT_Font* fonts = face->fonts;
- FNT_Font* limit = fonts + face->num_fonts;
- FNT_Font* cur;
+ FNT_Font fonts = face->fonts;
+ FNT_Font limit = fonts + face->num_fonts;
+ FNT_Font cur;
root->num_faces = 1;
@@ -595,8 +595,8 @@
{
/* look up a font corresponding to the current pixel size */
FNT_Face face = (FNT_Face)FT_SIZE_FACE( size );
- FNT_Font* cur = face->fonts;
- FNT_Font* limit = cur + face->num_fonts;
+ FNT_Font cur = face->fonts;
+ FNT_Font limit = cur + face->num_fonts;
size->font = 0;
@@ -626,7 +626,7 @@
FT_UInt glyph_index,
FT_Int load_flags )
{
- FNT_Font* font = size->font;
+ FNT_Font font = size->font;
FT_Error error = 0;
FT_Byte* p;
FT_Int len;