ReactOS  0.4.14-dev-41-g31d7680
t1gload.c
Go to the documentation of this file.
1 /***************************************************************************/
2 /* */
3 /* t1gload.c */
4 /* */
5 /* Type 1 Glyph Loader (body). */
6 /* */
7 /* Copyright 1996-2018 by */
8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */
9 /* */
10 /* This file is part of the FreeType project, and may only be used, */
11 /* modified, and distributed under the terms of the FreeType project */
12 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
13 /* this file you indicate that you have read the license and */
14 /* understand and accept it fully. */
15 /* */
16 /***************************************************************************/
17 
18 
19 #include <ft2build.h>
20 #include "t1gload.h"
21 #include FT_INTERNAL_CALC_H
22 #include FT_INTERNAL_DEBUG_H
23 #include FT_INTERNAL_STREAM_H
24 #include FT_OUTLINE_H
25 #include FT_INTERNAL_POSTSCRIPT_AUX_H
26 #include FT_INTERNAL_CFF_TYPES_H
27 #include FT_DRIVER_H
28 
29 #include "t1errors.h"
30 
31 
32  /*************************************************************************/
33  /* */
34  /* The macro FT_COMPONENT is used in trace mode. It is an implicit */
35  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */
36  /* messages during execution. */
37  /* */
38 #undef FT_COMPONENT
39 #define FT_COMPONENT trace_t1gload
40 
41 
42  static FT_Error
44  FT_UInt glyph_index,
45  FT_Data* char_string,
46  FT_Bool* force_scaling )
47  {
48  T1_Face face = (T1_Face)decoder->builder.face;
49  T1_Font type1 = &face->type1;
51 
52  PSAux_Service psaux = (PSAux_Service)face->psaux;
53  const T1_Decoder_Funcs decoder_funcs = psaux->t1_decoder_funcs;
54  PS_Decoder psdecoder;
55 
56 #ifdef FT_CONFIG_OPTION_INCREMENTAL
58  face->root.internal->incremental_interface;
59 #endif
60 
61 #ifdef T1_CONFIG_OPTION_OLD_ENGINE
63 #endif
64 
65  decoder->font_matrix = type1->font_matrix;
66  decoder->font_offset = type1->font_offset;
67 
68 #ifdef FT_CONFIG_OPTION_INCREMENTAL
69 
70  /* For incremental fonts get the character data using the */
71  /* callback function. */
72  if ( inc )
73  error = inc->funcs->get_glyph_data( inc->object,
74  glyph_index, char_string );
75  else
76 
77 #endif /* FT_CONFIG_OPTION_INCREMENTAL */
78 
79  /* For ordinary fonts get the character data stored in the face record. */
80  {
81  char_string->pointer = type1->charstrings[glyph_index];
82  char_string->length = (FT_Int)type1->charstrings_len[glyph_index];
83  }
84 
85  if ( !error )
86  {
87  /* choose which renderer to use */
88 #ifdef T1_CONFIG_OPTION_OLD_ENGINE
89  if ( driver->hinting_engine == FT_HINTING_FREETYPE ||
90  decoder->builder.metrics_only )
91  error = decoder_funcs->parse_charstrings_old(
92  decoder,
93  (FT_Byte*)char_string->pointer,
94  (FT_UInt)char_string->length );
95 #else
96  if ( decoder->builder.metrics_only )
97  error = decoder_funcs->parse_metrics(
98  decoder,
99  (FT_Byte*)char_string->pointer,
100  (FT_UInt)char_string->length );
101 #endif
102  else
103  {
104  CFF_SubFontRec subfont;
105 
106 
107  psaux->ps_decoder_init( &psdecoder, decoder, TRUE );
108 
109  psaux->t1_make_subfont( FT_FACE( face ),
110  &face->type1.private_dict, &subfont );
111  psdecoder.current_subfont = &subfont;
112 
113  error = decoder_funcs->parse_charstrings(
114  &psdecoder,
115  (FT_Byte*)char_string->pointer,
116  (FT_ULong)char_string->length );
117 
118  /* Adobe's engine uses 16.16 numbers everywhere; */
119  /* as a consequence, glyphs larger than 2000ppem get rejected */
120  if ( FT_ERR_EQ( error, Glyph_Too_Big ) )
121  {
122  /* this time, we retry unhinted and scale up the glyph later on */
123  /* (the engine uses and sets the hardcoded value 0x10000 / 64 = */
124  /* 0x400 for both `x_scale' and `y_scale' in this case) */
125  ((T1_GlyphSlot)decoder->builder.glyph)->hint = FALSE;
126 
127  *force_scaling = TRUE;
128 
129  error = decoder_funcs->parse_charstrings(
130  &psdecoder,
131  (FT_Byte*)char_string->pointer,
132  (FT_ULong)char_string->length );
133  }
134  }
135  }
136 
137 #ifdef FT_CONFIG_OPTION_INCREMENTAL
138 
139  /* Incremental fonts can optionally override the metrics. */
140  if ( !error && inc && inc->funcs->get_glyph_metrics )
141  {
143 
144 
145  metrics.bearing_x = FIXED_TO_INT( decoder->builder.left_bearing.x );
146  metrics.bearing_y = 0;
147  metrics.advance = FIXED_TO_INT( decoder->builder.advance.x );
148  metrics.advance_v = FIXED_TO_INT( decoder->builder.advance.y );
149 
150  error = inc->funcs->get_glyph_metrics( inc->object,
151  glyph_index, FALSE, &metrics );
152 
153  decoder->builder.left_bearing.x = INT_TO_FIXED( metrics.bearing_x );
154  decoder->builder.advance.x = INT_TO_FIXED( metrics.advance );
155  decoder->builder.advance.y = INT_TO_FIXED( metrics.advance_v );
156  }
157 
158 #endif /* FT_CONFIG_OPTION_INCREMENTAL */
159 
160  return error;
161  }
162 
163 
166  FT_UInt glyph_index )
167  {
168  FT_Data glyph_data;
169  FT_Bool force_scaling = FALSE;
171  decoder, glyph_index, &glyph_data,
172  &force_scaling );
173 
174 
175 #ifdef FT_CONFIG_OPTION_INCREMENTAL
176 
177  if ( !error )
178  {
179  T1_Face face = (T1_Face)decoder->builder.face;
180 
181 
182  if ( face->root.internal->incremental_interface )
183  face->root.internal->incremental_interface->funcs->free_glyph_data(
184  face->root.internal->incremental_interface->object,
185  &glyph_data );
186  }
187 
188 #endif /* FT_CONFIG_OPTION_INCREMENTAL */
189 
190  return error;
191  }
192 
193 
194  /*************************************************************************/
195  /*************************************************************************/
196  /*************************************************************************/
197  /********** *********/
198  /********** COMPUTE THE MAXIMUM ADVANCE WIDTH *********/
199  /********** *********/
200  /********** The following code is in charge of computing *********/
201  /********** the maximum advance width of the font. It *********/
202  /********** quickly processes each glyph charstring to *********/
203  /********** extract the value from either a `sbw' or `seac' *********/
204  /********** operator. *********/
205  /********** *********/
206  /*************************************************************************/
207  /*************************************************************************/
208  /*************************************************************************/
209 
210 
213  FT_Pos* max_advance )
214  {
215  FT_Error error;
216 #ifdef __REACTOS__
217  T1_DecoderRec *decoder = malloc(sizeof(T1_DecoderRec));
218  if (!decoder)
219  return FT_THROW( Out_Of_Memory );
220  {
221 /* Ugly but it allows us to reduce the diff */
222 #define decoder (*decoder)
223 #else
224  T1_DecoderRec decoder;
225 #endif
226  FT_Int glyph_index;
227  T1_Font type1 = &face->type1;
228  PSAux_Service psaux = (PSAux_Service)face->psaux;
229 
230 
231  FT_ASSERT( ( face->len_buildchar == 0 ) == ( face->buildchar == NULL ) );
232 
233  *max_advance = 0;
234 
235  /* initialize load decoder */
236  error = psaux->t1_decoder_funcs->init( &decoder,
237  (FT_Face)face,
238  0, /* size */
239  0, /* glyph slot */
240  (FT_Byte**)type1->glyph_names,
241  face->blend,
242  0,
244  T1_Parse_Glyph );
245  if ( error )
246 #ifdef __REACTOS__
247  {
248  free(&decoder);
249  return error;
250  }
251 #else
252  return error;
253 #endif
254 
255  decoder.builder.metrics_only = 1;
256  decoder.builder.load_points = 0;
257 
258  decoder.num_subrs = type1->num_subrs;
259  decoder.subrs = type1->subrs;
260  decoder.subrs_len = type1->subrs_len;
261  decoder.subrs_hash = type1->subrs_hash;
262 
263  decoder.buildchar = face->buildchar;
264  decoder.len_buildchar = face->len_buildchar;
265 
266  *max_advance = 0;
267 
268  /* for each glyph, parse the glyph charstring and extract */
269  /* the advance width */
270  for ( glyph_index = 0; glyph_index < type1->num_glyphs; glyph_index++ )
271  {
272  /* now get load the unscaled outline */
273  (void)T1_Parse_Glyph( &decoder, (FT_UInt)glyph_index );
274  if ( glyph_index == 0 || decoder.builder.advance.x > *max_advance )
275  *max_advance = decoder.builder.advance.x;
276 
277  /* ignore the error if one occurred - skip to next glyph */
278  }
279 
280  psaux->t1_decoder_funcs->done( &decoder );
281 
282 #ifdef __REACTOS__
283  free(&decoder);
284 #undef decoder
285  }
286 #endif
287  return FT_Err_Ok;
288  }
289 
290 
292  T1_Get_Advances( FT_Face t1face, /* T1_Face */
293  FT_UInt first,
294  FT_UInt count,
295  FT_Int32 load_flags,
296  FT_Fixed* advances )
297  {
298  T1_Face face = (T1_Face)t1face;
299 #ifdef __REACTOS__
300  T1_DecoderRec *decoder = malloc(sizeof(T1_DecoderRec));
301  if (!decoder)
302  return FT_THROW( Out_Of_Memory );
303 /* Ugly but it allows us to reduce the diff */
304 #define decoder (*decoder)
305  {
306 #else
307  T1_DecoderRec decoder;
308 #endif
309  T1_Font type1 = &face->type1;
310  PSAux_Service psaux = (PSAux_Service)face->psaux;
311  FT_UInt nn;
312  FT_Error error;
313 
314 
315  if ( load_flags & FT_LOAD_VERTICAL_LAYOUT )
316  {
317  for ( nn = 0; nn < count; nn++ )
318  advances[nn] = 0;
319 
320 #ifdef __REACTOS__
321  free(&decoder);
322 #endif
323  return FT_Err_Ok;
324  }
325 
326  error = psaux->t1_decoder_funcs->init( &decoder,
327  (FT_Face)face,
328  0, /* size */
329  0, /* glyph slot */
330  (FT_Byte**)type1->glyph_names,
331  face->blend,
332  0,
334  T1_Parse_Glyph );
335  if ( error )
336 #ifdef __REACTOS__
337  {
338  free(&decoder);
339  return error;
340  }
341 #else
342  return error;
343 #endif
344 
345  decoder.builder.metrics_only = 1;
346  decoder.builder.load_points = 0;
347 
348  decoder.num_subrs = type1->num_subrs;
349  decoder.subrs = type1->subrs;
350  decoder.subrs_len = type1->subrs_len;
351  decoder.subrs_hash = type1->subrs_hash;
352 
353  decoder.buildchar = face->buildchar;
354  decoder.len_buildchar = face->len_buildchar;
355 
356  for ( nn = 0; nn < count; nn++ )
357  {
358  error = T1_Parse_Glyph( &decoder, first + nn );
359  if ( !error )
360  advances[nn] = FIXED_TO_INT( decoder.builder.advance.x );
361  else
362  advances[nn] = 0;
363  }
364 
365 #ifdef __REACTOS__
366  free(&decoder);
367 #undef decoder
368  }
369 #endif
370  return FT_Err_Ok;
371  }
372 
373 
375  T1_Load_Glyph( FT_GlyphSlot t1glyph, /* T1_GlyphSlot */
376  FT_Size t1size, /* T1_Size */
377  FT_UInt glyph_index,
378  FT_Int32 load_flags )
379  {
380  T1_GlyphSlot glyph = (T1_GlyphSlot)t1glyph;
381  FT_Error error;
382 #ifdef __REACTOS__
383  T1_DecoderRec *decoder = malloc(sizeof(T1_DecoderRec));
384  if (!decoder)
385  return FT_THROW( Out_Of_Memory );
386 /* Ugly but it allows us to reduce the diff */
387 #define decoder (*decoder)
388  {
389 #else
390  T1_DecoderRec decoder;
391 #endif
392  T1_Face face = (T1_Face)t1glyph->face;
393  FT_Bool hinting;
394  FT_Bool scaled;
395  FT_Bool force_scaling = FALSE;
396  T1_Font type1 = &face->type1;
397  PSAux_Service psaux = (PSAux_Service)face->psaux;
398  const T1_Decoder_Funcs decoder_funcs = psaux->t1_decoder_funcs;
399 
400  FT_Matrix font_matrix;
401  FT_Vector font_offset;
402  FT_Data glyph_data;
403  FT_Bool must_finish_decoder = FALSE;
404 #ifdef FT_CONFIG_OPTION_INCREMENTAL
405  FT_Bool glyph_data_loaded = 0;
406 #endif
407 
408 
409 #ifdef FT_CONFIG_OPTION_INCREMENTAL
410  if ( glyph_index >= (FT_UInt)face->root.num_glyphs &&
411  !face->root.internal->incremental_interface )
412 #else
413  if ( glyph_index >= (FT_UInt)face->root.num_glyphs )
414 #endif /* FT_CONFIG_OPTION_INCREMENTAL */
415  {
416  error = FT_THROW( Invalid_Argument );
417  goto Exit;
418  }
419 
420  FT_TRACE1(( "T1_Load_Glyph: glyph index %d\n", glyph_index ));
421 
422  FT_ASSERT( ( face->len_buildchar == 0 ) == ( face->buildchar == NULL ) );
423 
424  if ( load_flags & FT_LOAD_NO_RECURSE )
425  load_flags |= FT_LOAD_NO_SCALE | FT_LOAD_NO_HINTING;
426 
427  if ( t1size )
428  {
429  glyph->x_scale = t1size->metrics.x_scale;
430  glyph->y_scale = t1size->metrics.y_scale;
431  }
432  else
433  {
434  glyph->x_scale = 0x10000L;
435  glyph->y_scale = 0x10000L;
436  }
437 
438  t1glyph->outline.n_points = 0;
439  t1glyph->outline.n_contours = 0;
440 
441  hinting = FT_BOOL( ( load_flags & FT_LOAD_NO_SCALE ) == 0 &&
442  ( load_flags & FT_LOAD_NO_HINTING ) == 0 );
443  scaled = FT_BOOL( ( load_flags & FT_LOAD_NO_SCALE ) == 0 );
444 
445  glyph->hint = hinting;
446  glyph->scaled = scaled;
447  t1glyph->format = FT_GLYPH_FORMAT_OUTLINE;
448 
449  error = decoder_funcs->init( &decoder,
450  t1glyph->face,
451  t1size,
452  t1glyph,
453  (FT_Byte**)type1->glyph_names,
454  face->blend,
455  FT_BOOL( hinting ),
456  FT_LOAD_TARGET_MODE( load_flags ),
457  T1_Parse_Glyph );
458  if ( error )
459  goto Exit;
460 
461  must_finish_decoder = TRUE;
462 
463  decoder.builder.no_recurse = FT_BOOL(
464  ( load_flags & FT_LOAD_NO_RECURSE ) != 0 );
465 
466  decoder.num_subrs = type1->num_subrs;
467  decoder.subrs = type1->subrs;
468  decoder.subrs_len = type1->subrs_len;
469  decoder.subrs_hash = type1->subrs_hash;
470 
471  decoder.buildchar = face->buildchar;
472  decoder.len_buildchar = face->len_buildchar;
473 
474  /* now load the unscaled outline */
475  error = T1_Parse_Glyph_And_Get_Char_String( &decoder, glyph_index,
476  &glyph_data,
477  &force_scaling );
478  if ( error )
479  goto Exit;
480 #ifdef FT_CONFIG_OPTION_INCREMENTAL
481  glyph_data_loaded = 1;
482 #endif
483 
484  hinting = glyph->hint;
485  font_matrix = decoder.font_matrix;
486  font_offset = decoder.font_offset;
487 
488  /* save new glyph tables */
489  decoder_funcs->done( &decoder );
490 
491  must_finish_decoder = FALSE;
492 
493  /* now, set the metrics -- this is rather simple, as */
494  /* the left side bearing is the xMin, and the top side */
495  /* bearing the yMax */
496  if ( !error )
497  {
498  t1glyph->outline.flags &= FT_OUTLINE_OWNER;
499  t1glyph->outline.flags |= FT_OUTLINE_REVERSE_FILL;
500 
501  /* for composite glyphs, return only left side bearing and */
502  /* advance width */
503  if ( load_flags & FT_LOAD_NO_RECURSE )
504  {
505  FT_Slot_Internal internal = t1glyph->internal;
506 
507 
508  t1glyph->metrics.horiBearingX =
509  FIXED_TO_INT( decoder.builder.left_bearing.x );
510  t1glyph->metrics.horiAdvance =
511  FIXED_TO_INT( decoder.builder.advance.x );
512 
513  internal->glyph_matrix = font_matrix;
514  internal->glyph_delta = font_offset;
515  internal->glyph_transformed = 1;
516  }
517  else
518  {
519  FT_BBox cbox;
520  FT_Glyph_Metrics* metrics = &t1glyph->metrics;
521 
522 
523  /* copy the _unscaled_ advance width */
524  metrics->horiAdvance =
525  FIXED_TO_INT( decoder.builder.advance.x );
526  t1glyph->linearHoriAdvance =
527  FIXED_TO_INT( decoder.builder.advance.x );
528  t1glyph->internal->glyph_transformed = 0;
529 
530  if ( load_flags & FT_LOAD_VERTICAL_LAYOUT )
531  {
532  /* make up vertical ones */
533  metrics->vertAdvance = ( face->type1.font_bbox.yMax -
534  face->type1.font_bbox.yMin ) >> 16;
535  t1glyph->linearVertAdvance = metrics->vertAdvance;
536  }
537  else
538  {
539  metrics->vertAdvance =
540  FIXED_TO_INT( decoder.builder.advance.y );
541  t1glyph->linearVertAdvance =
542  FIXED_TO_INT( decoder.builder.advance.y );
543  }
544 
545  t1glyph->format = FT_GLYPH_FORMAT_OUTLINE;
546 
547  if ( t1size && t1size->metrics.y_ppem < 24 )
548  t1glyph->outline.flags |= FT_OUTLINE_HIGH_PRECISION;
549 
550 #if 1
551  /* apply the font matrix, if any */
552  if ( font_matrix.xx != 0x10000L || font_matrix.yy != 0x10000L ||
553  font_matrix.xy != 0 || font_matrix.yx != 0 )
554  {
555  FT_Outline_Transform( &t1glyph->outline, &font_matrix );
556 
557  metrics->horiAdvance = FT_MulFix( metrics->horiAdvance,
558  font_matrix.xx );
559  metrics->vertAdvance = FT_MulFix( metrics->vertAdvance,
560  font_matrix.yy );
561  }
562 
563  if ( font_offset.x || font_offset.y )
564  {
565  FT_Outline_Translate( &t1glyph->outline,
566  font_offset.x,
567  font_offset.y );
568 
569  metrics->horiAdvance += font_offset.x;
570  metrics->vertAdvance += font_offset.y;
571  }
572 #endif
573 
574  if ( ( load_flags & FT_LOAD_NO_SCALE ) == 0 || force_scaling )
575  {
576  /* scale the outline and the metrics */
577  FT_Int n;
578  FT_Outline* cur = decoder.builder.base;
579  FT_Vector* vec = cur->points;
580  FT_Fixed x_scale = glyph->x_scale;
581  FT_Fixed y_scale = glyph->y_scale;
582 
583 
584  /* First of all, scale the points, if we are not hinting */
585  if ( !hinting || ! decoder.builder.hints_funcs )
586  for ( n = cur->n_points; n > 0; n--, vec++ )
587  {
588  vec->x = FT_MulFix( vec->x, x_scale );
589  vec->y = FT_MulFix( vec->y, y_scale );
590  }
591 
592  /* Then scale the metrics */
593  metrics->horiAdvance = FT_MulFix( metrics->horiAdvance, x_scale );
594  metrics->vertAdvance = FT_MulFix( metrics->vertAdvance, y_scale );
595  }
596 
597  /* compute the other metrics */
598  FT_Outline_Get_CBox( &t1glyph->outline, &cbox );
599 
600  metrics->width = cbox.xMax - cbox.xMin;
601  metrics->height = cbox.yMax - cbox.yMin;
602 
603  metrics->horiBearingX = cbox.xMin;
604  metrics->horiBearingY = cbox.yMax;
605 
606  if ( load_flags & FT_LOAD_VERTICAL_LAYOUT )
607  {
608  /* make up vertical ones */
610  metrics->vertAdvance );
611  }
612  }
613 
614  /* Set control data to the glyph charstrings. Note that this is */
615  /* _not_ zero-terminated. */
616  t1glyph->control_data = (FT_Byte*)glyph_data.pointer;
617  t1glyph->control_len = glyph_data.length;
618  }
619 
620 
621  Exit:
622 
623 #ifdef FT_CONFIG_OPTION_INCREMENTAL
624  if ( glyph_data_loaded && face->root.internal->incremental_interface )
625  {
626  face->root.internal->incremental_interface->funcs->free_glyph_data(
627  face->root.internal->incremental_interface->object,
628  &glyph_data );
629 
630  /* Set the control data to null - it is no longer available if */
631  /* loaded incrementally. */
632  t1glyph->control_data = NULL;
633  t1glyph->control_len = 0;
634  }
635 #endif
636 
637  if ( must_finish_decoder )
638  decoder_funcs->done( &decoder );
639 
640 #ifdef __REACTOS__
641  free(&decoder);
642 #undef decoder
643  }
644 #endif
645  return error;
646  }
647 
648 
649 /* END */
#define FIXED_TO_INT(x)
Definition: ftcalc.h:406
FT_Int length
Definition: fttypes.h:409
int FT_Error
Definition: fttypes.h:300
struct T1_GlyphSlotRec_ * T1_GlyphSlot
Definition: t1objs.h:56
#define FT_LOAD_VERTICAL_LAYOUT
Definition: freetype.h:3013
FT_Pos y
Definition: ftimage.h:77
#define TRUE
Definition: types.h:120
unsigned long FT_ULong
Definition: fttypes.h:253
FT_Vector advance
Definition: psaux.h:793
struct T1_FaceRec_ * T1_Face
Definition: t1types.h:196
FT_BEGIN_HEADER typedef signed long FT_Pos
Definition: ftimage.h:58
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
FT_Byte ** glyph_names
Definition: psaux.h:905
FT_UInt * subrs_len
Definition: t1types.h:110
#define FT_HINTING_FREETYPE
Definition: ftdriver.h:345
ft_synthesize_vertical_metrics(FT_Glyph_Metrics *metrics, FT_Pos advance)
Definition: ftobjs.c:2933
FT_UInt * subrs_len
Definition: psaux.h:910
#define error(str)
Definition: mkdosfs.c:1605
GLsizei GLenum const GLvoid GLuint GLsizei GLfloat * metrics
Definition: glext.h:11745
FT_Outline * base
Definition: psaux.h:786
FT_Pos x
Definition: ftimage.h:76
T1_Load_Glyph(FT_GlyphSlot t1glyph, FT_Size t1size, FT_UInt glyph_index, FT_Int32 load_flags)
Definition: t1gload.c:375
signed int FT_Int
Definition: fttypes.h:220
GLuint GLuint GLsizei count
Definition: gl.h:1545
FT_GlyphSlot glyph
Definition: psaux.h:784
#define free
Definition: debug_ros.c:5
const GLint * first
Definition: glext.h:5794
FT_String ** glyph_names
Definition: t1types.h:114
#define FT_LOAD_NO_HINTING
Definition: freetype.h:3010
CFF_SubFont current_subfont
Definition: psaux.h:614
FT_Bool metrics_only
Definition: psaux.h:800
GLdouble n
Definition: glext.h:7729
FT_Error(* parse_charstrings)(PS_Decoder *decoder, FT_Byte *charstring_base, FT_ULong charstring_len)
Definition: psaux.h:885
FT_Fixed x_scale
Definition: t1objs.h:123
#define FT_LOAD_NO_RECURSE
Definition: freetype.h:3018
const FT_Byte * pointer
Definition: fttypes.h:408
FT_Byte ** subrs
Definition: t1types.h:109
void(* done)(T1_Decoder decoder)
Definition: psaux.h:870
return FT_Err_Ok
Definition: ftbbox.c:511
FT_Incremental_GetGlyphDataFunc get_glyph_data
Definition: ftincrem.h:272
FT_BEGIN_HEADER struct PS_DriverRec_ * PS_Driver
#define FT_FACE_DRIVER(x)
Definition: ftobjs.h:634
FT_BEGIN_HEADER typedef unsigned char FT_Bool
Definition: fttypes.h:108
#define FT_LOAD_NO_SCALE
Definition: freetype.h:3009
FT_Bool no_recurse
Definition: psaux.h:798
#define FT_TRACE1(varformat)
Definition: ftdebug.h:158
FT_Vector * points
Definition: ftimage.h:339
FT_Int num_glyphs
Definition: t1types.h:113
FT_Fixed xx
Definition: fttypes.h:387
const T1_Decoder_FuncsRec * t1_decoder_funcs
Definition: psaux.h:1284
unsigned char FT_Byte
Definition: fttypes.h:154
#define FT_ASSERT(condition)
Definition: ftdebug.h:211
#define FT_THROW(e)
Definition: ftdebug.h:213
struct @1605::@1606 driver
static FT_Error T1_Parse_Glyph_And_Get_Char_String(T1_Decoder decoder, FT_UInt glyph_index, FT_Data *char_string, FT_Bool *force_scaling)
Definition: t1gload.c:43
FT_Outline_Get_CBox(const FT_Outline *outline, FT_BBox *acbox)
Definition: ftoutln.c:478
smooth NULL
Definition: ftsmooth.c:416
FT_Pos yMax
Definition: ftimage.h:118
FT_Bool scaled
Definition: t1objs.h:121
FT_Outline_Transform(const FT_Outline *outline, const FT_Matrix *matrix)
Definition: ftoutln.c:711
#define FT_LOCAL_DEF(x)
Definition: ftconfig.h:388
FT_Fixed y_scale
Definition: t1objs.h:124
FT_Long * buildchar
Definition: psaux.h:927
#define FT_OUTLINE_HIGH_PRECISION
Definition: ftimage.h:435
smooth FT_Module_Constructor FT_Module_Destructor FT_Module_Requester FT_GLYPH_FORMAT_OUTLINE
Definition: ftsmooth.c:416
FT_Pos xMin
Definition: ftimage.h:117
if(!(yy_init))
Definition: macro.lex.yy.c:714
struct PSAux_ServiceRec_ * PSAux_Service
FT_Face face
Definition: psaux.h:783
static void Exit(void)
Definition: sock.c:1331
#define FT_ERR_EQ(x, e)
Definition: fttypes.h:591
FT_Pos xMax
Definition: ftimage.h:118
T1_BuilderRec builder
Definition: psaux.h:895
FT_Bool hint
Definition: t1objs.h:120
FT_Incremental_GetGlyphMetricsFunc get_glyph_metrics
Definition: ftincrem.h:274
FT_Vector * vec
Definition: ftbbox.c:448
FT_Byte ** subrs
Definition: psaux.h:909
#define FT_CALLBACK_DEF(x)
Definition: ftconfig.h:533
#define FT_OUTLINE_OWNER
Definition: ftimage.h:428
FT_Vector left_bearing
Definition: psaux.h:792
static const WCHAR L[]
Definition: oid.c:1250
#define FT_BOOL(x)
Definition: fttypes.h:578
FT_Error(* init)(T1_Decoder decoder, FT_Face face, FT_Size size, FT_GlyphSlot slot, FT_Byte **glyph_names, PS_Blend blend, FT_Bool hinting, FT_Render_Mode hint_mode, T1_Decoder_Callback callback)
Definition: psaux.h:859
FT_Hash subrs_hash
Definition: t1types.h:111
FT_MulFix(FT_Long a, FT_Long b)
Definition: ftcalc.c:509
void * hints_funcs
Definition: psaux.h:802
FT_Matrix font_matrix
Definition: psaux.h:913
signed long FT_Fixed
Definition: fttypes.h:288
short n_points
Definition: ftimage.h:337
FT_BEGIN_HEADER struct FT_Glyph_Metrics_ FT_Glyph_Metrics
#define FT_FACE(x)
Definition: ftobjs.h:630
unsigned int FT_UInt
Definition: fttypes.h:231
FT_Int num_subrs
Definition: t1types.h:108
FT_Fixed xy
Definition: fttypes.h:387
FT_Pos yMin
Definition: ftimage.h:117
FT_UInt len_buildchar
Definition: psaux.h:928
T1_Get_Advances(FT_Face t1face, FT_UInt first, FT_UInt count, FT_Int32 load_flags, FT_Fixed *advances)
Definition: t1gload.c:292
FT_Int num_subrs
Definition: psaux.h:908
FT_Bool load_points
Definition: psaux.h:797
FT_Outline_Translate(const FT_Outline *outline, FT_Pos xOffset, FT_Pos yOffset)
Definition: ftoutln.c:528
T1_Compute_Max_Advance(T1_Face face, FT_Pos *max_advance)
Definition: t1gload.c:212
#define malloc
Definition: debug_ros.c:4
FT_Hash subrs_hash
Definition: psaux.h:911
FT_Fixed yx
Definition: fttypes.h:388
FT_Fixed yy
Definition: fttypes.h:388
FT_Vector font_offset
Definition: psaux.h:914
#define INT_TO_FIXED(x)
Definition: ftcalc.h:404
FT_Error(* parse_metrics)(T1_Decoder decoder, FT_Byte *base, FT_UInt len)
Definition: psaux.h:879
const FT_Incremental_FuncsRec * funcs
Definition: ftincrem.h:317
GLenum GLuint GLint GLenum face
Definition: glext.h:7025
#define FT_OUTLINE_REVERSE_FILL
Definition: ftimage.h:430
T1_Parse_Glyph(T1_Decoder decoder, FT_UInt glyph_index)
Definition: t1gload.c:165
#define FT_LOAD_TARGET_MODE(x)
Definition: freetype.h:3137