1
Index: include/freetype/t1tables.h
2
===================================================================
3
RCS file: /cvs/freetype/freetype2/include/freetype/t1tables.h,v
4
retrieving revision 1.23
5
retrieving revision 1.24
7
--- freetype2~/include/freetype/t1tables.h 2002/07/11 11:26:21 1.23
8
+++ freetype2/include/freetype/t1tables.h 2003/05/30 09:12:46 1.24
10
/* Basic Type 1/Type 2 tables definitions and interface (specification */
13
-/* Copyright 1996-2001, 2002 by */
14
+/* Copyright 1996-2001, 2002, 2003 by */
15
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
17
/* This file is part of the FreeType project, and may only be used, */
20
FT_String* family_name;
22
- FT_Long italic_angle;
23
- FT_Bool is_fixed_pitch;
24
- FT_Short underline_position;
25
- FT_UShort underline_thickness;
26
+ FT_Fixed* italic_angle;
27
+ FT_Bool* is_fixed_pitch;
28
+ FT_Fixed* underline_position;
29
+ FT_Fixed* underline_thickness;
31
} PS_FontInfoRec, *PS_FontInfo;
33
Index: include/freetype/internal/cfftypes.h
34
===================================================================
35
RCS file: /cvs/freetype/freetype2/include/freetype/internal/cfftypes.h,v
36
retrieving revision 1.12
37
retrieving revision 1.13
39
--- freetype2~/include/freetype/internal/cfftypes.h 2002/07/10 16:52:06 1.12
40
+++ freetype2/include/freetype/internal/cfftypes.h 2003/05/30 09:12:47 1.13
42
/* Basic OpenType/CFF type definitions and interface (specification */
45
-/* Copyright 1996-2001, 2002 by */
46
+/* Copyright 1996-2001, 2002, 2003 by */
47
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
49
/* This file is part of the FreeType project, and may only be used, */
52
FT_Bool is_fixed_pitch;
53
FT_Fixed italic_angle;
54
- FT_Pos underline_position;
55
- FT_Pos underline_thickness;
56
+ FT_Fixed underline_position;
57
+ FT_Fixed underline_thickness;
59
FT_Int charstring_type;
60
FT_Matrix font_matrix;
61
Index: include/freetype/internal/t1types.h
62
===================================================================
63
RCS file: /cvs/freetype/freetype2/include/freetype/internal/t1types.h,v
64
retrieving revision 1.31
65
retrieving revision 1.32
67
--- freetype2~/include/freetype/internal/t1types.h 2002/05/21 14:13:00 1.31
68
+++ freetype2/include/freetype/internal/t1types.h 2003/05/30 09:12:47 1.32
70
/* Basic Type1/Type2 type definitions and interface (specification */
73
-/* Copyright 1996-2001, 2002 by */
74
+/* Copyright 1996-2001, 2002, 2003 by */
75
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
77
/* This file is part of the FreeType project, and may only be used, */
79
FT_Byte** charstrings; /* array of glyph charstrings */
80
FT_Int* charstrings_len;
83
+ FT_Byte* paint_type;
85
FT_Matrix font_matrix;
86
FT_Vector font_offset;
90
- FT_Int stroke_width;
91
+ FT_Fixed* stroke_width;
93
} T1_FontRec, *T1_Font;
95
Index: src/cff/cffload.c
96
===================================================================
97
RCS file: /cvs/freetype/freetype2/src/cff/cffload.c,v
98
retrieving revision 1.49
99
retrieving revision 1.50
100
diff -u -r1.49 -r1.50
101
--- freetype2~/src/cff/cffload.c 2003/04/23 06:47:12 1.49
102
+++ freetype2/src/cff/cffload.c 2003/05/30 09:12:47 1.50
105
/* OpenType and CFF data/program tables loader (body). */
107
-/* Copyright 1996-2001, 2002 by */
108
+/* Copyright 1996-2001, 2002, 2003 by */
109
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
111
/* This file is part of the FreeType project, and may only be used, */
112
@@ -1965,8 +1965,8 @@
114
FT_MEM_ZERO( top, sizeof ( *top ) );
116
- top->underline_position = -100;
117
- top->underline_thickness = 50;
118
+ top->underline_position = -100L << 16;
119
+ top->underline_thickness = 50L << 16;
120
top->charstring_type = 2;
121
top->font_matrix.xx = 0x10000L;
122
top->font_matrix.yy = 0x10000L;
123
Index: src/cff/cffobjs.c
124
===================================================================
125
RCS file: /cvs/freetype/freetype2/src/cff/cffobjs.c,v
126
retrieving revision 1.47
127
retrieving revision 1.48
128
diff -u -r1.47 -r1.48
129
--- freetype2~/src/cff/cffobjs.c 2002/09/27 11:09:22 1.47
130
+++ freetype2/src/cff/cffobjs.c 2003/05/30 09:12:47 1.48
133
/* OpenType objects manager (body). */
135
-/* Copyright 1996-2001, 2002 by */
136
+/* Copyright 1996-2001, 2002, 2003 by */
137
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
139
/* This file is part of the FreeType project, and may only be used, */
143
/* now, the font can be either an OpenType/CFF font, or an SVG CEF */
144
- /* font in the later case; it doesn't have a `head' table */
145
+ /* font; in the later case it doesn't have a `head' table */
146
error = face->goto_table( face, TTAG_head, stream, 0 );
150
root->units_per_EM = dict->units_per_em;
152
root->units_per_EM = 1000;
154
+ root->underline_position = dict->underline_position >> 16;
155
+ root->underline_thickness = dict->underline_thickness >> 16;
157
/* retrieve font family & style name */
158
root->family_name = cff_index_get_name( &cff->name_index, face_index );
159
Index: src/cff/cfftoken.h
160
===================================================================
161
RCS file: /cvs/freetype/freetype2/src/cff/cfftoken.h,v
162
retrieving revision 1.6
163
retrieving revision 1.7
165
--- freetype2~/src/cff/cfftoken.h 2002/03/30 16:41:09 1.6
166
+++ freetype2/src/cff/cfftoken.h 2003/05/30 09:12:47 1.7
169
/* CFF token definitions (specification only). */
171
-/* Copyright 1996-2001, 2002 by */
172
+/* Copyright 1996-2001, 2002, 2003 by */
173
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
175
/* This file is part of the FreeType project, and may only be used, */
177
CFF_FIELD_STRING ( 4, weight )
178
CFF_FIELD_BOOL ( 0x101, is_fixed_pitch )
179
CFF_FIELD_FIXED ( 0x102, italic_angle )
180
- CFF_FIELD_NUM ( 0x103, underline_position )
181
- CFF_FIELD_NUM ( 0x104, underline_thickness )
182
+ CFF_FIELD_FIXED ( 0x103, underline_position )
183
+ CFF_FIELD_FIXED ( 0x104, underline_thickness )
184
CFF_FIELD_NUM ( 0x105, paint_type )
185
CFF_FIELD_NUM ( 0x106, charstring_type )
186
CFF_FIELD_CALLBACK( 0x107, font_matrix )
187
Index: src/cid/cidobjs.c
188
===================================================================
189
RCS file: /cvs/freetype/freetype2/src/cff/cidobjs.c,v
190
retrieving revision 1.55
191
retrieving revision 1.56
192
diff -u -r1.55 -r1.56
193
--- freetype2/src/cid/cidobjs.c 2003/04/25 05:35:04 1.55
194
+++ freetype2/src/cid/cidobjs.c 2003/05/30 09:12:48 1.56
196
FT_FREE( info->family_name );
197
FT_FREE( info->weight );
199
+ FT_FREE( info->italic_angle );
200
+ FT_FREE( info->underline_position );
201
+ FT_FREE( info->underline_thickness );
202
+ FT_FREE( info->is_fixed_pitch );
204
/* release font dictionaries */
205
FT_FREE( cid->font_dicts );
207
@@ -331,10 +336,12 @@
208
/* Init the face object fields */
209
/* Now set up root face fields */
211
- FT_Face root = (FT_Face)&face->root;
212
+ FT_Face root = (FT_Face)&face->root;
213
+ CID_FaceInfo cid = &face->cid;
214
+ PS_FontInfo info = &cid->font_info;
217
- root->num_glyphs = face->cid.cid_count;
218
+ root->num_glyphs = cid->cid_count;
219
root->num_charmaps = 0;
221
root->face_index = face_index;
222
@@ -342,17 +349,17 @@
224
root->face_flags |= FT_FACE_FLAG_HORIZONTAL;
226
- if ( face->cid.font_info.is_fixed_pitch )
227
+ if ( info->is_fixed_pitch && *info->is_fixed_pitch )
228
root->face_flags |= FT_FACE_FLAG_FIXED_WIDTH;
230
/* XXX: TODO: add kerning with .afm support */
232
/* get style name -- be careful, some broken fonts only */
233
/* have a /FontName dictionary entry! */
234
- root->family_name = face->cid.font_info.family_name;
235
+ root->family_name = info->family_name;
236
if ( root->family_name )
238
- char* full = face->cid.font_info.full_name;
239
+ char* full = info->full_name;
240
char* family = root->family_name;
242
while ( *family && *full == *family )
246
/* do we have a `/FontName'? */
247
- if ( face->cid.cid_font_name )
248
+ if ( cid->cid_font_name )
250
- root->family_name = face->cid.cid_font_name;
251
+ root->family_name = cid->cid_font_name;
252
root->style_name = (char *)"Regular";
255
@@ -380,10 +387,10 @@
256
root->num_fixed_sizes = 0;
257
root->available_sizes = 0;
259
- root->bbox.xMin = face->cid.font_bbox.xMin >> 16;
260
- root->bbox.yMin = face->cid.font_bbox.yMin >> 16;
261
- root->bbox.xMax = ( face->cid.font_bbox.xMax + 0xFFFFU ) >> 16;
262
- root->bbox.yMax = ( face->cid.font_bbox.yMax + 0xFFFFU ) >> 16;
263
+ root->bbox.xMin = cid->font_bbox.xMin >> 16;
264
+ root->bbox.yMin = cid->font_bbox.yMin >> 16;
265
+ root->bbox.xMax = ( cid->font_bbox.xMax + 0xFFFFU ) >> 16;
266
+ root->bbox.yMax = ( cid->font_bbox.yMax + 0xFFFFU ) >> 16;
268
if ( !root->units_per_EM )
269
root->units_per_EM = 1000;
271
root->height = (FT_Short)(
272
( ( root->ascender + root->descender ) * 12 ) / 10 );
274
- root->underline_position = face->cid.font_info.underline_position;
275
- root->underline_thickness = face->cid.font_info.underline_thickness;
276
+ if ( info->underline_position )
277
+ root->underline_position = *info->underline_position >> 16;
278
+ if ( info->underline_thickness )
279
+ root->underline_thickness = *info->underline_thickness >> 16;
281
root->internal->max_points = 0;
282
root->internal->max_contours = 0;
283
Index: src/cid/cidtoken.h
284
===================================================================
285
RCS file: /cvs/freetype/freetype2/src/cid/cidtoken.h,v
286
retrieving revision 1.6
287
retrieving revision 1.7
289
--- freetype2~/src/cid/cidtoken.h 2002/03/30 17:08:04 1.6
290
+++ freetype2/src/cid/cidtoken.h 2003/05/30 09:12:48 1.7
293
/* CID token definitions (specification only). */
295
-/* Copyright 1996-2001, 2002 by */
296
+/* Copyright 1996-2001, 2002, 2003 by */
297
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
299
/* This file is part of the FreeType project, and may only be used, */
302
#define T1CODE T1_FIELD_LOCATION_FONT_INFO
304
- T1_FIELD_STRING ( "version", version )
305
- T1_FIELD_STRING ( "Notice", notice )
306
- T1_FIELD_STRING ( "FullName", full_name )
307
- T1_FIELD_STRING ( "FamilyName", family_name )
308
- T1_FIELD_STRING ( "Weight", weight )
309
- T1_FIELD_FIXED ( "ItalicAngle", italic_angle )
310
- T1_FIELD_TYPE_BOOL( "isFixedPitch", is_fixed_pitch )
311
- T1_FIELD_NUM ( "UnderlinePosition", underline_position )
312
- T1_FIELD_NUM ( "UnderlineThickness", underline_thickness )
313
+ T1_FIELD_STRING ( "version", version )
314
+ T1_FIELD_STRING ( "Notice", notice )
315
+ T1_FIELD_STRING ( "FullName", full_name )
316
+ T1_FIELD_STRING ( "FamilyName", family_name )
317
+ T1_FIELD_STRING ( "Weight", weight )
318
+ T1_FIELD_FIXED_P ( "ItalicAngle", italic_angle )
319
+ T1_FIELD_TYPE_BOOL_P( "isFixedPitch", is_fixed_pitch )
320
+ T1_FIELD_FIXED_P ( "UnderlinePosition", underline_position )
321
+ T1_FIELD_FIXED_P ( "UnderlineThickness", underline_thickness )
326
T1_FIELD_NUM ( "lenBuildCharArray", len_buildchar )
327
T1_FIELD_FIXED( "ForceBoldThreshold", forcebold_threshold )
328
T1_FIELD_FIXED( "ExpansionFactor", expansion_factor )
329
- T1_FIELD_NUM ( "StrokeWidth", stroke_width )
330
+ T1_FIELD_FIXED( "StrokeWidth", stroke_width )
334
Index: src/pshinter/pshglob.c
335
===================================================================
336
RCS file: /cvs/freetype/freetype2/src/pshinter/pshglob.c,v
337
retrieving revision 1.22
338
retrieving revision 1.23
339
diff -u -r1.22 -r1.23
340
--- freetype2~/src/pshinter/pshglob.c 2003/05/28 22:42:41 1.22
341
+++ freetype2/src/pshinter/pshglob.c 2003/05/30 09:12:49 1.23
347
+ FT_LOCAL_DEF( FT_Error )
348
psh_globals_set_scale( PSH_Globals globals,
351
Index: src/pshinter/pshglob.h
352
===================================================================
353
RCS file: /cvs/freetype/freetype2/src/pshinter/pshglob.h,v
354
retrieving revision 1.14
355
retrieving revision 1.15
356
diff -u -r1.14 -r1.15
357
--- freetype2~/src/pshinter/pshglob.h 2003/05/28 22:42:41 1.14
358
+++ freetype2/src/pshinter/pshglob.h 2003/05/30 09:12:49 1.15
363
+ FT_LOCAL( FT_Error )
364
+ psh_globals_set_scale( PSH_Globals globals,
368
+ FT_Fixed y_delta );
370
/* snap a stem to one or two blue zones */
372
psh_blues_snap_stem( PSH_Blues blues,
373
Index: src/type1/t1objs.c
374
===================================================================
375
RCS file: /cvs/freetype/freetype2/src/type1/t1objs.c,v
376
retrieving revision 1.77
377
retrieving revision 1.78
378
diff -u -r1.77 -r1.78
379
--- freetype2~/src/type1/t1objs.c 2003/04/25 05:35:04 1.77
380
+++ freetype2/src/type1/t1objs.c 2003/05/30 09:12:49 1.78
382
FT_FREE( info->full_name );
383
FT_FREE( info->family_name );
384
FT_FREE( info->weight );
386
+ FT_FREE( info->italic_angle );
387
+ FT_FREE( info->underline_position );
388
+ FT_FREE( info->underline_thickness );
389
+ FT_FREE( info->is_fixed_pitch );
392
/* release top dictionary */
394
FT_FREE( type1->encoding.char_name );
395
FT_FREE( type1->font_name );
397
+ FT_FREE( type1->paint_type );
398
+ FT_FREE( type1->stroke_width );
400
#ifndef T1_CONFIG_OPTION_NO_AFM
401
/* release afm data if present */
402
if ( face->afm_data )
405
FT_Parameter* params )
408
- PSNames_Service psnames;
409
- PSAux_Service psaux;
411
+ PSNames_Service psnames;
412
+ PSAux_Service psaux;
413
+ T1_Font type1 = &face->type1;
414
+ PS_FontInfo info = &type1->font_info;
416
FT_UNUSED( num_params );
418
@@ -323,14 +333,14 @@
419
FT_Face root = (FT_Face)&face->root;
422
- root->num_glyphs = face->type1.num_glyphs;
423
+ root->num_glyphs = type1->num_glyphs;
424
root->face_index = face_index;
426
root->face_flags = FT_FACE_FLAG_SCALABLE;
427
root->face_flags |= FT_FACE_FLAG_HORIZONTAL;
428
root->face_flags |= FT_FACE_FLAG_GLYPH_NAMES;
430
- if ( face->type1.font_info.is_fixed_pitch )
431
+ if ( info->is_fixed_pitch && *info->is_fixed_pitch )
432
root->face_flags |= FT_FACE_FLAG_FIXED_WIDTH;
435
@@ -340,12 +350,12 @@
437
/* get style name -- be careful, some broken fonts only */
438
/* have a `/FontName' dictionary entry! */
439
- root->family_name = face->type1.font_info.family_name;
440
+ root->family_name = info->family_name;
441
/* assume "Regular" style if we don't know better */
442
root->style_name = (char *)"Regular";
443
if ( root->family_name )
445
- char* full = face->type1.font_info.full_name;
446
+ char* full = info->full_name;
447
char* family = root->family_name;
450
@@ -366,18 +376,18 @@
453
/* do we have a `/FontName'? */
454
- if ( face->type1.font_name )
455
+ if ( type1->font_name )
456
- root->family_name = face->type1.font_name;
457
+ root->family_name = type1->font_name;
460
/* compute style flags */
461
root->style_flags = 0;
462
- if ( face->type1.font_info.italic_angle )
463
+ if ( info->italic_angle && *info->italic_angle )
464
root->style_flags |= FT_STYLE_FLAG_ITALIC;
465
- if ( face->type1.font_info.weight )
466
+ if ( info->weight )
468
- if ( !ft_strcmp( face->type1.font_info.weight, "Bold" ) ||
469
- !ft_strcmp( face->type1.font_info.weight, "Black" ) )
470
+ if ( !ft_strcmp( info->weight, "Bold" ) ||
471
+ !ft_strcmp( info->weight, "Black" ) )
472
root->style_flags |= FT_STYLE_FLAG_BOLD;
475
@@ -388,10 +398,10 @@
476
root->num_fixed_sizes = 0;
477
root->available_sizes = 0;
479
- root->bbox.xMin = face->type1.font_bbox.xMin >> 16;
480
- root->bbox.yMin = face->type1.font_bbox.yMin >> 16;
481
- root->bbox.xMax = ( face->type1.font_bbox.xMax + 0xFFFFU ) >> 16;
482
- root->bbox.yMax = ( face->type1.font_bbox.yMax + 0xFFFFU ) >> 16;
483
+ root->bbox.xMin = type1->font_bbox.xMin >> 16;
484
+ root->bbox.yMin = type1->font_bbox.yMin >> 16;
485
+ root->bbox.xMax = ( type1->font_bbox.xMax + 0xFFFFU ) >> 16;
486
+ root->bbox.yMax = ( type1->font_bbox.yMax + 0xFFFFU ) >> 16;
488
/* Set units_per_EM if we didn't set it in parse_font_matrix. */
489
if ( !root->units_per_EM )
492
root->max_advance_height = root->height;
494
- root->underline_position = face->type1.font_info.underline_position;
495
- root->underline_thickness = face->type1.font_info.underline_thickness;
496
+ if ( info->underline_position )
497
+ root->underline_position = *info->underline_position >> 16;
498
+ if ( info->underline_thickness )
499
+ root->underline_thickness = *info->underline_thickness >> 16;
501
root->internal->max_points = 0;
502
root->internal->max_contours = 0;
504
charmap.platform_id = 7;
507
- switch ( face->type1.encoding_type )
508
+ switch ( type1->encoding_type )
510
case T1_ENCODING_TYPE_STANDARD:
511
charmap.encoding = FT_ENCODING_ADOBE_STANDARD;
512
Index: src/type1/t1tokens.h
513
===================================================================
514
RCS file: /cvs/freetype/freetype2/src/type1/t1tokens.h,v
515
retrieving revision 1.16
516
retrieving revision 1.17
517
diff -u -r1.16 -r1.17
518
--- freetype2~/src/type1/t1tokens.h 2002/07/11 11:26:21 1.16
519
+++ freetype2/src/type1/t1tokens.h 2003/05/30 09:12:49 1.17
522
/* Type 1 tokenizer (specification). */
524
-/* Copyright 1996-2001, 2002 by */
525
+/* Copyright 1996-2001, 2002, 2003 by */
526
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
528
/* This file is part of the FreeType project, and may only be used, */
531
#define T1CODE T1_FIELD_LOCATION_FONT_INFO
533
- T1_FIELD_STRING ( "version", version )
534
- T1_FIELD_STRING ( "Notice", notice )
535
- T1_FIELD_STRING ( "FullName", full_name )
536
- T1_FIELD_STRING ( "FamilyName", family_name )
537
- T1_FIELD_STRING ( "Weight", weight )
539
- T1_FIELD_NUM ( "ItalicAngle", italic_angle )
540
- T1_FIELD_TYPE_BOOL( "isFixedPitch", is_fixed_pitch )
541
- T1_FIELD_NUM ( "UnderlinePosition", underline_position )
542
- T1_FIELD_NUM ( "UnderlineThickness", underline_thickness )
543
+ T1_FIELD_STRING ( "version", version )
544
+ T1_FIELD_STRING ( "Notice", notice )
545
+ T1_FIELD_STRING ( "FullName", full_name )
546
+ T1_FIELD_STRING ( "FamilyName", family_name )
547
+ T1_FIELD_STRING ( "Weight", weight )
549
+ /* we use pointers to detect modifications made by synthetic fonts */
550
+ T1_FIELD_FIXED_P ( "ItalicAngle", italic_angle )
551
+ T1_FIELD_TYPE_BOOL_P( "isFixedPitch", is_fixed_pitch )
552
+ T1_FIELD_FIXED_P ( "UnderlinePosition", underline_position )
553
+ T1_FIELD_FIXED_P ( "UnderlineThickness", underline_thickness )
559
#define T1CODE T1_FIELD_LOCATION_FONT_DICT
561
- T1_FIELD_NUM( "PaintType", paint_type )
562
- T1_FIELD_NUM( "FontType", font_type )
563
- T1_FIELD_NUM( "StrokeWidth", stroke_width )
564
+ T1_FIELD_NUM_P ( "PaintType", paint_type )
565
+ T1_FIELD_NUM ( "FontType", font_type )
566
+ T1_FIELD_FIXED_P( "StrokeWidth", stroke_width )
569
#define FT_STRUCTURE FT_BBox
570
Index: src/type42/t42objs.c
571
===================================================================
572
RCS file: /cvs/freetype/freetype2/src/type42/t42objs.c,v
573
retrieving revision 1.13
574
retrieving revision 1.14
575
diff -u -r1.13 -r1.14
576
--- freetype2~/src/type42/t42objs.c 2003/04/25 05:35:04 1.13
577
+++ freetype2/src/type42/t42objs.c 2003/05/30 09:12:50 1.14
578
@@ -149,10 +149,12 @@
580
FT_Parameter* params )
583
- PSNames_Service psnames;
584
- PSAux_Service psaux;
585
- FT_Face root = (FT_Face)&face->root;
587
+ PSNames_Service psnames;
588
+ PSAux_Service psaux;
589
+ FT_Face root = (FT_Face)&face->root;
590
+ T1_Font type1 = &face->type1;
591
+ PS_FontInfo info = &type1->font_info;
593
FT_UNUSED( num_params );
596
/* Init the face object fields */
597
/* Now set up root face fields */
599
- root->num_glyphs = face->type1.num_glyphs;
600
+ root->num_glyphs = type1->num_glyphs;
601
root->num_charmaps = 0;
602
root->face_index = face_index;
604
@@ -201,17 +203,17 @@
605
root->face_flags |= FT_FACE_FLAG_HORIZONTAL;
606
root->face_flags |= FT_FACE_FLAG_GLYPH_NAMES;
608
- if ( face->type1.font_info.is_fixed_pitch )
609
+ if ( info->is_fixed_pitch && *info->is_fixed_pitch )
610
root->face_flags |= FT_FACE_FLAG_FIXED_WIDTH;
612
/* XXX: TODO -- add kerning with .afm support */
614
/* get style name -- be careful, some broken fonts only */
615
/* have a `/FontName' dictionary entry! */
616
- root->family_name = face->type1.font_info.family_name;
617
+ root->family_name = info->family_name;
618
if ( root->family_name )
620
- char* full = face->type1.font_info.full_name;
621
+ char* full = info->full_name;
622
char* family = root->family_name;
628
/* do we have a `/FontName'? */
629
- if ( face->type1.font_name )
630
+ if ( type1->font_name )
632
- root->family_name = face->type1.font_name;
633
+ root->family_name = type1->font_name;
634
root->style_name = (char *)"Regular";
637
@@ -268,15 +270,17 @@
638
root->max_advance_width = face->ttf_face->max_advance_width;
639
root->max_advance_height = face->ttf_face->max_advance_height;
641
- root->underline_position = face->type1.font_info.underline_position;
642
- root->underline_thickness = face->type1.font_info.underline_thickness;
643
+ if ( info->underline_position )
644
+ root->underline_position = *info->underline_position >> 16;
645
+ if ( info->underline_thickness )
646
+ root->underline_thickness = *info->underline_thickness >> 16;
648
root->internal->max_points = 0;
649
root->internal->max_contours = 0;
651
/* compute style flags */
652
root->style_flags = 0;
653
- if ( face->type1.font_info.italic_angle )
654
+ if ( info->italic_angle && *info->italic_angle )
655
root->style_flags |= FT_STYLE_FLAG_ITALIC;
657
if ( face->ttf_face->style_flags & FT_STYLE_FLAG_BOLD )
659
charmap.platform_id = 7;
662
- switch ( face->type1.encoding_type )
663
+ switch ( type1->encoding_type )
665
case T1_ENCODING_TYPE_STANDARD:
666
charmap.encoding = FT_ENCODING_ADOBE_STANDARD;
668
FT_FREE( info->family_name );
669
FT_FREE( info->weight );
671
+ FT_FREE( info->italic_angle );
672
+ FT_FREE( info->underline_position );
673
+ FT_FREE( info->underline_thickness );
674
+ FT_FREE( info->is_fixed_pitch );
676
/* release top dictionary */
677
FT_FREE( type1->charstrings_len );
678
FT_FREE( type1->charstrings );
680
FT_FREE( type1->encoding.char_index );
681
FT_FREE( type1->encoding.char_name );
682
FT_FREE( type1->font_name );
684
+ FT_FREE( type1->paint_type );
685
+ FT_FREE( type1->stroke_width );
687
FT_FREE( face->ttf_data );
689
Index: src/type42/t42parse.c
690
===================================================================
691
RCS file: /cvs/freetype/freetype2/src/type42/t42parse.c,v
692
retrieving revision 1.6
693
retrieving revision 1.7
695
--- freetype2~/src/type42/t42parse.c 2002/07/28 05:05:24 1.6
696
+++ freetype2/src/type42/t42parse.c 2003/05/30 09:12:50 1.7
699
/* Type 42 font parser (body). */
701
-/* Copyright 2002 by Roberto Alameda. */
702
+/* Copyright 2002, 2003 by Roberto Alameda. */
704
/* This file is part of the FreeType project, and may only be used, */
705
/* modified, and distributed under the terms of the FreeType project */
708
#define T1CODE T1_FIELD_LOCATION_FONT_INFO
710
- T1_FIELD_STRING ( "version", version )
711
- T1_FIELD_STRING ( "Notice", notice )
712
- T1_FIELD_STRING ( "FullName", full_name )
713
- T1_FIELD_STRING ( "FamilyName", family_name )
714
- T1_FIELD_STRING ( "Weight", weight )
715
- T1_FIELD_NUM ( "ItalicAngle", italic_angle )
716
- T1_FIELD_TYPE_BOOL( "isFixedPitch", is_fixed_pitch )
717
- T1_FIELD_NUM ( "UnderlinePosition", underline_position )
718
- T1_FIELD_NUM ( "UnderlineThickness", underline_thickness )
719
+ T1_FIELD_STRING ( "version", version )
720
+ T1_FIELD_STRING ( "Notice", notice )
721
+ T1_FIELD_STRING ( "FullName", full_name )
722
+ T1_FIELD_STRING ( "FamilyName", family_name )
723
+ T1_FIELD_STRING ( "Weight", weight )
724
+ T1_FIELD_FIXED_P ( "ItalicAngle", italic_angle )
725
+ T1_FIELD_TYPE_BOOL_P( "isFixedPitch", is_fixed_pitch )
726
+ T1_FIELD_FIXED_P ( "UnderlinePosition", underline_position )
727
+ T1_FIELD_FIXED_P ( "UnderlineThickness", underline_thickness )
730
#define FT_STRUCTURE T1_FontRec
732
#define T1CODE T1_FIELD_LOCATION_FONT_DICT
734
- T1_FIELD_NUM( "PaintType", paint_type )
735
- T1_FIELD_NUM( "FontType", font_type )
736
- T1_FIELD_NUM( "StrokeWidth", stroke_width )
737
+ T1_FIELD_NUM_P ( "PaintType", paint_type )
738
+ T1_FIELD_NUM ( "FontType", font_type )
739
+ T1_FIELD_FIXED_P( "StrokeWidth", stroke_width )
741
T1_FIELD_CALLBACK( "FontName", t42_parse_font_name )
742
T1_FIELD_CALLBACK( "FontBBox", t42_parse_font_bbox )