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]
sfdriver.c
Go to the documentation of this file.
1 /***************************************************************************/
2 /* */
3 /* sfdriver.c */
4 /* */
5 /* High-level SFNT driver interface (body). */
6 /* */
7 /* Copyright 1996-2007, 2009-2013 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 FT_INTERNAL_DEBUG_H
21 #include FT_INTERNAL_SFNT_H
22 #include FT_INTERNAL_OBJECTS_H
23 
24 #include "sfdriver.h"
25 #include "ttload.h"
26 #include "sfobjs.h"
27 #include "sfntpic.h"
28 
29 #include "sferrors.h"
30 
31 #ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
32 #include "ttsbit.h"
33 #endif
34 
35 #ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
36 #include "ttpost.h"
37 #endif
38 
39 #ifdef TT_CONFIG_OPTION_BDF
40 #include "ttbdf.h"
41 #include FT_SERVICE_BDF_H
42 #endif
43 
44 #include "ttcmap.h"
45 #include "ttkern.h"
46 #include "ttmtx.h"
47 
48 #include FT_SERVICE_GLYPH_DICT_H
49 #include FT_SERVICE_POSTSCRIPT_NAME_H
50 #include FT_SERVICE_SFNT_H
51 #include FT_SERVICE_TT_CMAP_H
52 
53 
54  /*************************************************************************/
55  /* */
56  /* The macro FT_COMPONENT is used in trace mode. It is an implicit */
57  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */
58  /* messages during execution. */
59  /* */
60 #undef FT_COMPONENT
61 #define FT_COMPONENT trace_sfdriver
62 
63 
64  /*
65  * SFNT TABLE SERVICE
66  *
67  */
68 
69  static void*
70  get_sfnt_table( TT_Face face,
71  FT_Sfnt_Tag tag )
72  {
73  void* table;
74 
75 
76  switch ( tag )
77  {
78  case ft_sfnt_head:
79  table = &face->header;
80  break;
81 
82  case ft_sfnt_hhea:
83  table = &face->horizontal;
84  break;
85 
86  case ft_sfnt_vhea:
87  table = face->vertical_info ? &face->vertical : 0;
88  break;
89 
90  case ft_sfnt_os2:
91  table = face->os2.version == 0xFFFFU ? 0 : &face->os2;
92  break;
93 
94  case ft_sfnt_post:
95  table = &face->postscript;
96  break;
97 
98  case ft_sfnt_maxp:
99  table = &face->max_profile;
100  break;
101 
102  case ft_sfnt_pclt:
103  table = face->pclt.Version ? &face->pclt : 0;
104  break;
105 
106  default:
107  table = 0;
108  }
109 
110  return table;
111  }
112 
113 
114  static FT_Error
115  sfnt_table_info( TT_Face face,
116  FT_UInt idx,
117  FT_ULong *tag,
118  FT_ULong *offset,
119  FT_ULong *length )
120  {
121  if ( !offset || !length )
122  return FT_THROW( Invalid_Argument );
123 
124  if ( !tag )
125  *length = face->num_tables;
126  else
127  {
128  if ( idx >= face->num_tables )
129  return FT_THROW( Table_Missing );
130 
131  *tag = face->dir_tables[idx].Tag;
132  *offset = face->dir_tables[idx].Offset;
133  *length = face->dir_tables[idx].Length;
134  }
135 
136  return FT_Err_Ok;
137  }
138 
139 
141  sfnt_service_sfnt_table,
143  (FT_SFNT_TableGetFunc) get_sfnt_table,
144  (FT_SFNT_TableInfoFunc)sfnt_table_info )
145 
146 
147 #ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
148 
149  /*
150  * GLYPH DICT SERVICE
151  *
152  */
153 
154  static FT_Error
155  sfnt_get_glyph_name( TT_Face face,
156  FT_UInt glyph_index,
158  FT_UInt buffer_max )
159  {
160  FT_String* gname;
161  FT_Error error;
162 
163 
164  error = tt_face_get_ps_name( face, glyph_index, &gname );
165  if ( !error )
166  FT_STRCPYN( buffer, gname, buffer_max );
167 
168  return error;
169  }
170 
171 
172  static FT_UInt
173  sfnt_get_name_index( TT_Face face,
174  FT_String* glyph_name )
175  {
176  FT_Face root = &face->root;
177 
178  FT_UInt i, max_gid = FT_UINT_MAX;
179 
180 
181  if ( root->num_glyphs < 0 )
182  return 0;
183  else if ( (FT_ULong)root->num_glyphs < FT_UINT_MAX )
184  max_gid = (FT_UInt)root->num_glyphs;
185  else
186  FT_TRACE0(( "Ignore glyph names for invalid GID 0x%08x - 0x%08x\n",
187  FT_UINT_MAX, root->num_glyphs ));
188 
189  for ( i = 0; i < max_gid; i++ )
190  {
191  FT_String* gname;
192  FT_Error error = tt_face_get_ps_name( face, i, &gname );
193 
194 
195  if ( error )
196  continue;
197 
198  if ( !ft_strcmp( glyph_name, gname ) )
199  return i;
200  }
201 
202  return 0;
203  }
204 
205 
207  sfnt_service_glyph_dict,
208  (FT_GlyphDict_GetNameFunc) sfnt_get_glyph_name,
209  (FT_GlyphDict_NameIndexFunc)sfnt_get_name_index )
210 
211 
212 #endif /* TT_CONFIG_OPTION_POSTSCRIPT_NAMES */
213 
214 
215  /*
216  * POSTSCRIPT NAME SERVICE
217  *
218  */
219 
220  static const char*
221  sfnt_get_ps_name( TT_Face face )
222  {
223  FT_Int n, found_win, found_apple;
224  const char* result = NULL;
225 
226 
227  /* shouldn't happen, but just in case to avoid memory leaks */
228  if ( face->postscript_name )
229  return face->postscript_name;
230 
231  /* scan the name table to see whether we have a Postscript name here, */
232  /* either in Macintosh or Windows platform encodings */
233  found_win = -1;
234  found_apple = -1;
235 
236  for ( n = 0; n < face->num_names; n++ )
237  {
239 
240 
241  if ( name->nameID == 6 && name->stringLength > 0 )
242  {
243  if ( name->platformID == 3 &&
244  name->encodingID == 1 &&
245  name->languageID == 0x409 )
246  found_win = n;
247 
248  if ( name->platformID == 1 &&
249  name->encodingID == 0 &&
250  name->languageID == 0 )
251  found_apple = n;
252  }
253  }
254 
255  if ( found_win != -1 )
256  {
257  FT_Memory memory = face->root.memory;
258  TT_NameEntryRec* name = face->name_table.names + found_win;
259  FT_UInt len = name->stringLength / 2;
261 
262  FT_UNUSED( error );
263 
264 
265  if ( !FT_ALLOC( result, name->stringLength + 1 ) )
266  {
268  FT_String* r = (FT_String*)result;
269  FT_Byte* p = (FT_Byte*)name->string;
270 
271 
272  if ( FT_STREAM_SEEK( name->stringOffset ) ||
273  FT_FRAME_ENTER( name->stringLength ) )
274  {
275  FT_FREE( result );
276  name->stringLength = 0;
277  name->stringOffset = 0;
278  FT_FREE( name->string );
279 
280  goto Exit;
281  }
282 
283  p = (FT_Byte*)stream->cursor;
284 
285  for ( ; len > 0; len--, p += 2 )
286  {
287  if ( p[0] == 0 && p[1] >= 32 && p[1] < 128 )
288  *r++ = p[1];
289  }
290  *r = '\0';
291 
292  FT_FRAME_EXIT();
293  }
294  goto Exit;
295  }
296 
297  if ( found_apple != -1 )
298  {
299  FT_Memory memory = face->root.memory;
300  TT_NameEntryRec* name = face->name_table.names + found_apple;
301  FT_UInt len = name->stringLength;
303 
304  FT_UNUSED( error );
305 
306 
307  if ( !FT_ALLOC( result, len + 1 ) )
308  {
310 
311 
312  if ( FT_STREAM_SEEK( name->stringOffset ) ||
313  FT_STREAM_READ( result, len ) )
314  {
315  name->stringOffset = 0;
316  name->stringLength = 0;
317  FT_FREE( name->string );
318  FT_FREE( result );
319  goto Exit;
320  }
321  ((char*)result)[len] = '\0';
322  }
323  }
324 
325  Exit:
326  face->postscript_name = result;
327  return result;
328  }
329 
330 
332  sfnt_service_ps_name,
333  (FT_PsName_GetFunc)sfnt_get_ps_name )
334 
335 
336  /*
337  * TT CMAP INFO
338  */
340  tt_service_get_cmap_info,
342 
343 
344 #ifdef TT_CONFIG_OPTION_BDF
345 
346  static FT_Error
347  sfnt_get_charset_id( TT_Face face,
348  const char* *acharset_encoding,
349  const char* *acharset_registry )
350  {
351  BDF_PropertyRec encoding, registry;
352  FT_Error error;
353 
354 
355  /* XXX: I don't know whether this is correct, since
356  * tt_face_find_bdf_prop only returns something correct if we have
357  * previously selected a size that is listed in the BDF table.
358  * Should we change the BDF table format to include single offsets
359  * for `CHARSET_REGISTRY' and `CHARSET_ENCODING'?
360  */
361  error = tt_face_find_bdf_prop( face, "CHARSET_REGISTRY", &registry );
362  if ( !error )
363  {
364  error = tt_face_find_bdf_prop( face, "CHARSET_ENCODING", &encoding );
365  if ( !error )
366  {
367  if ( registry.type == BDF_PROPERTY_TYPE_ATOM &&
368  encoding.type == BDF_PROPERTY_TYPE_ATOM )
369  {
370  *acharset_encoding = encoding.u.atom;
371  *acharset_registry = registry.u.atom;
372  }
373  else
374  error = FT_THROW( Invalid_Argument );
375  }
376  }
377 
378  return error;
379  }
380 
381 
383  sfnt_service_bdf,
384  (FT_BDF_GetCharsetIdFunc)sfnt_get_charset_id,
386 
387 
388 #endif /* TT_CONFIG_OPTION_BDF */
389 
390 
391  /*
392  * SERVICE LIST
393  */
394 
395 #if defined TT_CONFIG_OPTION_POSTSCRIPT_NAMES && defined TT_CONFIG_OPTION_BDF
397  sfnt_services,
403 #elif defined TT_CONFIG_OPTION_POSTSCRIPT_NAMES
405  sfnt_services,
410 #elif defined TT_CONFIG_OPTION_BDF
412  sfnt_services,
417 #else
419  sfnt_services,
423 #endif
424 
425 
427  sfnt_get_interface( FT_Module module,
428  const char* module_interface )
429  {
430  /* SFNT_SERVICES_GET derefers `library' in PIC mode */
431 #ifdef FT_CONFIG_OPTION_PIC
433 
434 
435  if ( !module )
436  return NULL;
437  library = module->library;
438  if ( !library )
439  return NULL;
440 #else
441  FT_UNUSED( module );
442 #endif
443 
444  return ft_service_list_lookup( SFNT_SERVICES_GET, module_interface );
445  }
446 
447 
448 #ifdef FT_CONFIG_OPTION_OLD_INTERNALS
449 
451  tt_face_load_sfnt_header_stub( TT_Face face,
453  FT_Long face_index,
454  SFNT_Header header )
455  {
456  FT_UNUSED( face );
457  FT_UNUSED( stream );
458  FT_UNUSED( face_index );
459  FT_UNUSED( header );
460 
461  return FT_THROW( Unimplemented_Feature );
462  }
463 
464 
466  tt_face_load_directory_stub( TT_Face face,
467  FT_Stream stream,
468  SFNT_Header header )
469  {
470  FT_UNUSED( face );
471  FT_UNUSED( stream );
472  FT_UNUSED( header );
473 
474  return FT_THROW( Unimplemented_Feature );
475  }
476 
477 
479  tt_face_load_hdmx_stub( TT_Face face,
480  FT_Stream stream )
481  {
482  FT_UNUSED( face );
483  FT_UNUSED( stream );
484 
485  return FT_THROW( Unimplemented_Feature );
486  }
487 
488 
489  FT_CALLBACK_DEF( void )
490  tt_face_free_hdmx_stub( TT_Face face )
491  {
492  FT_UNUSED( face );
493  }
494 
495 
497  tt_face_set_sbit_strike_stub( TT_Face face,
498  FT_UInt x_ppem,
499  FT_UInt y_ppem,
500  FT_ULong* astrike_index )
501  {
502  /*
503  * We simply forge a FT_Size_Request and call the real function
504  * that does all the work.
505  *
506  * This stub might be called by libXfont in the X.Org Xserver,
507  * compiled against version 2.1.8 or newer.
508  */
509 
510  FT_Size_RequestRec req;
511 
512 
514  req.width = (FT_F26Dot6)x_ppem;
515  req.height = (FT_F26Dot6)y_ppem;
516  req.horiResolution = 0;
517  req.vertResolution = 0;
518 
519  *astrike_index = 0x7FFFFFFFUL;
520 
521  return tt_face_set_sbit_strike( face, &req, astrike_index );
522  }
523 
524 
526  tt_face_load_sbit_stub( TT_Face face,
527  FT_Stream stream )
528  {
529  FT_UNUSED( face );
530  FT_UNUSED( stream );
531 
532  /*
533  * This function was originally implemented to load the sbit table.
534  * However, it has been replaced by `tt_face_load_eblc', and this stub
535  * is only there for some rogue clients which would want to call it
536  * directly (which doesn't make much sense).
537  */
538  return FT_THROW( Unimplemented_Feature );
539  }
540 
541 
542  FT_CALLBACK_DEF( void )
543  tt_face_free_sbit_stub( TT_Face face )
544  {
545  /* nothing to do in this stub */
546  FT_UNUSED( face );
547  }
548 
549 
551  tt_face_load_charmap_stub( TT_Face face,
552  void* cmap,
553  FT_Stream input )
554  {
555  FT_UNUSED( face );
556  FT_UNUSED( cmap );
557  FT_UNUSED( input );
558 
559  return FT_THROW( Unimplemented_Feature );
560  }
561 
562 
564  tt_face_free_charmap_stub( TT_Face face,
565  void* cmap )
566  {
567  FT_UNUSED( face );
568  FT_UNUSED( cmap );
569 
570  return FT_Err_Ok;
571  }
572 
573 #endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
574 
575 
576 #ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
577 #define PUT_EMBEDDED_BITMAPS( a ) a
578 #else
579 #define PUT_EMBEDDED_BITMAPS( a ) NULL
580 #endif
581 
582 #ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
583 #define PUT_PS_NAMES( a ) a
584 #else
585 #define PUT_PS_NAMES( a ) NULL
586 #endif
587 
589  sfnt_interface,
591 
595  sfnt_get_interface,
596 
597  tt_face_load_any,
598 
599  tt_face_load_sfnt_header_stub, /* FT_CONFIG_OPTION_OLD_INTERNALS */
600  tt_face_load_directory_stub, /* FT_CONFIG_OPTION_OLD_INTERNALS */
601 
608 
611 
612  tt_face_load_hdmx_stub, /* FT_CONFIG_OPTION_OLD_INTERNALS */
613  tt_face_free_hdmx_stub, /* FT_CONFIG_OPTION_OLD_INTERNALS */
614 
618 
619  /* see `ttload.h' */
620  PUT_EMBEDDED_BITMAPS( tt_face_load_bhed ),
621 
622  tt_face_set_sbit_strike_stub, /* FT_CONFIG_OPTION_OLD_INTERNALS */
623  tt_face_load_sbit_stub, /* FT_CONFIG_OPTION_OLD_INTERNALS */
624 
625  tt_find_sbit_image, /* FT_CONFIG_OPTION_OLD_INTERNALS */
626  tt_load_sbit_metrics, /* FT_CONFIG_OPTION_OLD_INTERNALS */
627 
629 
630  tt_face_free_sbit_stub, /* FT_CONFIG_OPTION_OLD_INTERNALS */
631 
632  /* see `ttpost.h' */
635 
636  tt_face_load_charmap_stub, /* FT_CONFIG_OPTION_OLD_INTERNALS */
637  tt_face_free_charmap_stub, /* FT_CONFIG_OPTION_OLD_INTERNALS */
638 
639  /* since version 2.1.8 */
640 
642 
643  /* since version 2.2 */
644 
647 
648  /* see `ttsbit.h' and `sfnt.h' */
651 
654 
656  )
657 
658 
660  sfnt_module_class,
661 
662  0, /* not a font driver or renderer */
663  sizeof ( FT_ModuleRec ),
664 
665  "sfnt", /* driver name */
666  0x10000L, /* driver version 1.0 */
667  0x20000L, /* driver requires FreeType 2.0 or higher */
668 
669  (const void*)&SFNT_INTERFACE_GET, /* module specific interface */
670 
673  (FT_Module_Requester) sfnt_get_interface )
674 
675 
676 /* END */
GLenum GLuint GLenum GLsizei length
#define FT_ALLOC(ptr, size)
Definition: ftmemory.h:260
#define FT_UINT_MAX
Definition: ftstdlib.h:66
int FT_Error
Definition: fttypes.h:296
tt_face_load_head(TT_Face face, FT_Stream stream)
Definition: ttload.c:587
GLuint GLuint stream
for(n=1;n< outline->n_points;n++)
Definition: ftbbox.c:593
#define FT_DEFINE_SERVICE_BDFRec(class_, get_charset_id_, get_property_)
Definition: svbdf.h:51
FT_SERVICE_ID_TT_CMAP
Definition: cffdrivr.c:671
FT_Error(* FT_SFNT_TableLoadFunc)(FT_Face face, FT_ULong tag, FT_Long offset, FT_Byte *buffer, FT_ULong *length)
Definition: svsfnt.h:40
signed long FT_Long
Definition: fttypes.h:238
tt_face_free_ps_names(TT_Face face)
Definition: ttpost.c:415
TT_OS2 os2
Definition: tttypes.h:1282
FT_Error(* FT_Module_Constructor)(FT_Module module)
Definition: ftmodapi.h:121
#define FT_DEFINE_SFNT_INTERFACE( class_, goto_table_, init_face_, load_face_, done_face_, get_interface_, load_any_, load_sfnt_header_, load_directory_, load_head_, load_hhea_, load_cmap_, load_maxp_, load_os2_, load_post_, load_name_, free_name_, load_hdmx_stub_, free_hdmx_stub_, load_kern_, load_gasp_, load_pclt_, load_bhed_, set_sbit_strike_stub_, load_sbits_stub_, find_sbit_image_, load_sbit_metrics_, load_sbit_image_, free_sbits_stub_, get_psname_, free_psnames_, load_charmap_stub_, free_charmap_stub_, get_kerning_, load_font_dir_, load_hmtx_, load_eblc_, free_eblc_, set_sbit_strike_, load_strike_metrics_, get_metrics_)
Definition: sfnt.h:768
unsigned long FT_ULong
Definition: fttypes.h:249
FT_DEFINE_SERVICE_PSFONTNAMEREC(sfnt_service_ps_name,(FT_PsName_GetFunc) sfnt_get_ps_name) FT_DEFINE_SERVICE_TTCMAPSREC(tt_service_get_cmap_info
GLfloat GLfloat p
FT_UShort version
Definition: tttables.h:352
#define SFNT_SERVICE_SFNT_TABLE_GET
Definition: sfntpic.h:36
tt_face_load_hhea(TT_Face face, FT_Stream stream, FT_Bool vertical)
Definition: ttmtx.c:256
#define FT_DEFINE_MODULE( class_, flags_, size_, name_, version_, requires_, interface_, init_, done_, get_interface_)
Definition: ftobjs.h:1445
#define NULL
Definition: ftobjs.h:61
#define PUT_PS_NAMES(a)
Definition: sfdriver.c:585
signed int FT_Int
Definition: fttypes.h:216
tt_face_get_kerning(TT_Face face, FT_UInt left_glyph, FT_UInt right_glyph)
Definition: ttkern.c:181
unsigned char * cursor
Definition: ftsystem.h:333
FT_ULong Offset
Definition: tttypes.h:134
FT_SERVICE_ID_GLYPH_DICT
Definition: cffdrivr.c:671
return FT_THROW(Missing_Property)
#define FT_UNUSED(arg)
Definition: ftconfig.h:76
FT_Library library
Definition: ftobjs.h:476
#define SFNT_INTERFACE_GET
Definition: sfntpic.h:38
tt_face_get_metrics(TT_Face face, FT_Bool vertical, FT_UInt gindex, FT_Short *abearing, FT_UShort *aadvance)
Definition: ttmtx.c:349
tt_face_load_font_dir(TT_Face face, FT_Stream stream)
Definition: ttload.c:319
tt_face_load_pclt(TT_Face face, FT_Stream stream)
Definition: ttload.c:1151
FT_UShort stringLength
Definition: tttypes.h:207
sfnt_init_face(FT_Stream stream, TT_Face face, FT_Int face_index, FT_Int num_params, FT_Parameter *params)
Definition: sfobjs.c:445
FT_Error(* FT_BDF_GetCharsetIdFunc)(FT_Face face, const char **acharset_encoding, const char **acharset_registry)
Definition: svbdf.h:32
tt_face_set_sbit_strike(TT_Face face, FT_Size_Request req, FT_ULong *astrike_index)
Definition: ttsbit0.c:122
tt_face_load_gasp(TT_Face face, FT_Stream stream)
Definition: ttload.c:1211
FT_Stream stream
Definition: tttypes.h:244
FT_Library library
Definition: cffdrivr.c:414
#define SFNT_SERVICE_PS_NAME_GET
Definition: sfntpic.h:32
tt_face_free_name(TT_Face face)
Definition: ttload.c:870
return FT_Err_Ok
Definition: ftbbox.c:645
tt_get_cmap_info(FT_CharMap charmap, TT_CMapInfo *cmap_info)
Definition: ttcmap.c:3546
#define FT_DEFINE_SERVICEDESCREC4(class_, serv_id_1, serv_data_1, serv_id_2, serv_data_2, serv_id_3, serv_data_3, serv_id_4, serv_data_4)
Definition: ftserv.h:226
#define FT_SERVICE_ID_BDF
Definition: svbdf.h:29
FT_ULong stringOffset
Definition: tttypes.h:208
png_uint_32 i
Definition: png.h:2640
Definition: tttypes.h:201
tt_face_load_sbit_image(TT_Face face, FT_ULong strike_index, FT_UInt glyph_index, FT_UInt load_flags, FT_Stream stream, FT_Bitmap *map, TT_SBit_MetricsRec *metrics)
Definition: ttsbit0.c:983
tt_face_get_ps_name(TT_Face face, FT_UInt idx, FT_String **PSname)
Definition: ttpost.c:477
FT_Error(* FT_SFNT_TableInfoFunc)(FT_Face face, FT_UInt idx, FT_ULong *tag, FT_ULong *offset, FT_ULong *length)
Definition: svsfnt.h:58
tt_face_load_any(TT_Face face, FT_ULong tag, FT_Long offset, FT_Byte *buffer, FT_ULong *length)
Definition: ttload.c:467
FT_DEFINE_SERVICE_GLYPHDICTREC(cff_service_glyph_dict,(FT_GlyphDict_GetNameFunc) cff_get_glyph_name,(FT_GlyphDict_NameIndexFunc) cff_get_name_index) static FT_Int cff_ps_has_glyph_names(FT_Face face)
Definition: cffdrivr.c:302
GLenum GLuint GLint GLenum face
void *(* FT_SFNT_TableGetFunc)(FT_Face face, FT_Sfnt_Tag tag)
Definition: svsfnt.h:50
unsigned char FT_Byte
Definition: fttypes.h:150
enum FT_Sfnt_Tag_ FT_Sfnt_Tag
FT_UShort languageID
Definition: tttypes.h:205
FT_Module_Interface(* FT_Module_Requester)(FT_Module module, const char *name)
Definition: ftmodapi.h:153
#define SFNT_SERVICE_BDF_GET
Definition: sfntpic.h:37
tt_face_load_cmap(TT_Face face, FT_Stream stream)
Definition: ttload.c:915
tt_face_load_maxp(TT_Face face, FT_Stream stream)
Definition: ttload.c:623
#define TT_SERVICE_CMAP_INFO_GET
Definition: sfntpic.h:33
FT_Fixed Version
Definition: tttables.h:443
#define FT_DEFINE_SERVICEDESCREC5(class_, serv_id_1, serv_data_1, serv_id_2, serv_data_2, serv_id_3, serv_data_3, serv_id_4, serv_data_4, serv_id_5, serv_data_5)
Definition: ftserv.h:240
const char ** registry
Definition: cffdrivr.c:449
#define FT_FREE(ptr)
Definition: ftmemory.h:286
GLenum GLenum GLenum input
TT_Postscript postscript
Definition: tttypes.h:1283
TT_CMap_Info_GetFunc tt_get_cmap_info const char * module_interface
Definition: sfdriver.c:429
GLenum GLsizei len
TT_CMap_Info_GetFunc tt_get_cmap_info FT_DEFINE_SERVICEDESCREC3(sfnt_services, FT_SERVICE_ID_SFNT_TABLE, &SFNT_SERVICE_SFNT_TABLE_GET, FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &SFNT_SERVICE_PS_NAME_GET, FT_SERVICE_ID_TT_CMAP, &TT_SERVICE_CMAP_INFO_GET) sfnt_get_interface(FT_Module module
TT_MaxProfile max_profile
Definition: tttypes.h:1271
FT_UInt idx
Definition: cffcmap.c:127
FT_Error error
Definition: cffdrivr.c:411
FT_UInt(* FT_GlyphDict_NameIndexFunc)(FT_Face face, FT_String *glyph_name)
Definition: svgldict.h:44
FT_UShort num_names
Definition: tttypes.h:1279
sfnt_load_face(FT_Stream stream, TT_Face face, FT_Int face_index, FT_Int num_params, FT_Parameter *params)
Definition: sfobjs.c:546
FT_ULong Tag
Definition: tttypes.h:132
GLdouble GLdouble GLdouble r
char FT_String
Definition: fttypes.h:183
void * FT_Pointer
Definition: fttypes.h:307
FT_DEFINE_SERVICE_SFNT_TABLEREC(sfnt_service_sfnt_table,(FT_SFNT_TableLoadFunc) tt_face_load_any,(FT_SFNT_TableGetFunc) get_sfnt_table,(FT_SFNT_TableInfoFunc) sfnt_table_info) static const char *sfnt_get_ps_name(TT_Face face)
Definition: sfdriver.c:140
return ft_service_list_lookup(SFNT_SERVICES_GET, module_interface)
const char * atom
Definition: ftbdf.h:121
FT_Bool vertical_info
Definition: tttypes.h:1276
FT_Pointer FT_Module_Interface
Definition: ftmodapi.h:106
GLdouble n
GLuint buffer
local int root
Definition: enough.c:171
FT_ULong Length
Definition: tttypes.h:135
TT_PCLT pclt
Definition: tttypes.h:1320
#define FT_CALLBACK_DEF(x)
Definition: ftconfig.h:323
TT_VertHeader vertical
Definition: tttypes.h:1277
FT_UShort platformID
Definition: tttypes.h:203
const char * postscript_name
Definition: tttypes.h:1384
GLintptr offset
TT_NameEntryRec * names
Definition: tttypes.h:243
FT_SERVICE_ID_POSTSCRIPT_FONT_NAME
Definition: cffdrivr.c:671
FT_BEGIN_HEADER tt_face_load_eblc(TT_Face face, FT_Stream stream)
Definition: ttsbit0.c:43
BDF_PropertyType type
Definition: ftbdf.h:119
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
Definition: ftsystem.h:66
TT_Header header
Definition: tttypes.h:1268
#define FT_SERVICE_ID_SFNT_TABLE
Definition: svsfnt.h:33
TT_NameTableRec name_table
Definition: tttypes.h:1280
FT_FaceRec root
Definition: tttypes.h:1260
#define FT_FRAME_EXIT()
Definition: ftstream.h:514
TT_HoriHeader horizontal
Definition: tttypes.h:1269
#define FT_STREAM_SEEK(position)
Definition: ftstream.h:489
FT_Error(* FT_BDF_GetPropertyFunc)(FT_Face face, const char *prop_name, BDF_PropertyRec *aproperty)
Definition: svbdf.h:37
GLuint const GLchar * name
FT_Size_Request_Type type
Definition: freetype.h:2194
tt_face_load_kern(TT_Face face, FT_Stream stream)
Definition: ttkern.c:44
signed long FT_F26Dot6
Definition: fttypes.h:272
FT_Error(* TT_CMap_Info_GetFunc)(FT_CharMap charmap, TT_CMapInfo *cmap_info)
Definition: svttcmap.h:68
if(!abbox) return FT_THROW(Invalid_Argument)
const char *(* FT_PsName_GetFunc)(FT_Face face)
Definition: svpostnm.h:41
FT_UInt horiResolution
Definition: freetype.h:2197
#define PUT_EMBEDDED_BITMAPS(a)
Definition: sfdriver.c:579
sfnt_done_face(TT_Face face)
Definition: sfobjs.c:1078
FT_Long num_glyphs
Definition: freetype.h:927
#define SFNT_SERVICE_GLYPH_DICT_GET
Definition: sfntpic.h:31
GLuint64EXT * result
unsigned int FT_UInt
Definition: fttypes.h:227
TT_Table dir_tables
Definition: tttypes.h:1266
tt_face_load_os2(TT_Face face, FT_Stream stream)
Definition: ttload.c:951
tt_face_load_hmtx(TT_Face face, FT_Stream stream, FT_Bool vertical)
Definition: ttmtx.c:66
void(* FT_Module_Destructor)(FT_Module module)
Definition: ftmodapi.h:136
FT_UShort encodingID
Definition: tttypes.h:204
FT_DEFINE_SERVICE_TTCMAPSREC(cff_service_get_cmap_info,(TT_CMap_Info_GetFunc) cff_get_cmap_info) static FT_Error cff_get_ros(CFF_Face face
tt_face_free_eblc(TT_Face face)
Definition: ttsbit0.c:110
#define FT_FRAME_ENTER(size)
Definition: ftstream.h:510
tt_face_load_name(TT_Face face, FT_Stream stream)
Definition: ttload.c:740
FT_TRACE0(("cff_property_set: missing property `%s'\, property_name))
#define SFNT_SERVICES_GET
Definition: sfntpic.h:34
#define FT_STRCPYN(dst, src, size)
Definition: ftmemory.h:369
GLenum GLsizei GLenum GLenum const GLvoid * table
FT_Error(* FT_GlyphDict_GetNameFunc)(FT_Face face, FT_UInt glyph_index, FT_Pointer buffer, FT_UInt buffer_max)
Definition: svgldict.h:38
tt_face_load_post(TT_Face face, FT_Stream stream)
Definition: ttload.c:1091
FT_UInt vertResolution
Definition: freetype.h:2198
#define FT_STREAM_READ(buffer, count)
Definition: ftstream.h:495
FT_UShort nameID
Definition: tttypes.h:206
FT_UShort num_tables
Definition: tttypes.h:1265
tt_face_goto_table(TT_Face face, FT_ULong tag, FT_Stream stream, FT_ULong *length)
Definition: ttload.c:126
FT_Byte * string
Definition: tttypes.h:213
FT_Memory memory
Definition: freetype.h:963
tt_face_find_bdf_prop(TT_Face face, const char *property_name, BDF_PropertyRec *aprop)
tt_face_load_strike_metrics(TT_Face face, FT_ULong strike_index, FT_Size_Metrics *metrics)
Definition: ttsbit0.c:131
#define ft_strcmp
Definition: ftstdlib.h:85
union BDF_PropertyRec_::@0 u