Visualization Library 2.0.0-b5

A lightweight C++ OpenGL middleware for 2D/3D graphics

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
t42objs.c
Go to the documentation of this file.
1 /***************************************************************************/
2 /* */
3 /* t42objs.c */
4 /* */
5 /* Type 42 objects manager (body). */
6 /* */
7 /* Copyright 2002-2009, 2011, 2013 */
8 /* by Roberto Alameda. */
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 "t42objs.h"
20 #include "t42parse.h"
21 #include "t42error.h"
22 #include FT_INTERNAL_DEBUG_H
23 #include FT_LIST_H
24 #include FT_TRUETYPE_IDS_H
25 
26 
27 #undef FT_COMPONENT
28 #define FT_COMPONENT trace_t42
29 
30 
31  static FT_Error
32  T42_Open_Face( T42_Face face )
33  {
34  T42_LoaderRec loader;
35  T42_Parser parser;
36  T1_Font type1 = &face->type1;
37  FT_Memory memory = face->root.memory;
39 
40  PSAux_Service psaux = (PSAux_Service)face->psaux;
41 
42 
43  t42_loader_init( &loader, face );
44 
45  parser = &loader.parser;
46 
47  if ( FT_ALLOC( face->ttf_data, 12 ) )
48  goto Exit;
49 
50  error = t42_parser_init( parser,
51  face->root.stream,
52  memory,
53  psaux);
54  if ( error )
55  goto Exit;
56 
57  error = t42_parse_dict( face, &loader,
58  parser->base_dict, parser->base_len );
59  if ( error )
60  goto Exit;
61 
62  if ( type1->font_type != 42 )
63  {
64  FT_ERROR(( "T42_Open_Face: cannot handle FontType %d\n",
65  type1->font_type ));
66  error = FT_THROW( Unknown_File_Format );
67  goto Exit;
68  }
69 
70  /* now, propagate the charstrings and glyphnames tables */
71  /* to the Type1 data */
72  type1->num_glyphs = loader.num_glyphs;
73 
74  if ( !loader.charstrings.init )
75  {
76  FT_ERROR(( "T42_Open_Face: no charstrings array in face\n" ));
77  error = FT_THROW( Invalid_File_Format );
78  }
79 
80  loader.charstrings.init = 0;
81  type1->charstrings_block = loader.charstrings.block;
82  type1->charstrings = loader.charstrings.elements;
83  type1->charstrings_len = loader.charstrings.lengths;
84 
85  /* we copy the glyph names `block' and `elements' fields; */
86  /* the `lengths' field must be released later */
87  type1->glyph_names_block = loader.glyph_names.block;
88  type1->glyph_names = (FT_String**)loader.glyph_names.elements;
89  loader.glyph_names.block = 0;
90  loader.glyph_names.elements = 0;
91 
92  /* we must now build type1.encoding when we have a custom array */
94  {
95  FT_Int charcode, idx, min_char, max_char;
96  FT_Byte* char_name;
97  FT_Byte* glyph_name;
98 
99 
100  /* OK, we do the following: for each element in the encoding */
101  /* table, look up the index of the glyph having the same name */
102  /* as defined in the CharStrings array. */
103  /* The index is then stored in type1.encoding.char_index, and */
104  /* the name in type1.encoding.char_name */
105 
106  min_char = 0;
107  max_char = 0;
108 
109  charcode = 0;
110  for ( ; charcode < loader.encoding_table.max_elems; charcode++ )
111  {
112  type1->encoding.char_index[charcode] = 0;
113  type1->encoding.char_name [charcode] = (char *)".notdef";
114 
115  char_name = loader.encoding_table.elements[charcode];
116  if ( char_name )
117  for ( idx = 0; idx < type1->num_glyphs; idx++ )
118  {
119  glyph_name = (FT_Byte*)type1->glyph_names[idx];
120  if ( ft_strcmp( (const char*)char_name,
121  (const char*)glyph_name ) == 0 )
122  {
123  type1->encoding.char_index[charcode] = (FT_UShort)idx;
124  type1->encoding.char_name [charcode] = (char*)glyph_name;
125 
126  /* Change min/max encoded char only if glyph name is */
127  /* not /.notdef */
128  if ( ft_strcmp( (const char*)".notdef",
129  (const char*)glyph_name ) != 0 )
130  {
131  if ( charcode < min_char )
132  min_char = charcode;
133  if ( charcode >= max_char )
134  max_char = charcode + 1;
135  }
136  break;
137  }
138  }
139  }
140 
141  type1->encoding.code_first = min_char;
142  type1->encoding.code_last = max_char;
143  type1->encoding.num_chars = loader.num_chars;
144  }
145 
146  Exit:
147  t42_loader_done( &loader );
148  return error;
149  }
150 
151 
152  /***************** Driver Functions *************/
153 
154 
157  FT_Face t42face, /* T42_Face */
158  FT_Int face_index,
159  FT_Int num_params,
161  {
162  T42_Face face = (T42_Face)t42face;
163  FT_Error error;
164  FT_Service_PsCMaps psnames;
165  PSAux_Service psaux;
166  FT_Face root = (FT_Face)&face->root;
167  T1_Font type1 = &face->type1;
168  PS_FontInfo info = &type1->font_info;
169 
170  FT_UNUSED( num_params );
171  FT_UNUSED( params );
172  FT_UNUSED( face_index );
173  FT_UNUSED( stream );
174 
175 
176  face->ttf_face = NULL;
177  face->root.num_faces = 1;
178 
179  FT_FACE_FIND_GLOBAL_SERVICE( face, psnames, POSTSCRIPT_CMAPS );
180  face->psnames = psnames;
181 
183  "psaux" );
184  psaux = (PSAux_Service)face->psaux;
185  if ( !psaux )
186  {
187  FT_ERROR(( "T42_Face_Init: cannot access `psaux' module\n" ));
188  error = FT_THROW( Missing_Module );
189  goto Exit;
190  }
191 
192  FT_TRACE2(( "Type 42 driver\n" ));
193 
194  /* open the tokenizer, this will also check the font format */
195  error = T42_Open_Face( face );
196  if ( error )
197  goto Exit;
198 
199  /* if we just wanted to check the format, leave successfully now */
200  if ( face_index < 0 )
201  goto Exit;
202 
203  /* check the face index */
204  if ( face_index > 0 )
205  {
206  FT_ERROR(( "T42_Face_Init: invalid face index\n" ));
207  error = FT_THROW( Invalid_Argument );
208  goto Exit;
209  }
210 
211  /* Now load the font program into the face object */
212 
213  /* Init the face object fields */
214  /* Now set up root face fields */
215 
216  root->num_glyphs = type1->num_glyphs;
217  root->num_charmaps = 0;
218  root->face_index = 0;
219 
223 
224  if ( info->is_fixed_pitch )
226 
227  /* We only set this flag if we have the patented bytecode interpreter. */
228  /* There are no known `tricky' Type42 fonts that could be loaded with */
229  /* the unpatented interpreter. */
230 #ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
232 #endif
233 
234  /* XXX: TODO -- add kerning with .afm support */
235 
236  /* get style name -- be careful, some broken fonts only */
237  /* have a `/FontName' dictionary entry! */
238  root->family_name = info->family_name;
239  /* assume "Regular" style if we don't know better */
240  root->style_name = (char *)"Regular";
241  if ( root->family_name )
242  {
243  char* full = info->full_name;
244  char* family = root->family_name;
245 
246 
247  if ( full )
248  {
249  while ( *full )
250  {
251  if ( *full == *family )
252  {
253  family++;
254  full++;
255  }
256  else
257  {
258  if ( *full == ' ' || *full == '-' )
259  full++;
260  else if ( *family == ' ' || *family == '-' )
261  family++;
262  else
263  {
264  if ( !*family )
265  root->style_name = full;
266  break;
267  }
268  }
269  }
270  }
271  }
272  else
273  {
274  /* do we have a `/FontName'? */
275  if ( type1->font_name )
276  root->family_name = type1->font_name;
277  }
278 
279  /* no embedded bitmap support */
280  root->num_fixed_sizes = 0;
281  root->available_sizes = 0;
282 
283  /* Load the TTF font embedded in the T42 font */
284  {
285  FT_Open_Args args;
286 
287 
288  args.flags = FT_OPEN_MEMORY;
289  args.memory_base = face->ttf_data;
290  args.memory_size = face->ttf_size;
291 
292  if ( num_params )
293  {
294  args.flags |= FT_OPEN_PARAMS;
295  args.num_params = num_params;
296  args.params = params;
297  }
298 
300  &args, 0, &face->ttf_face );
301  }
302 
303  if ( error )
304  goto Exit;
305 
306  FT_Done_Size( face->ttf_face->size );
307 
308  /* Ignore info in FontInfo dictionary and use the info from the */
309  /* loaded TTF font. The PostScript interpreter also ignores it. */
310  root->bbox = face->ttf_face->bbox;
311  root->units_per_EM = face->ttf_face->units_per_EM;
312 
313  root->ascender = face->ttf_face->ascender;
314  root->descender = face->ttf_face->descender;
315  root->height = face->ttf_face->height;
316 
317  root->max_advance_width = face->ttf_face->max_advance_width;
318  root->max_advance_height = face->ttf_face->max_advance_height;
319 
320  root->underline_position = (FT_Short)info->underline_position;
321  root->underline_thickness = (FT_Short)info->underline_thickness;
322 
323  /* compute style flags */
324  root->style_flags = 0;
325  if ( info->italic_angle )
327 
328  if ( face->ttf_face->style_flags & FT_STYLE_FLAG_BOLD )
330 
331  if ( face->ttf_face->face_flags & FT_FACE_FLAG_VERTICAL )
333 
334  {
335  if ( psnames )
336  {
337  FT_CharMapRec charmap;
338  T1_CMap_Classes cmap_classes = psaux->t1_cmap_classes;
339  FT_CMap_Class clazz;
340 
341 
342  charmap.face = root;
343 
344  /* first of all, try to synthesize a Unicode charmap */
347  charmap.encoding = FT_ENCODING_UNICODE;
348 
349  error = FT_CMap_New( cmap_classes->unicode, NULL, &charmap, NULL );
350  if ( error &&
351  FT_ERR_NEQ( error, No_Unicode_Glyph_Name ) )
352  goto Exit;
353  error = FT_Err_Ok;
354 
355  /* now, generate an Adobe Standard encoding when appropriate */
356  charmap.platform_id = TT_PLATFORM_ADOBE;
357  clazz = NULL;
358 
359  switch ( type1->encoding_type )
360  {
362  charmap.encoding = FT_ENCODING_ADOBE_STANDARD;
364  clazz = cmap_classes->standard;
365  break;
366 
368  charmap.encoding = FT_ENCODING_ADOBE_EXPERT;
370  clazz = cmap_classes->expert;
371  break;
372 
374  charmap.encoding = FT_ENCODING_ADOBE_CUSTOM;
376  clazz = cmap_classes->custom;
377  break;
378 
380  charmap.encoding = FT_ENCODING_ADOBE_LATIN_1;
382  clazz = cmap_classes->unicode;
383  break;
384 
385  default:
386  ;
387  }
388 
389  if ( clazz )
390  error = FT_CMap_New( clazz, NULL, &charmap, NULL );
391 
392 #if 0
393  /* Select default charmap */
394  if ( root->num_charmaps )
395  root->charmap = root->charmaps[0];
396 #endif
397  }
398  }
399  Exit:
400  return error;
401  }
402 
403 
404  FT_LOCAL_DEF( void )
406  {
407  T42_Face face = (T42_Face)t42face;
408  T1_Font type1;
410  FT_Memory memory;
411 
412 
413  if ( !face )
414  return;
415 
416  type1 = &face->type1;
417  info = &type1->font_info;
418  memory = face->root.memory;
419 
420  /* delete internal ttf face prior to freeing face->ttf_data */
421  if ( face->ttf_face )
422  FT_Done_Face( face->ttf_face );
423 
424  /* release font info strings */
425  FT_FREE( info->version );
426  FT_FREE( info->notice );
427  FT_FREE( info->full_name );
428  FT_FREE( info->family_name );
429  FT_FREE( info->weight );
430 
431  /* release top dictionary */
432  FT_FREE( type1->charstrings_len );
433  FT_FREE( type1->charstrings );
434  FT_FREE( type1->glyph_names );
435 
436  FT_FREE( type1->charstrings_block );
437  FT_FREE( type1->glyph_names_block );
438 
439  FT_FREE( type1->encoding.char_index );
440  FT_FREE( type1->encoding.char_name );
441  FT_FREE( type1->font_name );
442 
443  FT_FREE( face->ttf_data );
444 
445 #if 0
446  /* release afm data if present */
447  if ( face->afm_data )
448  T1_Done_AFM( memory, (T1_AFM*)face->afm_data );
449 #endif
450 
451  /* release unicode map, if any */
452  FT_FREE( face->unicode_map.maps );
453  face->unicode_map.num_maps = 0;
454 
455  face->root.family_name = 0;
456  face->root.style_name = 0;
457  }
458 
459 
460  /*************************************************************************/
461  /* */
462  /* <Function> */
463  /* T42_Driver_Init */
464  /* */
465  /* <Description> */
466  /* Initializes a given Type 42 driver object. */
467  /* */
468  /* <Input> */
469  /* driver :: A handle to the target driver object. */
470  /* */
471  /* <Return> */
472  /* FreeType error code. 0 means success. */
473  /* */
475  T42_Driver_Init( FT_Module module ) /* T42_Driver */
476  {
477  T42_Driver driver = (T42_Driver)module;
478  FT_Module ttmodule;
479 
480 
481  ttmodule = FT_Get_Module( module->library, "truetype" );
482  if ( !ttmodule )
483  {
484  FT_ERROR(( "T42_Driver_Init: cannot access `truetype' module\n" ));
485  return FT_THROW( Missing_Module );
486  }
487 
488  driver->ttclazz = (FT_Driver_Class)ttmodule->clazz;
489 
490  return FT_Err_Ok;
491  }
492 
493 
494  FT_LOCAL_DEF( void )
496  {
497  FT_UNUSED( module );
498  }
499 
500 
502  T42_Size_Init( FT_Size size ) /* T42_Size */
503  {
504  T42_Size t42size = (T42_Size)size;
505  FT_Face face = size->face;
506  T42_Face t42face = (T42_Face)face;
507  FT_Size ttsize;
509 
510 
511  error = FT_New_Size( t42face->ttf_face, &ttsize );
512  t42size->ttsize = ttsize;
513 
514  FT_Activate_Size( ttsize );
515 
516  return error;
517  }
518 
519 
521  T42_Size_Request( FT_Size t42size, /* T42_Size */
522  FT_Size_Request req )
523  {
524  T42_Size size = (T42_Size)t42size;
525  T42_Face face = (T42_Face)t42size->face;
526  FT_Error error;
527 
528 
529  FT_Activate_Size( size->ttsize );
530 
531  error = FT_Request_Size( face->ttf_face, req );
532  if ( !error )
533  t42size->metrics = face->ttf_face->size->metrics;
534 
535  return error;
536  }
537 
538 
540  T42_Size_Select( FT_Size t42size, /* T42_Size */
541  FT_ULong strike_index )
542  {
543  T42_Size size = (T42_Size)t42size;
544  T42_Face face = (T42_Face)t42size->face;
545  FT_Error error;
546 
547 
548  FT_Activate_Size( size->ttsize );
549 
550  error = FT_Select_Size( face->ttf_face, (FT_Int)strike_index );
551  if ( !error )
552  t42size->metrics = face->ttf_face->size->metrics;
553 
554  return error;
555 
556  }
557 
558 
559  FT_LOCAL_DEF( void )
560  T42_Size_Done( FT_Size t42size ) /* T42_Size */
561  {
562  T42_Size size = (T42_Size)t42size;
563  FT_Face face = t42size->face;
564  T42_Face t42face = (T42_Face)face;
565  FT_ListNode node;
566 
567 
568  node = FT_List_Find( &t42face->ttf_face->sizes_list, size->ttsize );
569  if ( node )
570  {
571  FT_Done_Size( size->ttsize );
572  size->ttsize = NULL;
573  }
574  }
575 
576 
578  T42_GlyphSlot_Init( FT_GlyphSlot t42slot ) /* T42_GlyphSlot */
579  {
580  T42_GlyphSlot slot = (T42_GlyphSlot)t42slot;
581  FT_Face face = t42slot->face;
582  T42_Face t42face = (T42_Face)face;
583  FT_GlyphSlot ttslot;
585 
586 
587  if ( face->glyph == NULL )
588  {
589  /* First glyph slot for this face */
590  slot->ttslot = t42face->ttf_face->glyph;
591  }
592  else
593  {
594  error = FT_New_GlyphSlot( t42face->ttf_face, &ttslot );
595  slot->ttslot = ttslot;
596  }
597 
598  return error;
599  }
600 
601 
602  FT_LOCAL_DEF( void )
603  T42_GlyphSlot_Done( FT_GlyphSlot t42slot ) /* T42_GlyphSlot */
604  {
605  T42_GlyphSlot slot = (T42_GlyphSlot)t42slot;
606 
607 
608  FT_Done_GlyphSlot( slot->ttslot );
609  }
610 
611 
612  static void
613  t42_glyphslot_clear( FT_GlyphSlot slot )
614  {
615  /* free bitmap if needed */
616  ft_glyphslot_free_bitmap( slot );
617 
618  /* clear all public fields in the glyph slot */
619  FT_ZERO( &slot->metrics );
620  FT_ZERO( &slot->outline );
621  FT_ZERO( &slot->bitmap );
622 
623  slot->bitmap_left = 0;
624  slot->bitmap_top = 0;
625  slot->num_subglyphs = 0;
626  slot->subglyphs = 0;
627  slot->control_data = 0;
628  slot->control_len = 0;
629  slot->other = 0;
630  slot->format = FT_GLYPH_FORMAT_NONE;
631 
632  slot->linearHoriAdvance = 0;
633  slot->linearVertAdvance = 0;
634  }
635 
636 
639  FT_Size size,
640  FT_UInt glyph_index,
641  FT_Int32 load_flags )
642  {
643  FT_Error error;
644  T42_GlyphSlot t42slot = (T42_GlyphSlot)glyph;
645  T42_Size t42size = (T42_Size)size;
646  FT_Driver_Class ttclazz = ((T42_Driver)glyph->face->driver)->ttclazz;
647 
648 
649  t42_glyphslot_clear( t42slot->ttslot );
650  error = ttclazz->load_glyph( t42slot->ttslot,
651  t42size->ttsize,
652  glyph_index,
653  load_flags | FT_LOAD_NO_BITMAP );
654 
655  if ( !error )
656  {
657  glyph->metrics = t42slot->ttslot->metrics;
658 
659  glyph->linearHoriAdvance = t42slot->ttslot->linearHoriAdvance;
660  glyph->linearVertAdvance = t42slot->ttslot->linearVertAdvance;
661 
662  glyph->format = t42slot->ttslot->format;
663  glyph->outline = t42slot->ttslot->outline;
664 
665  glyph->bitmap = t42slot->ttslot->bitmap;
666  glyph->bitmap_left = t42slot->ttslot->bitmap_left;
667  glyph->bitmap_top = t42slot->ttslot->bitmap_top;
668 
669  glyph->num_subglyphs = t42slot->ttslot->num_subglyphs;
670  glyph->subglyphs = t42slot->ttslot->subglyphs;
671 
672  glyph->control_data = t42slot->ttslot->control_data;
673  glyph->control_len = t42slot->ttslot->control_len;
674  }
675 
676  return error;
677  }
678 
679 
680 /* END */
T42_GlyphSlot_Done(FT_GlyphSlot t42slot)
Definition: t42objs.c:603
FT_UShort units_per_EM
Definition: freetype.h:945
const FT_Byte * memory_base
Definition: freetype.h:1839
#define FT_ALLOC(ptr, size)
Definition: ftmemory.h:260
T1_CMap_Classes t1_cmap_classes
Definition: psaux.h:811
int FT_Error
Definition: fttypes.h:296
struct T42_GlyphSlotRec_ * T42_GlyphSlot
GLuint GLuint stream
FT_Driver_Class ttclazz
Definition: t42objs.h:57
T42_Driver_Init(FT_Module module)
Definition: t42objs.c:475
FT_Byte font_type
Definition: t1types.h:117
FT_Int num_fixed_sizes
Definition: freetype.h:932
unsigned long FT_ULong
Definition: fttypes.h:249
FT_Select_Size(FT_Face face, FT_Int strike_index)
Definition: ftobjs.c:2771
T42_Size_Init(FT_Size size)
Definition: t42objs.c:502
PS_TableRec charstrings
Definition: t42parse.h:51
FT_Parameter * params
Definition: freetype.h:1845
FT_CMap_Class expert
Definition: psaux.h:783
#define TT_ADOBE_ID_STANDARD
Definition: ttnameid.h:309
FT_CharMap charmap
Definition: freetype.h:958
#define TT_ADOBE_ID_LATIN_1
Definition: ttnameid.h:312
FT_UInt flags
Definition: freetype.h:1838
#define NULL
Definition: ftobjs.h:61
signed int FT_Int
Definition: fttypes.h:216
t42_parser_init(T42_Parser parser, FT_Stream stream, FT_Memory memory, PSAux_Service psaux)
Definition: t42parse.c:142
FT_Short ascender
Definition: freetype.h:946
FT_Long face_index
Definition: freetype.h:922
FT_Short underline_thickness
Definition: freetype.h:954
FT_Module_Class * clazz
Definition: ftobjs.h:475
FT_CMap_Class standard
Definition: psaux.h:782
#define FT_FACE_FLAG_SCALABLE
Definition: freetype.h:1076
FT_Int num_glyphs
Definition: t1types.h:111
return FT_THROW(Missing_Property)
PS_TableRec glyph_names
Definition: t42parse.h:50
#define FT_OPEN_PARAMS
Definition: freetype.h:1743
#define FT_UNUSED(arg)
Definition: ftconfig.h:76
FT_String * family_name
Definition: freetype.h:929
FT_Short descender
Definition: freetype.h:947
FT_New_GlyphSlot(FT_Face face, FT_GlyphSlot *aslot)
Definition: ftobjs.c:387
FT_CMap_Class custom
Definition: psaux.h:784
FT_BEGIN_HEADER struct T42_SizeRec_ * T42_Size
FT_String * style_name
Definition: freetype.h:930
FT_UShort platform_id
Definition: freetype.h:744
FT_Bitmap_Size * available_sizes
Definition: freetype.h:933
FT_Byte ** charstrings
Definition: t1types.h:113
#define FT_OPEN_MEMORY
Definition: freetype.h:1739
FT_Fixed linearHoriAdvance
Definition: freetype.h:1621
FT_Int bitmap_top
Definition: freetype.h:1629
#define FT_FACE_FIND_GLOBAL_SERVICE(face, ptr, id)
Definition: ftserv.h:133
return FT_Err_Ok
Definition: ftbbox.c:645
T42_GlyphSlot_Load(FT_GlyphSlot glyph, FT_Size size, FT_UInt glyph_index, FT_Int32 load_flags)
Definition: t42objs.c:638
FT_Done_GlyphSlot(FT_GlyphSlot slot)
Definition: ftobjs.c:436
struct T42_DriverRec_ * T42_Driver
#define TT_PLATFORM_MICROSOFT
Definition: ttnameid.h:89
T42_Face_Init(FT_Stream stream, FT_Face t42face, FT_Int face_index, FT_Int num_params, FT_Parameter *params)
Definition: t42objs.c:156
FT_Long init
Definition: psaux.h:125
FT_UShort encoding_id
Definition: freetype.h:745
FT_Face face
Definition: freetype.h:742
FT_BEGIN_HEADER struct T42_FaceRec_ * T42_Face
FT_Short max_advance_height
Definition: freetype.h:951
FT_PtrDist * lengths
Definition: psaux.h:130
GLenum GLuint GLint GLenum face
FT_Outline outline
Definition: freetype.h:1631
FT_UInt num_chars
Definition: t42parse.h:45
FT_Int max_elems
Definition: psaux.h:127
T42_Size_Done(FT_Size t42size)
Definition: t42objs.c:560
T42_GlyphSlot_Init(FT_GlyphSlot t42slot)
Definition: t42objs.c:578
#define FT_ERROR(varformat)
Definition: ftdebug.h:181
unsigned char FT_Byte
Definition: fttypes.h:150
#define FT_STYLE_FLAG_BOLD
Definition: freetype.h:1297
FT_String * notice
Definition: t1tables.h:72
#define FT_FACE_FLAG_VERTICAL
Definition: freetype.h:1081
FT_Bitmap bitmap
Definition: freetype.h:1627
#define TT_ADOBE_ID_CUSTOM
Definition: ttnameid.h:311
T42_Size_Select(FT_Size t42size, FT_ULong strike_index)
Definition: t42objs.c:540
FT_Byte * block
Definition: psaux.h:122
FT_Byte * charstrings_block
Definition: t1types.h:104
FT_Int num_charmaps
Definition: freetype.h:935
#define FT_FREE(ptr)
Definition: ftmemory.h:286
#define FT_FACE_FLAG_FIXED_WIDTH
Definition: freetype.h:1078
FT_String * font_name
Definition: t1types.h:98
FT_Request_Size(FT_Face face, FT_Size_Request req)
Definition: ftobjs.c:2823
FT_UInt idx
Definition: cffcmap.c:127
FT_Error error
Definition: cffdrivr.c:411
FT_UInt num_subglyphs
Definition: freetype.h:1633
#define TT_ADOBE_ID_EXPERT
Definition: ttnameid.h:310
char FT_String
Definition: fttypes.h:183
#define FT_ZERO(p)
Definition: ftmemory.h:210
FT_BEGIN_HEADER FT_List_Find(FT_List list, void *data)
Definition: ftutil.c:242
#define FT_FACE_FLAG_HORIZONTAL
Definition: freetype.h:1080
T42_Size_Request(FT_Size t42size, FT_Size_Request req)
Definition: t42objs.c:521
struct PSAux_ServiceRec_ * PSAux_Service
FT_String * family_name
Definition: t1tables.h:74
FT_UInt num_glyphs
Definition: t42parse.h:49
#define FT_TRACE2(varformat)
Definition: ftdebug.h:159
FT_Activate_Size(FT_Size size)
Definition: ftobjs.c:3766
#define TT_PLATFORM_ADOBE
Definition: ttnameid.h:91
FT_PtrDist * charstrings_len
Definition: t1types.h:114
FT_Done_Size(FT_Size size)
Definition: ftobjs.c:2443
struct FT_FaceRec_ * FT_Face
Definition: freetype.h:403
local int root
Definition: enough.c:171
signed int FT_Int32
Definition: ftconfig.h:132
FT_Int num_params
Definition: freetype.h:1844
PS_TableRec encoding_table
Definition: t42parse.h:46
FT_Encoding encoding
Definition: freetype.h:743
FT_SubGlyph subglyphs
Definition: freetype.h:1634
#define FT_ERR_NEQ(x, e)
Definition: fttypes.h:589
FT_CharMap * charmaps
Definition: freetype.h:936
FT_BBox bbox
Definition: freetype.h:943
FT_Slot_LoadFunc load_glyph
Definition: ftdriver.h:206
PS_FontInfoRec font_info
Definition: t1types.h:95
FT_Byte * glyph_names_block
Definition: t1types.h:105
FT_Size size
Definition: freetype.h:957
signed short FT_Short
Definition: fttypes.h:194
FT_Long face_flags
Definition: freetype.h:924
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
Definition: ftsystem.h:66
T1_EncodingType encoding_type
Definition: t1types.h:100
#define FT_FACE_FLAG_HINTER
Definition: freetype.h:1087
CFF_Driver driver
Definition: cffdrivr.c:585
ft_glyphslot_free_bitmap(FT_GlyphSlot slot)
Definition: ftobjs.c:274
if(!abbox) return FT_THROW(Invalid_Argument)
FT_CMap_New(FT_CMap_Class clazz, FT_Pointer init_data, FT_CharMap charmap, FT_CMap *acmap)
Definition: ftobjs.c:3248
GLenum const GLfloat * params
backing_store_ptr info
Definition: jmemsys.h:181
t42_parse_dict(T42_Face face, T42_Loader loader, FT_Byte *base, FT_Long size)
Definition: t42parse.c:1023
FT_BEGIN_HEADER struct T42_ParserRec_ * T42_Parser
FT_String * version
Definition: t1tables.h:71
FT_Int bitmap_left
Definition: freetype.h:1628
FT_Glyph_Format format
Definition: freetype.h:1625
FT_String * full_name
Definition: t1tables.h:73
FT_Long num_glyphs
Definition: freetype.h:927
t42_loader_done(T42_Loader loader)
Definition: t42parse.c:1171
FT_GlyphSlot glyph
Definition: freetype.h:956
unsigned int FT_UInt
Definition: fttypes.h:227
FT_String * weight
Definition: t1tables.h:75
T42_Face_Done(FT_Face t42face)
Definition: t42objs.c:405
FT_Short height
Definition: freetype.h:948
struct FT_Driver_ClassRec_ * FT_Driver_Class
void * control_data
Definition: freetype.h:1636
FT_Open_Face(FT_Library library, const FT_Open_Args *args, FT_Long face_index, FT_Face *aface)
Definition: ftobjs.c:2005
FT_CMap_Class unicode
Definition: psaux.h:785
FT_Fixed linearVertAdvance
Definition: freetype.h:1622
FT_Glyph_Metrics metrics
Definition: freetype.h:1620
FT_Get_Module(FT_Library library, const char *module_name)
Definition: ftobjs.c:4309
FT_Long style_flags
Definition: freetype.h:925
FT_Get_Module_Interface(FT_Library library, const char *mod_name)
Definition: ftobjs.c:4337
#define TT_MS_ID_UNICODE_CS
Definition: ttnameid.h:280
FT_Done_Face(FT_Face face)
Definition: ftobjs.c:2341
T1_EncodingRec encoding
Definition: t1types.h:101
#define FT_LOAD_NO_BITMAP
Definition: freetype.h:2552
#define FT_STYLE_FLAG_ITALIC
Definition: freetype.h:1296
t42_loader_init(T42_Loader loader, T42_Face face)
Definition: t42parse.c:1154
FT_GlyphSlot ttslot
Definition: t42objs.h:48
#define FT_FACE_LIBRARY(x)
Definition: ftobjs.h:562
unsigned short FT_UShort
Definition: fttypes.h:205
T42_Driver_Done(FT_Module module)
Definition: t42objs.c:495
#define FT_FACE_FLAG_GLYPH_NAMES
Definition: freetype.h:1085
FT_Short max_advance_width
Definition: freetype.h:950
GLsizeiptr size
T42_ParserRec parser
Definition: t42parse.h:43
FT_Size_Metrics metrics
Definition: freetype.h:1406
FT_Short underline_position
Definition: freetype.h:953
FT_BEGIN_HEADER FT_New_Size(FT_Face face, FT_Size *size)
Definition: ftobjs.c:2382
#define FT_LOCAL_DEF(x)
Definition: ftconfig.h:236
FT_Byte ** elements
Definition: psaux.h:129
FT_Long memory_size
Definition: freetype.h:1840
#define ft_strcmp
Definition: ftstdlib.h:85
FT_String ** glyph_names
Definition: t1types.h:112