• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /****************************************************************************
2  *
3  * ttdriver.c
4  *
5  *   TrueType font driver implementation (body).
6  *
7  * Copyright (C) 1996-2023 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 <freetype/internal/ftdebug.h>
20 #include <freetype/internal/ftstream.h>
21 #include <freetype/internal/sfnt.h>
22 #include <freetype/internal/services/svfntfmt.h>
23 
24 #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
25 #include <freetype/ftmm.h>
26 #include <freetype/internal/services/svmm.h>
27 #include <freetype/internal/services/svmetric.h>
28 #endif
29 
30 #include <freetype/internal/services/svtteng.h>
31 #include <freetype/internal/services/svttglyf.h>
32 #include <freetype/internal/services/svprop.h>
33 #include <freetype/ftdriver.h>
34 
35 #include "ttdriver.h"
36 #include "ttgload.h"
37 #include "ttpload.h"
38 
39 #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
40 #include "ttgxvar.h"
41 #endif
42 
43 #include "tterrors.h"
44 
45 
46   /**************************************************************************
47    *
48    * The macro FT_COMPONENT is used in trace mode.  It is an implicit
49    * parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log
50    * messages during execution.
51    */
52 #undef  FT_COMPONENT
53 #define FT_COMPONENT  ttdriver
54 
55 
56   /*
57    * PROPERTY SERVICE
58    *
59    */
60   static FT_Error
tt_property_set(FT_Module module,const char * property_name,const void * value,FT_Bool value_is_string)61   tt_property_set( FT_Module    module,         /* TT_Driver */
62                    const char*  property_name,
63                    const void*  value,
64                    FT_Bool      value_is_string )
65   {
66     FT_Error   error  = FT_Err_Ok;
67     TT_Driver  driver = (TT_Driver)module;
68 
69 #ifndef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
70     FT_UNUSED( value_is_string );
71 #endif
72 
73 
74     if ( !ft_strcmp( property_name, "interpreter-version" ) )
75     {
76       FT_UInt  interpreter_version;
77 
78 
79 #ifdef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
80       if ( value_is_string )
81       {
82         const char*  s = (const char*)value;
83 
84 
85         interpreter_version = (FT_UInt)ft_strtol( s, NULL, 10 );
86       }
87       else
88 #endif
89       {
90         FT_UInt*  iv = (FT_UInt*)value;
91 
92 
93         interpreter_version = *iv;
94       }
95 
96       if ( interpreter_version == TT_INTERPRETER_VERSION_35
97 #ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
98            || interpreter_version == TT_INTERPRETER_VERSION_38
99 #endif
100 #ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
101            || interpreter_version == TT_INTERPRETER_VERSION_40
102 #endif
103          )
104         driver->interpreter_version = interpreter_version;
105       else
106         error = FT_ERR( Unimplemented_Feature );
107 
108       return error;
109     }
110 
111     FT_TRACE2(( "tt_property_set: missing property `%s'\n",
112                 property_name ));
113     return FT_THROW( Missing_Property );
114   }
115 
116 
117   static FT_Error
tt_property_get(FT_Module module,const char * property_name,const void * value)118   tt_property_get( FT_Module    module,         /* TT_Driver */
119                    const char*  property_name,
120                    const void*  value )
121   {
122     FT_Error   error  = FT_Err_Ok;
123     TT_Driver  driver = (TT_Driver)module;
124 
125     FT_UInt  interpreter_version = driver->interpreter_version;
126 
127 
128     if ( !ft_strcmp( property_name, "interpreter-version" ) )
129     {
130       FT_UInt*  val = (FT_UInt*)value;
131 
132 
133       *val = interpreter_version;
134 
135       return error;
136     }
137 
138     FT_TRACE2(( "tt_property_get: missing property `%s'\n",
139                 property_name ));
140     return FT_THROW( Missing_Property );
141   }
142 
143 
144   FT_DEFINE_SERVICE_PROPERTIESREC(
145     tt_service_properties,
146 
147     (FT_Properties_SetFunc)tt_property_set,     /* set_property */
148     (FT_Properties_GetFunc)tt_property_get      /* get_property */
149   )
150 
151 
152   /*************************************************************************/
153   /*************************************************************************/
154   /*************************************************************************/
155   /****                                                                 ****/
156   /****                                                                 ****/
157   /****                          F A C E S                              ****/
158   /****                                                                 ****/
159   /****                                                                 ****/
160   /*************************************************************************/
161   /*************************************************************************/
162   /*************************************************************************/
163 
164 
165   /**************************************************************************
166    *
167    * @Function:
168    *   tt_get_kerning
169    *
170    * @Description:
171    *   A driver method used to return the kerning vector between two
172    *   glyphs of the same face.
173    *
174    * @Input:
175    *   face ::
176    *     A handle to the source face object.
177    *
178    *   left_glyph ::
179    *     The index of the left glyph in the kern pair.
180    *
181    *   right_glyph ::
182    *     The index of the right glyph in the kern pair.
183    *
184    * @Output:
185    *   kerning ::
186    *     The kerning vector.  This is in font units for
187    *     scalable formats, and in pixels for fixed-sizes
188    *     formats.
189    *
190    * @Return:
191    *   FreeType error code.  0 means success.
192    *
193    * @Note:
194    *   Only horizontal layouts (left-to-right & right-to-left) are
195    *   supported by this function.  Other layouts, or more sophisticated
196    *   kernings, are out of scope of this method (the basic driver
197    *   interface is meant to be simple).
198    *
199    *   They can be implemented by format-specific interfaces.
200    */
201   static FT_Error
tt_get_kerning(FT_Face ttface,FT_UInt left_glyph,FT_UInt right_glyph,FT_Vector * kerning)202   tt_get_kerning( FT_Face     ttface,          /* TT_Face */
203                   FT_UInt     left_glyph,
204                   FT_UInt     right_glyph,
205                   FT_Vector*  kerning )
206   {
207     TT_Face       face = (TT_Face)ttface;
208     SFNT_Service  sfnt = (SFNT_Service)face->sfnt;
209 
210 
211     kerning->x = 0;
212     kerning->y = 0;
213 
214     if ( sfnt )
215       kerning->x = sfnt->get_kerning( face, left_glyph, right_glyph );
216 
217     return 0;
218   }
219 
220 
221   static FT_Error
tt_get_advances(FT_Face ttface,FT_UInt start,FT_UInt count,FT_Int32 flags,FT_Fixed * advances)222   tt_get_advances( FT_Face    ttface,
223                    FT_UInt    start,
224                    FT_UInt    count,
225                    FT_Int32   flags,
226                    FT_Fixed  *advances )
227   {
228     FT_UInt  nn;
229     TT_Face  face = (TT_Face)ttface;
230 
231 
232     /* XXX: TODO: check for sbits */
233 
234     if ( flags & FT_LOAD_VERTICAL_LAYOUT )
235     {
236 #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
237       /* no fast retrieval for blended MM fonts without VVAR table */
238       if ( ( FT_IS_NAMED_INSTANCE( ttface ) || FT_IS_VARIATION( ttface ) ) &&
239            !( face->variation_support & TT_FACE_FLAG_VAR_VADVANCE )        )
240         return FT_THROW( Unimplemented_Feature );
241 #endif
242 
243       for ( nn = 0; nn < count; nn++ )
244       {
245         FT_Short   tsb;
246         FT_UShort  ah;
247 
248 
249         /* since we don't need `tsb', we use zero for `yMax' parameter */
250         TT_Get_VMetrics( face, start + nn, 0, &tsb, &ah );
251         advances[nn] = ah;
252       }
253     }
254     else
255     {
256 #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
257       /* no fast retrieval for blended MM fonts without HVAR table */
258       if ( ( FT_IS_NAMED_INSTANCE( ttface ) || FT_IS_VARIATION( ttface ) ) &&
259            !( face->variation_support & TT_FACE_FLAG_VAR_HADVANCE )        )
260         return FT_THROW( Unimplemented_Feature );
261 #endif
262 
263       for ( nn = 0; nn < count; nn++ )
264       {
265         FT_Short   lsb;
266         FT_UShort  aw;
267 
268 
269         TT_Get_HMetrics( face, start + nn, &lsb, &aw );
270         advances[nn] = aw;
271       }
272     }
273 
274     return FT_Err_Ok;
275   }
276 
277 
278   /*************************************************************************/
279   /*************************************************************************/
280   /*************************************************************************/
281   /****                                                                 ****/
282   /****                                                                 ****/
283   /****                           S I Z E S                             ****/
284   /****                                                                 ****/
285   /****                                                                 ****/
286   /*************************************************************************/
287   /*************************************************************************/
288   /*************************************************************************/
289 
290 
291 #ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
292 
293   static FT_Error
tt_size_select(FT_Size size,FT_ULong strike_index)294   tt_size_select( FT_Size   size,
295                   FT_ULong  strike_index )
296   {
297     TT_Face   ttface = (TT_Face)size->face;
298     TT_Size   ttsize = (TT_Size)size;
299     FT_Error  error  = FT_Err_Ok;
300 
301 
302     ttsize->strike_index = strike_index;
303 
304     if ( FT_IS_SCALABLE( size->face ) )
305     {
306       /* use the scaled metrics, even when tt_size_reset fails */
307       FT_Select_Metrics( size->face, strike_index );
308 
309       tt_size_reset( ttsize ); /* ignore return value */
310     }
311     else
312     {
313       SFNT_Service      sfnt         = (SFNT_Service)ttface->sfnt;
314       FT_Size_Metrics*  size_metrics = &size->metrics;
315 
316 
317       error = sfnt->load_strike_metrics( ttface,
318                                          strike_index,
319                                          size_metrics );
320       if ( error )
321         ttsize->strike_index = 0xFFFFFFFFUL;
322     }
323 
324     return error;
325   }
326 
327 #endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */
328 
329 
330   static FT_Error
tt_size_request(FT_Size size,FT_Size_Request req)331   tt_size_request( FT_Size          size,
332                    FT_Size_Request  req )
333   {
334     TT_Size   ttsize = (TT_Size)size;
335     FT_Error  error  = FT_Err_Ok;
336 
337 
338 #ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
339 
340     if ( FT_HAS_FIXED_SIZES( size->face ) )
341     {
342       TT_Face       ttface = (TT_Face)size->face;
343       SFNT_Service  sfnt   = (SFNT_Service)ttface->sfnt;
344       FT_ULong      strike_index;
345 
346 
347       error = sfnt->set_sbit_strike( ttface, req, &strike_index );
348 
349       if ( error )
350         ttsize->strike_index = 0xFFFFFFFFUL;
351       else
352         return tt_size_select( size, strike_index );
353     }
354 
355 #endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */
356 
357     {
358       FT_Error  err = FT_Request_Metrics( size->face, req );
359 
360 
361       if ( err )
362       {
363         error = err;
364         goto Exit;
365       }
366     }
367 
368     if ( FT_IS_SCALABLE( size->face ) )
369     {
370       error = tt_size_reset( ttsize );
371 
372 #ifdef TT_USE_BYTECODE_INTERPRETER
373       /* for the `MPS' bytecode instruction we need the point size */
374       if ( !error )
375       {
376         FT_UInt  resolution =
377                    ttsize->metrics->x_ppem > ttsize->metrics->y_ppem
378                      ? req->horiResolution
379                      : req->vertResolution;
380 
381 
382         /* if we don't have a resolution value, assume 72dpi */
383         if ( req->type == FT_SIZE_REQUEST_TYPE_SCALES ||
384              !resolution                              )
385           resolution = 72;
386 
387         ttsize->point_size = FT_MulDiv( ttsize->ttmetrics.ppem,
388                                         64 * 72,
389                                         resolution );
390       }
391 #endif
392     }
393 
394   Exit:
395     return error;
396   }
397 
398 
399   /**************************************************************************
400    *
401    * @Function:
402    *   tt_glyph_load
403    *
404    * @Description:
405    *   A driver method used to load a glyph within a given glyph slot.
406    *
407    * @Input:
408    *   slot ::
409    *     A handle to the target slot object where the glyph
410    *     will be loaded.
411    *
412    *   size ::
413    *     A handle to the source face size at which the glyph
414    *     must be scaled, loaded, etc.
415    *
416    *   glyph_index ::
417    *     The index of the glyph in the font file.
418    *
419    *   load_flags ::
420    *     A flag indicating what to load for this glyph.  The
421    *     FT_LOAD_XXX constants can be used to control the
422    *     glyph loading process (e.g., whether the outline
423    *     should be scaled, whether to load bitmaps or not,
424    *     whether to hint the outline, etc).
425    *
426    * @Return:
427    *   FreeType error code.  0 means success.
428    */
429   static FT_Error
tt_glyph_load(FT_GlyphSlot ttslot,FT_Size ttsize,FT_UInt glyph_index,FT_Int32 load_flags)430   tt_glyph_load( FT_GlyphSlot  ttslot,      /* TT_GlyphSlot */
431                  FT_Size       ttsize,      /* TT_Size      */
432                  FT_UInt       glyph_index,
433                  FT_Int32      load_flags )
434   {
435     TT_GlyphSlot  slot = (TT_GlyphSlot)ttslot;
436     TT_Size       size = (TT_Size)ttsize;
437     FT_Face       face = ttslot->face;
438     FT_Error      error;
439 
440 
441     if ( !slot )
442       return FT_THROW( Invalid_Slot_Handle );
443 
444     if ( !size )
445       return FT_THROW( Invalid_Size_Handle );
446 
447     if ( !face )
448       return FT_THROW( Invalid_Face_Handle );
449 
450 #ifdef FT_CONFIG_OPTION_INCREMENTAL
451     if ( glyph_index >= (FT_UInt)face->num_glyphs &&
452          !face->internal->incremental_interface   )
453 #else
454     if ( glyph_index >= (FT_UInt)face->num_glyphs )
455 #endif
456       return FT_THROW( Invalid_Argument );
457 
458     if ( load_flags & FT_LOAD_NO_HINTING )
459     {
460       /* both FT_LOAD_NO_HINTING and FT_LOAD_NO_AUTOHINT   */
461       /* are necessary to disable hinting for tricky fonts */
462 
463       if ( FT_IS_TRICKY( face ) )
464         load_flags &= ~FT_LOAD_NO_HINTING;
465 
466       if ( load_flags & FT_LOAD_NO_AUTOHINT )
467         load_flags |= FT_LOAD_NO_HINTING;
468     }
469 
470     if ( load_flags & ( FT_LOAD_NO_RECURSE | FT_LOAD_NO_SCALE ) )
471     {
472       load_flags |= FT_LOAD_NO_BITMAP | FT_LOAD_NO_SCALE;
473 
474       if ( !FT_IS_TRICKY( face ) )
475         load_flags |= FT_LOAD_NO_HINTING;
476     }
477 
478     /* use hinted metrics only if we load a glyph with hinting */
479     size->metrics = ( load_flags & FT_LOAD_NO_HINTING )
480                       ? &ttsize->metrics
481                       : &size->hinted_metrics;
482 
483     /* now fill in the glyph slot with outline/bitmap/layered */
484     error = TT_Load_Glyph( size, slot, glyph_index, load_flags );
485 
486     /* force drop-out mode to 2 - irrelevant now */
487     /* slot->outline.dropout_mode = 2; */
488 
489     return error;
490   }
491 
492 
493   /*************************************************************************/
494   /*************************************************************************/
495   /*************************************************************************/
496   /****                                                                 ****/
497   /****                                                                 ****/
498   /****                D R I V E R  I N T E R F A C E                   ****/
499   /****                                                                 ****/
500   /****                                                                 ****/
501   /*************************************************************************/
502   /*************************************************************************/
503   /*************************************************************************/
504 
505 #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
506 
507   FT_DEFINE_SERVICE_MULTIMASTERSREC(
508     tt_service_gx_multi_masters,
509 
510     (FT_Get_MM_Func)        NULL,                  /* get_mm                    */
511     (FT_Set_MM_Design_Func) NULL,                  /* set_mm_design             */
512     (FT_Set_MM_Blend_Func)  TT_Set_MM_Blend,       /* set_mm_blend              */
513     (FT_Get_MM_Blend_Func)  TT_Get_MM_Blend,       /* get_mm_blend              */
514     (FT_Get_MM_Var_Func)    TT_Get_MM_Var,         /* get_mm_var                */
515     (FT_Set_Var_Design_Func)TT_Set_Var_Design,     /* set_var_design            */
516     (FT_Get_Var_Design_Func)TT_Get_Var_Design,     /* get_var_design            */
517     (FT_Set_Instance_Func)  TT_Set_Named_Instance, /* set_instance              */
518     (FT_Set_MM_WeightVector_Func)
519                             NULL,                  /* set_mm_weightvector       */
520     (FT_Get_MM_WeightVector_Func)
521                             NULL,                  /* get_mm_weightvector       */
522     (FT_Var_Load_Delta_Set_Idx_Map_Func)
523                             tt_var_load_delta_set_index_mapping,
524                                                    /* load_delta_set_idx_map    */
525     (FT_Var_Load_Item_Var_Store_Func)
526                             tt_var_load_item_variation_store,
527                                                    /* load_item_variation_store */
528     (FT_Var_Get_Item_Delta_Func)
529                             tt_var_get_item_delta, /* get_item_delta            */
530     (FT_Var_Done_Item_Var_Store_Func)
531                             tt_var_done_item_variation_store,
532                                                    /* done_item_variation_store */
533     (FT_Var_Done_Delta_Set_Idx_Map_Func)
534                             tt_var_done_delta_set_index_map,
535                                                    /* done_delta_set_index_map  */
536     (FT_Get_Var_Blend_Func) tt_get_var_blend,      /* get_var_blend             */
537     (FT_Done_Blend_Func)    tt_done_blend          /* done_blend                */
538   )
539 
540   FT_DEFINE_SERVICE_METRICSVARIATIONSREC(
541     tt_service_metrics_variations,
542 
543     (FT_HAdvance_Adjust_Func)tt_hadvance_adjust,     /* hadvance_adjust */
544     (FT_LSB_Adjust_Func)     NULL,                   /* lsb_adjust      */
545     (FT_RSB_Adjust_Func)     NULL,                   /* rsb_adjust      */
546 
547     (FT_VAdvance_Adjust_Func)tt_vadvance_adjust,     /* vadvance_adjust */
548     (FT_TSB_Adjust_Func)     NULL,                   /* tsb_adjust      */
549     (FT_BSB_Adjust_Func)     NULL,                   /* bsb_adjust      */
550     (FT_VOrg_Adjust_Func)    NULL,                   /* vorg_adjust     */
551 
552     (FT_Metrics_Adjust_Func) tt_apply_mvar,          /* metrics_adjust  */
553     (FT_Size_Reset_Func)     tt_size_reset_height    /* size_reset      */
554   )
555 
556 #endif /* TT_CONFIG_OPTION_GX_VAR_SUPPORT */
557 
558 
559   static const FT_Service_TrueTypeEngineRec  tt_service_truetype_engine =
560   {
561 #ifdef TT_USE_BYTECODE_INTERPRETER
562 
563     FT_TRUETYPE_ENGINE_TYPE_PATENTED
564 
565 #else /* !TT_USE_BYTECODE_INTERPRETER */
566 
567     FT_TRUETYPE_ENGINE_TYPE_NONE
568 
569 #endif /* TT_USE_BYTECODE_INTERPRETER */
570   };
571 
572 
573   FT_DEFINE_SERVICE_TTGLYFREC(
574     tt_service_truetype_glyf,
575 
576     (TT_Glyf_GetLocationFunc)tt_face_get_location      /* get_location */
577   )
578 
579 
580 #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
581   FT_DEFINE_SERVICEDESCREC6(
582     tt_services,
583 
584     FT_SERVICE_ID_FONT_FORMAT,        FT_FONT_FORMAT_TRUETYPE,
585     FT_SERVICE_ID_MULTI_MASTERS,      &tt_service_gx_multi_masters,
586     FT_SERVICE_ID_METRICS_VARIATIONS, &tt_service_metrics_variations,
587     FT_SERVICE_ID_TRUETYPE_ENGINE,    &tt_service_truetype_engine,
588     FT_SERVICE_ID_TT_GLYF,            &tt_service_truetype_glyf,
589     FT_SERVICE_ID_PROPERTIES,         &tt_service_properties )
590 #else
591   FT_DEFINE_SERVICEDESCREC4(
592     tt_services,
593 
594     FT_SERVICE_ID_FONT_FORMAT,     FT_FONT_FORMAT_TRUETYPE,
595     FT_SERVICE_ID_TRUETYPE_ENGINE, &tt_service_truetype_engine,
596     FT_SERVICE_ID_TT_GLYF,         &tt_service_truetype_glyf,
597     FT_SERVICE_ID_PROPERTIES,      &tt_service_properties )
598 #endif
599 
600 
FT_CALLBACK_DEF(FT_Module_Interface)601   FT_CALLBACK_DEF( FT_Module_Interface )
602   tt_get_interface( FT_Module    driver,    /* TT_Driver */
603                     const char*  tt_interface )
604   {
605     FT_Library           library;
606     FT_Module_Interface  result;
607     FT_Module            sfntd;
608     SFNT_Service         sfnt;
609 
610 
611     result = ft_service_list_lookup( tt_services, tt_interface );
612     if ( result )
613       return result;
614 
615     if ( !driver )
616       return NULL;
617     library = driver->library;
618     if ( !library )
619       return NULL;
620 
621     /* only return the default interface from the SFNT module */
622     sfntd = FT_Get_Module( library, "sfnt" );
623     if ( sfntd )
624     {
625       sfnt = (SFNT_Service)( sfntd->clazz->module_interface );
626       if ( sfnt )
627         return sfnt->get_interface( driver, tt_interface );
628     }
629 
630     return 0;
631   }
632 
633 
634   /* The FT_DriverInterface structure is defined in ftdriver.h. */
635 
636 #ifdef TT_USE_BYTECODE_INTERPRETER
637 #define TT_HINTER_FLAG  FT_MODULE_DRIVER_HAS_HINTER
638 #else
639 #define TT_HINTER_FLAG  0
640 #endif
641 
642 #ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
643 #define TT_SIZE_SELECT  tt_size_select
644 #else
645 #define TT_SIZE_SELECT  0
646 #endif
647 
648   FT_DEFINE_DRIVER(
649     tt_driver_class,
650 
651       FT_MODULE_FONT_DRIVER     |
652       FT_MODULE_DRIVER_SCALABLE |
653       TT_HINTER_FLAG,
654 
655       sizeof ( TT_DriverRec ),
656 
657       "truetype",      /* driver name                           */
658       0x10000L,        /* driver version == 1.0                 */
659       0x20000L,        /* driver requires FreeType 2.0 or above */
660 
661       NULL,    /* module-specific interface */
662 
663       tt_driver_init,           /* FT_Module_Constructor  module_init   */
664       tt_driver_done,           /* FT_Module_Destructor   module_done   */
665       tt_get_interface,         /* FT_Module_Requester    get_interface */
666 
667     sizeof ( TT_FaceRec ),
668     sizeof ( TT_SizeRec ),
669     sizeof ( FT_GlyphSlotRec ),
670 
671     tt_face_init,               /* FT_Face_InitFunc  init_face */
672     tt_face_done,               /* FT_Face_DoneFunc  done_face */
673     tt_size_init,               /* FT_Size_InitFunc  init_size */
674     tt_size_done,               /* FT_Size_DoneFunc  done_size */
675     tt_slot_init,               /* FT_Slot_InitFunc  init_slot */
676     NULL,                       /* FT_Slot_DoneFunc  done_slot */
677 
678     tt_glyph_load,              /* FT_Slot_LoadFunc  load_glyph */
679 
680     tt_get_kerning,             /* FT_Face_GetKerningFunc   get_kerning  */
681     NULL,                       /* FT_Face_AttachFunc       attach_file  */
682     tt_get_advances,            /* FT_Face_GetAdvancesFunc  get_advances */
683 
684     tt_size_request,            /* FT_Size_RequestFunc  request_size */
685     TT_SIZE_SELECT              /* FT_Size_SelectFunc   select_size  */
686   )
687 
688 
689 /* END */
690