ReactOS 0.4.15-dev-7788-g1ad9096
cffdrivr.c
Go to the documentation of this file.
1/***************************************************************************/
2/* */
3/* cffdrivr.c */
4/* */
5/* OpenType font driver implementation (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 FT_FREETYPE_H
21#include FT_INTERNAL_DEBUG_H
22#include FT_INTERNAL_STREAM_H
23#include FT_INTERNAL_SFNT_H
24#include FT_INTERNAL_POSTSCRIPT_AUX_H
25#include FT_INTERNAL_POSTSCRIPT_PROPS_H
26#include FT_SERVICE_CID_H
27#include FT_SERVICE_POSTSCRIPT_INFO_H
28#include FT_SERVICE_POSTSCRIPT_NAME_H
29#include FT_SERVICE_TT_CMAP_H
30#include FT_SERVICE_CFF_TABLE_LOAD_H
31
32#include "cffdrivr.h"
33#include "cffgload.h"
34#include "cffload.h"
35#include "cffcmap.h"
36#include "cffparse.h"
37#include "cffobjs.h"
38
39#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
40#include FT_SERVICE_MULTIPLE_MASTERS_H
41#include FT_SERVICE_METRICS_VARIATIONS_H
42#endif
43
44#include "cfferrs.h"
45#include "cffpic.h"
46
47#include FT_SERVICE_FONT_FORMAT_H
48#include FT_SERVICE_GLYPH_DICT_H
49#include FT_SERVICE_PROPERTIES_H
50#include FT_DRIVER_H
51
52
53 /*************************************************************************/
54 /* */
55 /* The macro FT_COMPONENT is used in trace mode. It is an implicit */
56 /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */
57 /* messages during execution. */
58 /* */
59#undef FT_COMPONENT
60#define FT_COMPONENT trace_cffdriver
61
62
63 /*************************************************************************/
64 /*************************************************************************/
65 /*************************************************************************/
66 /**** ****/
67 /**** ****/
68 /**** F A C E S ****/
69 /**** ****/
70 /**** ****/
71 /*************************************************************************/
72 /*************************************************************************/
73 /*************************************************************************/
74
75
76 /*************************************************************************/
77 /* */
78 /* <Function> */
79 /* cff_get_kerning */
80 /* */
81 /* <Description> */
82 /* A driver method used to return the kerning vector between two */
83 /* glyphs of the same face. */
84 /* */
85 /* <Input> */
86 /* face :: A handle to the source face object. */
87 /* */
88 /* left_glyph :: The index of the left glyph in the kern pair. */
89 /* */
90 /* right_glyph :: The index of the right glyph in the kern pair. */
91 /* */
92 /* <Output> */
93 /* kerning :: The kerning vector. This is in font units for */
94 /* scalable formats, and in pixels for fixed-sizes */
95 /* formats. */
96 /* */
97 /* <Return> */
98 /* FreeType error code. 0 means success. */
99 /* */
100 /* <Note> */
101 /* Only horizontal layouts (left-to-right & right-to-left) are */
102 /* supported by this function. Other layouts, or more sophisticated */
103 /* kernings, are out of scope of this method (the basic driver */
104 /* interface is meant to be simple). */
105 /* */
106 /* They can be implemented by format-specific interfaces. */
107 /* */
109 cff_get_kerning( FT_Face ttface, /* TT_Face */
113 {
114 TT_Face face = (TT_Face)ttface;
116
117
118 kerning->x = 0;
119 kerning->y = 0;
120
121 if ( sfnt )
123
124 return FT_Err_Ok;
125 }
126
127
128 /*************************************************************************/
129 /* */
130 /* <Function> */
131 /* cff_glyph_load */
132 /* */
133 /* <Description> */
134 /* A driver method used to load a glyph within a given glyph slot. */
135 /* */
136 /* <Input> */
137 /* slot :: A handle to the target slot object where the glyph */
138 /* will be loaded. */
139 /* */
140 /* size :: A handle to the source face size at which the glyph */
141 /* must be scaled, loaded, etc. */
142 /* */
143 /* glyph_index :: The index of the glyph in the font file. */
144 /* */
145 /* load_flags :: A flag indicating what to load for this glyph. The */
146 /* FT_LOAD_??? constants can be used to control the */
147 /* glyph loading process (e.g., whether the outline */
148 /* should be scaled, whether to load bitmaps or not, */
149 /* whether to hint the outline, etc). */
150 /* */
151 /* <Return> */
152 /* FreeType error code. 0 means success. */
153 /* */
155 cff_glyph_load( FT_GlyphSlot cffslot, /* CFF_GlyphSlot */
156 FT_Size cffsize, /* CFF_Size */
157 FT_UInt glyph_index,
158 FT_Int32 load_flags )
159 {
162 CFF_Size size = (CFF_Size)cffsize;
163
164
165 if ( !slot )
166 return FT_THROW( Invalid_Slot_Handle );
167
168 FT_TRACE1(( "cff_glyph_load: glyph index %d\n", glyph_index ));
169
170 /* check whether we want a scaled outline or bitmap */
171 if ( !size )
172 load_flags |= FT_LOAD_NO_SCALE | FT_LOAD_NO_HINTING;
173
174 /* reset the size object if necessary */
175 if ( load_flags & FT_LOAD_NO_SCALE )
176 size = NULL;
177
178 if ( size )
179 {
180 /* these two objects must have the same parent */
181 if ( cffsize->face != cffslot->face )
182 return FT_THROW( Invalid_Face_Handle );
183 }
184
185 /* now load the glyph outline if necessary */
186 error = cff_slot_load( slot, size, glyph_index, load_flags );
187
188 /* force drop-out mode to 2 - irrelevant now */
189 /* slot->outline.dropout_mode = 2; */
190
191 return error;
192 }
193
194
199 FT_Int32 flags,
200 FT_Fixed* advances )
201 {
202 FT_UInt nn;
204 FT_GlyphSlot slot = face->glyph;
205
206
207 if ( FT_IS_SFNT( face ) )
208 {
209 /* OpenType 1.7 mandates that the data from `hmtx' table be used; */
210 /* it is no longer necessary that those values are identical to */
211 /* the values in the `CFF' table */
212
213 TT_Face ttface = (TT_Face)face;
215
216
218 {
219#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
220 /* no fast retrieval for blended MM fonts without VVAR table */
221 if ( ( FT_IS_NAMED_INSTANCE( face ) || FT_IS_VARIATION( face ) ) &&
222 !( ttface->variation_support & TT_FACE_FLAG_VAR_VADVANCE ) )
223 return FT_THROW( Unimplemented_Feature );
224#endif
225
226 /* check whether we have data from the `vmtx' table at all; */
227 /* otherwise we extract the info from the CFF glyphstrings */
228 /* (instead of synthesizing a global value using the `OS/2' */
229 /* table) */
230 if ( !ttface->vertical_info )
231 goto Missing_Table;
232
233 for ( nn = 0; nn < count; nn++ )
234 {
235 FT_UShort ah;
236
237
238 ( (SFNT_Service)ttface->sfnt )->get_metrics( ttface,
239 1,
240 start + nn,
241 &dummy,
242 &ah );
243
244 FT_TRACE5(( " idx %d: advance height %d font unit%s\n",
245 start + nn,
246 ah,
247 ah == 1 ? "" : "s" ));
248 advances[nn] = ah;
249 }
250 }
251 else
252 {
253#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
254 /* no fast retrieval for blended MM fonts without HVAR table */
255 if ( ( FT_IS_NAMED_INSTANCE( face ) || FT_IS_VARIATION( face ) ) &&
256 !( ttface->variation_support & TT_FACE_FLAG_VAR_HADVANCE ) )
257 return FT_THROW( Unimplemented_Feature );
258#endif
259
260 /* check whether we have data from the `hmtx' table at all */
261 if ( !ttface->horizontal.number_Of_HMetrics )
262 goto Missing_Table;
263
264 for ( nn = 0; nn < count; nn++ )
265 {
266 FT_UShort aw;
267
268
269 ( (SFNT_Service)ttface->sfnt )->get_metrics( ttface,
270 0,
271 start + nn,
272 &dummy,
273 &aw );
274
275 FT_TRACE5(( " idx %d: advance width %d font unit%s\n",
276 start + nn,
277 aw,
278 aw == 1 ? "" : "s" ));
279 advances[nn] = aw;
280 }
281 }
282
283 return error;
284 }
285
286 Missing_Table:
287 flags |= (FT_UInt32)FT_LOAD_ADVANCE_ONLY;
288
289 for ( nn = 0; nn < count; nn++ )
290 {
291 error = cff_glyph_load( slot, face->size, start + nn, flags );
292 if ( error )
293 break;
294
295 advances[nn] = ( flags & FT_LOAD_VERTICAL_LAYOUT )
296 ? slot->linearVertAdvance
297 : slot->linearHoriAdvance;
298 }
299
300 return error;
301 }
302
303
304 /*
305 * GLYPH DICT SERVICE
306 *
307 */
308
309 static FT_Error
311 FT_UInt glyph_index,
313 FT_UInt buffer_max )
314 {
315 CFF_Font font = (CFF_Font)face->extra.data;
316 FT_String* gname;
319
320
321 /* CFF2 table does not have glyph names; */
322 /* we need to use `post' table method */
323 if ( font->version_major == 2 )
324 {
326 FT_Module sfnt_module = FT_Get_Module( library, "sfnt" );
327 FT_Service_GlyphDict service =
328 (FT_Service_GlyphDict)ft_module_get_service(
329 sfnt_module,
331 0 );
332
333
334 if ( service && service->get_name )
335 return service->get_name( FT_FACE( face ),
336 glyph_index,
337 buffer,
338 buffer_max );
339 else
340 {
341 FT_ERROR(( "cff_get_glyph_name:"
342 " cannot get glyph name from a CFF2 font\n"
343 " "
344 " without the `PSNames' module\n" ));
345 error = FT_THROW( Missing_Module );
346 goto Exit;
347 }
348 }
349
350 if ( !font->psnames )
351 {
352 FT_ERROR(( "cff_get_glyph_name:"
353 " cannot get glyph name from CFF & CEF fonts\n"
354 " "
355 " without the `PSNames' module\n" ));
356 error = FT_THROW( Missing_Module );
357 goto Exit;
358 }
359
360 /* first, locate the sid in the charset table */
361 sid = font->charset.sids[glyph_index];
362
363 /* now, lookup the name itself */
365
366 if ( gname )
367 FT_STRCPYN( buffer, gname, buffer_max );
368
370
371 Exit:
372 return error;
373 }
374
375
376 static FT_UInt
378 FT_String* glyph_name )
379 {
382 FT_Service_PsCMaps psnames;
385 FT_UInt i;
386
387
388 cff = (CFF_FontRec *)face->extra.data;
389 charset = &cff->charset;
390
391 /* CFF2 table does not have glyph names; */
392 /* we need to use `post' table method */
393 if ( cff->version_major == 2 )
394 {
396 FT_Module sfnt_module = FT_Get_Module( library, "sfnt" );
397 FT_Service_GlyphDict service =
398 (FT_Service_GlyphDict)ft_module_get_service(
399 sfnt_module,
401 0 );
402
403
404 if ( service && service->name_index )
405 return service->name_index( FT_FACE( face ), glyph_name );
406 else
407 {
408 FT_ERROR(( "cff_get_name_index:"
409 " cannot get glyph index from a CFF2 font\n"
410 " "
411 " without the `PSNames' module\n" ));
412 return 0;
413 }
414 }
415
416 FT_FACE_FIND_GLOBAL_SERVICE( face, psnames, POSTSCRIPT_CMAPS );
417 if ( !psnames )
418 return 0;
419
420 for ( i = 0; i < cff->num_glyphs; i++ )
421 {
422 sid = charset->sids[i];
423
424 if ( sid > 390 )
425 name = cff_index_get_string( cff, sid - 391 );
426 else
427 name = (FT_String *)psnames->adobe_std_strings( sid );
428
429 if ( !name )
430 continue;
431
432 if ( !ft_strcmp( glyph_name, name ) )
433 return i;
434 }
435
436 return 0;
437 }
438
439
441 cff_service_glyph_dict,
442
445 )
446
447
448 /*
449 * POSTSCRIPT INFO SERVICE
450 *
451 */
452
453 static FT_Int
454 cff_ps_has_glyph_names( FT_Face face )
455 {
456 return ( face->face_flags & FT_FACE_FLAG_GLYPH_NAMES ) > 0;
457 }
458
459
460 static FT_Error
462 PS_FontInfoRec* afont_info )
463 {
464 CFF_Font cff = (CFF_Font)face->extra.data;
466
467
468 if ( cff && !cff->font_info )
469 {
471 PS_FontInfoRec *font_info = NULL;
472 FT_Memory memory = face->root.memory;
473
474
475 if ( FT_ALLOC( font_info, sizeof ( *font_info ) ) )
476 goto Fail;
477
478 font_info->version = cff_index_get_sid_string( cff,
479 dict->version );
480 font_info->notice = cff_index_get_sid_string( cff,
481 dict->notice );
482 font_info->full_name = cff_index_get_sid_string( cff,
483 dict->full_name );
484 font_info->family_name = cff_index_get_sid_string( cff,
485 dict->family_name );
486 font_info->weight = cff_index_get_sid_string( cff,
487 dict->weight );
488 font_info->italic_angle = dict->italic_angle;
489 font_info->is_fixed_pitch = dict->is_fixed_pitch;
490 font_info->underline_position = (FT_Short)dict->underline_position;
491 font_info->underline_thickness = (FT_UShort)dict->underline_thickness;
492
493 cff->font_info = font_info;
494 }
495
496 if ( cff )
497 *afont_info = *cff->font_info;
498
499 Fail:
500 return error;
501 }
502
503
504 static FT_Error
506 PS_FontExtraRec* afont_extra )
507 {
508 CFF_Font cff = (CFF_Font)face->extra.data;
510
511
512 if ( cff && cff->font_extra == NULL )
513 {
515 PS_FontExtraRec* font_extra = NULL;
516 FT_Memory memory = face->root.memory;
517 FT_String* embedded_postscript;
518
519
520 if ( FT_ALLOC( font_extra, sizeof ( *font_extra ) ) )
521 goto Fail;
522
523 font_extra->fs_type = 0U;
524
525 embedded_postscript = cff_index_get_sid_string(
526 cff,
527 dict->embedded_postscript );
528 if ( embedded_postscript )
529 {
530 FT_String* start_fstype;
531 FT_String* start_def;
532
533
534 /* Identify the XYZ integer in `/FSType XYZ def' substring. */
535 if ( ( start_fstype = ft_strstr( embedded_postscript,
536 "/FSType" ) ) != NULL &&
537 ( start_def = ft_strstr( start_fstype +
538 sizeof ( "/FSType" ) - 1,
539 "def" ) ) != NULL )
540 {
541 FT_String* s;
542
543
544 for ( s = start_fstype + sizeof ( "/FSType" ) - 1;
545 s != start_def;
546 s++ )
547 {
548 if ( *s >= '0' && *s <= '9' )
549 {
550 if ( font_extra->fs_type >= ( FT_USHORT_MAX - 9 ) / 10 )
551 {
552 /* Overflow - ignore the FSType value. */
553 font_extra->fs_type = 0U;
554 break;
555 }
556
557 font_extra->fs_type *= 10;
558 font_extra->fs_type += (FT_UShort)( *s - '0' );
559 }
560 else if ( *s != ' ' && *s != '\n' && *s != '\r' )
561 {
562 /* Non-whitespace character between `/FSType' and next `def' */
563 /* - ignore the FSType value. */
564 font_extra->fs_type = 0U;
565 break;
566 }
567 }
568 }
569 }
570
571 cff->font_extra = font_extra;
572 }
573
574 if ( cff )
575 *afont_extra = *cff->font_extra;
576
577 Fail:
578 return error;
579 }
580
581
583 cff_service_ps_info,
584
585 (PS_GetFontInfoFunc) cff_ps_get_font_info, /* ps_get_font_info */
586 (PS_GetFontExtraFunc) cff_ps_get_font_extra, /* ps_get_font_extra */
587 (PS_HasGlyphNamesFunc) cff_ps_has_glyph_names, /* ps_has_glyph_names */
588 /* unsupported with CFF fonts */
589 (PS_GetFontPrivateFunc)NULL, /* ps_get_font_private */
590 /* not implemented */
591 (PS_GetFontValueFunc) NULL /* ps_get_font_value */
592 )
593
594
595 /*
596 * POSTSCRIPT NAME SERVICE
597 *
598 */
599
600 static const char*
601 cff_get_ps_name( CFF_Face face )
602 {
603 CFF_Font cff = (CFF_Font)face->extra.data;
605
606
607 /* following the OpenType specification 1.7, we return the name stored */
608 /* in the `name' table for a CFF wrapped into an SFNT container */
609
610 if ( FT_IS_SFNT( FT_FACE( face ) ) && sfnt )
611 {
613 FT_Module sfnt_module = FT_Get_Module( library, "sfnt" );
614 FT_Service_PsFontName service =
615 (FT_Service_PsFontName)ft_module_get_service(
616 sfnt_module,
618 0 );
619
620
621 if ( service && service->get_ps_font_name )
622 return service->get_ps_font_name( FT_FACE( face ) );
623 }
624
625 return (const char*)cff->font_name;
626 }
627
628
630 cff_service_ps_name,
631
632 (FT_PsName_GetFunc)cff_get_ps_name /* get_ps_font_name */
633 )
634
635
636 /*
637 * TT CMAP INFO
638 *
639 * If the charmap is a synthetic Unicode encoding cmap or
640 * a Type 1 standard (or expert) encoding cmap, hide TT CMAP INFO
641 * service defined in SFNT module.
642 *
643 * Otherwise call the service function in the sfnt module.
644 *
645 */
646 static FT_Error
647 cff_get_cmap_info( FT_CharMap charmap,
649 {
650 FT_CMap cmap = FT_CMAP( charmap );
652
655
656
659 {
660 FT_Module sfnt = FT_Get_Module( library, "sfnt" );
661 FT_Service_TTCMaps service =
662 (FT_Service_TTCMaps)ft_module_get_service( sfnt,
664 0 );
665
666
667 if ( service && service->get_cmap_info )
668 error = service->get_cmap_info( charmap, cmap_info );
669 }
670 else
671 error = FT_THROW( Invalid_CharMap_Format );
672
673 return error;
674 }
675
676
678 cff_service_get_cmap_info,
679
680 (TT_CMap_Info_GetFunc)cff_get_cmap_info /* get_cmap_info */
681 )
682
683
684 /*
685 * CID INFO SERVICE
686 *
687 */
688 static FT_Error
689 cff_get_ros( CFF_Face face,
690 const char* *registry,
691 const char* *ordering,
693 {
695 CFF_Font cff = (CFF_Font)face->extra.data;
696
697
698 if ( cff )
699 {
701
702
703 if ( dict->cid_registry == 0xFFFFU )
704 {
705 error = FT_THROW( Invalid_Argument );
706 goto Fail;
707 }
708
709 if ( registry )
710 {
711 if ( !cff->registry )
713 dict->cid_registry );
715 }
716
717 if ( ordering )
718 {
719 if ( !cff->ordering )
721 dict->cid_ordering );
723 }
724
725 /*
726 * XXX: According to Adobe TechNote #5176, the supplement in CFF
727 * can be a real number. We truncate it to fit public API
728 * since freetype-2.3.6.
729 */
730 if ( supplement )
731 {
732 if ( dict->cid_supplement < FT_INT_MIN ||
733 dict->cid_supplement > FT_INT_MAX )
734 FT_TRACE1(( "cff_get_ros: too large supplement %d is truncated\n",
735 dict->cid_supplement ));
737 }
738 }
739
741 return error;
742 }
743
744
745 static FT_Error
747 FT_Bool *is_cid )
748 {
750 CFF_Font cff = (CFF_Font)face->extra.data;
751
752
753 *is_cid = 0;
754
755 if ( cff )
756 {
758
759
760 if ( dict->cid_registry != 0xFFFFU )
761 *is_cid = 1;
762 }
763
764 return error;
765 }
766
767
768 static FT_Error
770 FT_UInt glyph_index,
771 FT_UInt *cid )
772 {
775
776
777 cff = (CFF_Font)face->extra.data;
778
779 if ( cff )
780 {
781 FT_UInt c;
783
784
785 if ( dict->cid_registry == 0xFFFFU )
786 {
787 error = FT_THROW( Invalid_Argument );
788 goto Fail;
789 }
790
791 if ( glyph_index > cff->num_glyphs )
792 {
793 error = FT_THROW( Invalid_Argument );
794 goto Fail;
795 }
796
797 c = cff->charset.sids[glyph_index];
798
799 if ( cid )
800 *cid = c;
801 }
802
803 Fail:
804 return error;
805 }
806
807
809 cff_service_cid_info,
810
812 cff_get_ros, /* get_ros */
814 cff_get_is_cid, /* get_is_cid */
816 cff_get_cid_from_glyph_index /* get_cid_from_glyph_index */
817 )
818
819
820 /*
821 * PROPERTY SERVICE
822 *
823 */
824
826 cff_service_properties,
827
829 (FT_Properties_GetFunc)ps_property_get ) /* get_property */
830
831
832#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
833
834 /*
835 * MULTIPLE MASTER SERVICE
836 *
837 */
838
839 static FT_Error
840 cff_set_mm_blend( CFF_Face face,
841 FT_UInt num_coords,
843 {
844 FT_Service_MultiMasters mm = (FT_Service_MultiMasters)face->mm;
845
846
847 return mm->set_mm_blend( FT_FACE( face ), num_coords, coords );
848 }
849
850
851 static FT_Error
852 cff_get_mm_blend( CFF_Face face,
853 FT_UInt num_coords,
855 {
856 FT_Service_MultiMasters mm = (FT_Service_MultiMasters)face->mm;
857
858
859 return mm->get_mm_blend( FT_FACE( face ), num_coords, coords );
860 }
861
862
863 static FT_Error
864 cff_get_mm_var( CFF_Face face,
865 FT_MM_Var* *master )
866 {
867 FT_Service_MultiMasters mm = (FT_Service_MultiMasters)face->mm;
868
869
870 return mm->get_mm_var( FT_FACE( face ), master );
871 }
872
873
874 static FT_Error
875 cff_set_var_design( CFF_Face face,
876 FT_UInt num_coords,
878 {
879 FT_Service_MultiMasters mm = (FT_Service_MultiMasters)face->mm;
880
881
882 return mm->set_var_design( FT_FACE( face ), num_coords, coords );
883 }
884
885
886 static FT_Error
887 cff_get_var_design( CFF_Face face,
888 FT_UInt num_coords,
890 {
891 FT_Service_MultiMasters mm = (FT_Service_MultiMasters)face->mm;
892
893
894 return mm->get_var_design( FT_FACE( face ), num_coords, coords );
895 }
896
897
898 static FT_Error
899 cff_set_instance( CFF_Face face,
900 FT_UInt instance_index )
901 {
902 FT_Service_MultiMasters mm = (FT_Service_MultiMasters)face->mm;
903
904
905 return mm->set_instance( FT_FACE( face ), instance_index );
906 }
907
908
910 cff_service_multi_masters,
911
912 (FT_Get_MM_Func) NULL, /* get_mm */
913 (FT_Set_MM_Design_Func) NULL, /* set_mm_design */
914 (FT_Set_MM_Blend_Func) cff_set_mm_blend, /* set_mm_blend */
915 (FT_Get_MM_Blend_Func) cff_get_mm_blend, /* get_mm_blend */
916 (FT_Get_MM_Var_Func) cff_get_mm_var, /* get_mm_var */
917 (FT_Set_Var_Design_Func)cff_set_var_design, /* set_var_design */
918 (FT_Get_Var_Design_Func)cff_get_var_design, /* get_var_design */
919 (FT_Set_Instance_Func) cff_set_instance, /* set_instance */
920
921 (FT_Get_Var_Blend_Func) cff_get_var_blend, /* get_var_blend */
922 (FT_Done_Blend_Func) cff_done_blend /* done_blend */
923 )
924
925
926 /*
927 * METRICS VARIATIONS SERVICE
928 *
929 */
930
931 static FT_Error
932 cff_hadvance_adjust( CFF_Face face,
933 FT_UInt gindex,
934 FT_Int *avalue )
935 {
936 FT_Service_MetricsVariations var = (FT_Service_MetricsVariations)face->var;
937
938
939 return var->hadvance_adjust( FT_FACE( face ), gindex, avalue );
940 }
941
942
943 static void
944 cff_metrics_adjust( CFF_Face face )
945 {
946 FT_Service_MetricsVariations var = (FT_Service_MetricsVariations)face->var;
947
948
949 var->metrics_adjust( FT_FACE( face ) );
950 }
951
952
954 cff_service_metrics_variations,
955
956 (FT_HAdvance_Adjust_Func)cff_hadvance_adjust, /* hadvance_adjust */
957 (FT_LSB_Adjust_Func) NULL, /* lsb_adjust */
958 (FT_RSB_Adjust_Func) NULL, /* rsb_adjust */
959
960 (FT_VAdvance_Adjust_Func)NULL, /* vadvance_adjust */
961 (FT_TSB_Adjust_Func) NULL, /* tsb_adjust */
962 (FT_BSB_Adjust_Func) NULL, /* bsb_adjust */
963 (FT_VOrg_Adjust_Func) NULL, /* vorg_adjust */
964
965 (FT_Metrics_Adjust_Func) cff_metrics_adjust /* metrics_adjust */
966 )
967#endif
968
969
970 /*
971 * CFFLOAD SERVICE
972 *
973 */
974
976 cff_service_cff_load,
977
983 )
984
985
986 /*************************************************************************/
987 /*************************************************************************/
988 /*************************************************************************/
989 /**** ****/
990 /**** ****/
991 /**** D R I V E R I N T E R F A C E ****/
992 /**** ****/
993 /**** ****/
994 /*************************************************************************/
995 /*************************************************************************/
996 /*************************************************************************/
997
998#if !defined FT_CONFIG_OPTION_NO_GLYPH_NAMES && \
999 defined TT_CONFIG_OPTION_GX_VAR_SUPPORT
1001 cff_services,
1002
1013 )
1014#elif !defined FT_CONFIG_OPTION_NO_GLYPH_NAMES
1016 cff_services,
1017
1026 )
1027#elif defined TT_CONFIG_OPTION_GX_VAR_SUPPORT
1029 cff_services,
1030
1040 )
1041#else
1043 cff_services,
1044
1052 )
1053#endif
1054
1055
1058 const char* module_interface )
1059 {
1063
1064
1065 /* CFF_SERVICES_GET dereferences `library' in PIC mode */
1066#ifdef FT_CONFIG_OPTION_PIC
1067 if ( !driver )
1068 return NULL;
1069 library = driver->library;
1070 if ( !library )
1071 return NULL;
1072#endif
1073
1075 if ( result )
1076 return result;
1077
1078 /* `driver' is not yet evaluated in non-PIC mode */
1079#ifndef FT_CONFIG_OPTION_PIC
1080 if ( !driver )
1081 return NULL;
1082 library = driver->library;
1083 if ( !library )
1084 return NULL;
1085#endif
1086
1087 /* we pass our request to the `sfnt' module */
1088 sfnt = FT_Get_Module( library, "sfnt" );
1089
1090 return sfnt ? sfnt->clazz->get_interface( sfnt, module_interface ) : 0;
1091 }
1092
1093
1094 /* The FT_DriverInterface structure is defined in ftdriver.h. */
1095
1096#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
1097#define CFF_SIZE_SELECT cff_size_select
1098#else
1099#define CFF_SIZE_SELECT 0
1100#endif
1101
1103 cff_driver_class,
1104
1109
1110 sizeof ( PS_DriverRec ),
1111 "cff",
1112 0x10000L,
1113 0x20000L,
1114
1115 NULL, /* module-specific interface */
1116
1117 cff_driver_init, /* FT_Module_Constructor module_init */
1118 cff_driver_done, /* FT_Module_Destructor module_done */
1119 cff_get_interface, /* FT_Module_Requester get_interface */
1120
1121 sizeof ( TT_FaceRec ),
1122 sizeof ( CFF_SizeRec ),
1123 sizeof ( CFF_GlyphSlotRec ),
1124
1125 cff_face_init, /* FT_Face_InitFunc init_face */
1126 cff_face_done, /* FT_Face_DoneFunc done_face */
1127 cff_size_init, /* FT_Size_InitFunc init_size */
1128 cff_size_done, /* FT_Size_DoneFunc done_size */
1129 cff_slot_init, /* FT_Slot_InitFunc init_slot */
1130 cff_slot_done, /* FT_Slot_DoneFunc done_slot */
1131
1132 cff_glyph_load, /* FT_Slot_LoadFunc load_glyph */
1133
1134 cff_get_kerning, /* FT_Face_GetKerningFunc get_kerning */
1135 NULL, /* FT_Face_AttachFunc attach_file */
1136 cff_get_advances, /* FT_Face_GetAdvancesFunc get_advances */
1137
1138 cff_size_request, /* FT_Size_RequestFunc request_size */
1139 CFF_SIZE_SELECT /* FT_Size_SelectFunc select_size */
1140 )
1141
1142
1143/* END */
#define U(x)
Definition: wordpad.c:45
FT_UInt sid
Definition: cffcmap.c:139
return cff_index_get_sid_string(cff, sid)
CFF_Charset charset
Definition: cffcmap.c:138
const char const char ** ordering
Definition: cffdrivr.c:691
CFF_Font cff
Definition: cffdrivr.c:695
static FT_Error cff_get_cid_from_glyph_index(CFF_Face face, FT_UInt glyph_index, FT_UInt *cid)
Definition: cffdrivr.c:769
const char const char FT_Int * supplement
Definition: cffdrivr.c:693
cff_get_advances(FT_Face face, FT_UInt start, FT_UInt count, FT_Int32 flags, FT_Fixed *advances)
Definition: cffdrivr.c:196
#define CFF_SIZE_SELECT
Definition: cffdrivr.c:1099
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get FT_SERVICE_ID_PROPERTIES
Definition: cffdrivr.c:1024
static FT_Error cff_ps_get_font_extra(CFF_Face face, PS_FontExtraRec *afont_extra)
Definition: cffdrivr.c:505
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get FT_SERVICE_ID_TT_CMAP
Definition: cffdrivr.c:1022
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get & CFF_SERVICE_GLYPH_DICT_GET
Definition: cffdrivr.c:1021
FT_Properties_SetFunc ps_property_set
Definition: cffdrivr.c:828
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get &CFF_SERVICE_CFF_LOAD_GET cff_get_interface(FT_Module driver, const char *module_interface)
Definition: cffdrivr.c:1057
static FT_Error cff_get_glyph_name(CFF_Face face, FT_UInt glyph_index, FT_Pointer buffer, FT_UInt buffer_max)
Definition: cffdrivr.c:310
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get & CFF_SERVICE_CID_INFO_GET
Definition: cffdrivr.c:1023
cff_get_kerning(FT_Face ttface, FT_UInt left_glyph, FT_UInt right_glyph, FT_Vector *kerning)
Definition: cffdrivr.c:109
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get & CFF_SERVICE_PS_INFO_GET
Definition: cffdrivr.c:1019
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get & CFF_SERVICE_GET_CMAP_INFO_GET
Definition: cffdrivr.c:1022
cff_glyph_load(FT_GlyphSlot cffslot, FT_Size cffsize, FT_UInt glyph_index, FT_Int32 load_flags)
Definition: cffdrivr.c:155
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get FT_SERVICE_ID_POSTSCRIPT_FONT_NAME
Definition: cffdrivr.c:1020
static FT_Error cff_ps_get_font_info(CFF_Face face, PS_FontInfoRec *afont_info)
Definition: cffdrivr.c:461
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get FT_SERVICE_ID_CFF_LOAD
Definition: cffdrivr.c:1025
static FT_Error cff_get_is_cid(CFF_Face face, FT_Bool *is_cid)
Definition: cffdrivr.c:746
const char ** registry
Definition: cffdrivr.c:690
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get FT_SERVICE_ID_GLYPH_DICT
Definition: cffdrivr.c:1021
FT_Library library
Definition: cffdrivr.c:654
FT_Error error
Definition: cffdrivr.c:651
static FT_UInt cff_get_name_index(CFF_Face face, FT_String *glyph_name)
Definition: cffdrivr.c:377
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get FT_FONT_FORMAT_CFF
Definition: cffdrivr.c:1018
TT_CMapInfo * cmap_info
Definition: cffdrivr.c:649
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get FT_SERVICE_ID_FONT_FORMAT
Definition: cffdrivr.c:1018
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get FT_SERVICE_ID_CID
Definition: cffdrivr.c:1023
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get & CFF_SERVICE_PROPERTIES_GET
Definition: cffdrivr.c:1024
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get FT_SERVICE_ID_POSTSCRIPT_INFO
Definition: cffdrivr.c:1019
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get & CFF_SERVICE_PS_NAME_GET
Definition: cffdrivr.c:1020
cff_slot_load(CFF_GlyphSlot glyph, CFF_Size size, FT_UInt glyph_index, FT_Int32 load_flags)
Definition: cffgload.c:195
cff_get_standard_encoding(FT_UInt charcode)
Definition: cffload.c:192
cff_blend_build_vector(CFF_Blend blend, FT_UInt vsindex, FT_UInt lenNDV, FT_Fixed *NDV)
Definition: cffload.c:1387
cff_fd_select_get(CFF_FDSelect fdselect, FT_UInt glyph_index)
Definition: cffload.c:750
cff_index_get_string(CFF_Font font, FT_UInt element)
Definition: cffload.c:646
cff_load_private_dict(CFF_Font font, CFF_SubFont subfont, FT_UInt lenNDV, FT_Fixed *NDV)
Definition: cffload.c:1865
cff_blend_check_vector(CFF_Blend blend, FT_UInt vsindex, FT_UInt lenNDV, FT_Fixed *NDV)
Definition: cffload.c:1554
cff_face_done(FT_Face cffface)
Definition: cffobjs.c:1123
cff_slot_done(FT_GlyphSlot slot)
Definition: cffobjs.c:351
cff_size_init(FT_Size cffsize)
Definition: cffobjs.c:165
cff_slot_init(FT_GlyphSlot slot)
Definition: cffobjs.c:358
cff_size_request(FT_Size size, FT_Size_Request req)
Definition: cffobjs.c:275
cff_driver_done(FT_Module module)
Definition: cffobjs.c:1200
cff_size_done(FT_Size cffsize)
Definition: cffobjs.c:83
cff_driver_init(FT_Module module)
Definition: cffobjs.c:1158
cff_face_init(FT_Stream stream, FT_Face cffface, FT_Int face_index, FT_Int num_params, FT_Parameter *params)
Definition: cffobjs.c:490
FT_BEGIN_HEADER typedef TT_Face CFF_Face
Definition: cffotypes.h:33
struct CFF_GlyphSlotRec_ * CFF_GlyphSlot
struct CFF_SizeRec_ * CFF_Size
#define CFF_SERVICE_METRICS_VAR_GET
Definition: cffpic.h:35
#define CFF_SERVICES_GET
Definition: cffpic.h:33
#define CFF_SERVICE_CFF_LOAD_GET
Definition: cffpic.h:36
#define CFF_SERVICE_MULTI_MASTERS_GET
Definition: cffpic.h:34
#define CFF_CMAP_ENCODING_CLASS_REC_GET
Definition: cffpic.h:37
#define CFF_CMAP_UNICODE_CLASS_REC_GET
Definition: cffpic.h:38
struct CFF_FontRec_ * CFF_Font
Definition: cfftypes.h:152
#define NULL
Definition: types.h:112
int Fail
Definition: ehthrow.cxx:24
#define FT_LOAD_VERTICAL_LAYOUT
Definition: freetype.h:3013
#define FT_IS_SFNT(face)
Definition: freetype.h:1331
#define FT_LOAD_NO_SCALE
Definition: freetype.h:3009
#define FT_LOAD_ADVANCE_ONLY
Definition: freetype.h:3031
#define FT_LOAD_NO_HINTING
Definition: freetype.h:3010
#define FT_IS_VARIATION(face)
Definition: freetype.h:1442
#define FT_FACE_FLAG_GLYPH_NAMES
Definition: freetype.h:1247
#define FT_IS_NAMED_INSTANCE(face)
Definition: freetype.h:1424
return FT_Err_Ok
Definition: ftbbox.c:511
#define FT_CALLBACK_DEF(x)
Definition: ftconfig.h:533
#define FT_ERROR(varformat)
Definition: ftdebug.h:181
#define FT_TRACE5(varformat)
Definition: ftdebug.h:162
#define FT_THROW(e)
Definition: ftdebug.h:213
#define FT_TRACE1(varformat)
Definition: ftdebug.h:158
#define FT_DEFINE_DRIVER( class_, flags_, size_, name_, version_, requires_, interface_, init_, done_, get_interface_, face_object_size_, size_object_size_, slot_object_size_, init_face_, done_face_, init_size_, done_size_, init_slot_, done_slot_, load_glyph_, get_kerning_, attach_file_, get_advances_, request_size_, select_size_)
Definition: ftdrv.h:230
#define FT_ALLOC(ptr, size)
Definition: ftmemory.h:303
#define FT_STRCPYN(dst, src, size)
Definition: ftmemory.h:382
#define FT_MODULE_FONT_DRIVER
Definition: ftmodapi.h:110
#define FT_MODULE_DRIVER_HINTS_LIGHTLY
Definition: ftmodapi.h:121
#define FT_MODULE_DRIVER_HAS_HINTER
Definition: ftmodapi.h:119
FT_Get_Module(FT_Library library, const char *module_name)
Definition: ftobjs.c:4837
#define FT_MODULE_DRIVER_SCALABLE
Definition: ftmodapi.h:115
#define FT_FACE_LIBRARY(x)
Definition: ftobjs.h:635
#define FT_FACE(x)
Definition: ftobjs.h:630
ft_module_get_service(FT_Module module, const char *service_id, FT_Bool global)
Definition: ftobjs.c:4880
#define FT_CMAP(x)
Definition: ftobjs.h:159
#define FT_CMAP_FACE(x)
Definition: ftobjs.h:165
ps_property_get(FT_Module module, const char *property_name, void *value)
Definition: ftpsprop.c:231
#define FT_DEFINE_SERVICEDESCREC9(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, serv_id_6, serv_data_6, serv_id_7, serv_data_7, serv_id_8, serv_data_8, serv_id_9, serv_data_9)
Definition: ftserv.h:309
#define FT_FACE_FIND_GLOBAL_SERVICE(face, ptr, id)
Definition: ftserv.h:125
#define FT_DEFINE_SERVICEDESCREC7(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, serv_id_6, serv_data_6, serv_id_7, serv_data_7)
Definition: ftserv.h:267
ft_service_list_lookup(FT_ServiceDesc service_descriptors, const char *service_id)
Definition: ftobjs.c:98
#define FT_DEFINE_SERVICEDESCREC8(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, serv_id_6, serv_data_6, serv_id_7, serv_data_7, serv_id_8, serv_data_8)
Definition: ftserv.h:287
#define FT_DEFINE_SERVICEDESCREC10(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, serv_id_6, serv_data_6, serv_id_7, serv_data_7, serv_id_8, serv_data_8, serv_id_9, serv_data_9, serv_id_10, serv_data_10)
Definition: ftserv.h:333
#define ft_strcmp
Definition: ftstdlib.h:86
#define FT_USHORT_MAX
Definition: ftstdlib.h:62
#define ft_strstr
Definition: ftstdlib.h:92
#define FT_INT_MIN
Definition: ftstdlib.h:64
#define FT_INT_MAX
Definition: ftstdlib.h:63
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
Definition: ftsystem.h:66
FT_BEGIN_HEADER typedef unsigned char FT_Bool
Definition: fttypes.h:108
signed long FT_Fixed
Definition: fttypes.h:288
int FT_Error
Definition: fttypes.h:300
unsigned short FT_UShort
Definition: fttypes.h:209
char FT_String
Definition: fttypes.h:187
signed short FT_Short
Definition: fttypes.h:198
unsigned int FT_UInt
Definition: fttypes.h:231
signed int FT_Int
Definition: fttypes.h:220
GLuint start
Definition: gl.h:1545
GLdouble s
Definition: gl.h:2039
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLsizeiptr size
Definition: glext.h:5919
GLuint buffer
Definition: glext.h:5915
const GLubyte * c
Definition: glext.h:8905
GLuint coords
Definition: glext.h:7368
GLenum GLuint GLint GLenum face
Definition: glext.h:7025
GLbitfield flags
Definition: glext.h:7161
GLuint64EXT * result
Definition: glext.h:11304
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define c
Definition: ke_i.h:80
if(dx< 0)
Definition: linetemp.h:194
const char * var
Definition: shader.c:5666
static char memory[1024 *256]
Definition: process.c:116
static TfClientId cid
struct @1664::@1665 driver
Definition: mk_font.cpp:20
FT_BEGIN_HEADER struct PS_DriverRec_ PS_DriverRec
TT_CMap_Info_GetFunc tt_get_cmap_info const char * module_interface
Definition: sfdriver.c:1176
SFNT_Interface * SFNT_Service
Definition: sfnt.h:628
static void Exit(void)
Definition: sock.c:1330
FT_UShort * sids
Definition: cfftypes.h:98
FT_UInt family_name
Definition: cfftypes.h:186
FT_UInt cid_ordering
Definition: cfftypes.h:211
FT_UInt embedded_postscript
Definition: cfftypes.h:207
FT_UInt cid_registry
Definition: cfftypes.h:210
FT_Bool is_fixed_pitch
Definition: cfftypes.h:188
FT_Fixed underline_position
Definition: cfftypes.h:190
FT_Fixed underline_thickness
Definition: cfftypes.h:191
FT_Long cid_supplement
Definition: cfftypes.h:212
FT_Fixed italic_angle
Definition: cfftypes.h:189
FT_String * font_name
Definition: cfftypes.h:362
FT_Byte version_major
Definition: cfftypes.h:342
CFF_CharsetRec charset
Definition: cfftypes.h:355
CFF_SubFontRec top_font
Definition: cfftypes.h:373
PS_FontExtraRec * font_extra
Definition: cfftypes.h:402
FT_String * registry
Definition: cfftypes.h:392
FT_String * ordering
Definition: cfftypes.h:393
PS_FontInfoRec * font_info
Definition: cfftypes.h:389
FT_UInt num_glyphs
Definition: cfftypes.h:340
CFF_FontRecDictRec font_dict
Definition: cfftypes.h:300
FT_CMap_Class clazz
Definition: ftobjs.h:154
FT_Pos x
Definition: ftimage.h:76
FT_Pos y
Definition: ftimage.h:77
FT_UShort fs_type
Definition: t1types.h:89
FT_Module_Requester get_interface
Definition: sfnt.h:569
TT_Face_GetKerningFunc get_kerning
Definition: sfnt.h:604
FT_Bool vertical_info
Definition: tttypes.h:1406
void * sfnt
Definition: tttypes.h:1428
TT_HoriHeader horizontal
Definition: tttypes.h:1402
FT_UShort number_Of_HMetrics
Definition: tttables.h:218
Definition: vfat.h:185
Definition: name.c:39
#define FT_DEFINE_SERVICE_CFFLOADREC(class_, get_standard_encoding_, load_private_dict_, fd_select_get_, blend_check_vector_, blend_build_vector_)
Definition: svcfftl.h:70
FT_Bool(* FT_Blend_Check_Vector_Func)(CFF_Blend blend, FT_UInt vsindex, FT_UInt lenNDV, FT_Fixed *NDV)
Definition: svcfftl.h:46
FT_Error(* FT_Load_Private_Dict_Func)(CFF_Font font, CFF_SubFont subfont, FT_UInt lenNDV, FT_Fixed *NDV)
Definition: svcfftl.h:36
FT_Byte(* FT_FD_Select_Get_Func)(CFF_FDSelect fdselect, FT_UInt glyph_index)
Definition: svcfftl.h:42
FT_UShort(* FT_Get_Standard_Encoding_Func)(FT_UInt charcode)
Definition: svcfftl.h:33
FT_Error(* FT_Blend_Build_Vector_Func)(CFF_Blend blend, FT_UInt vsindex, FT_UInt lenNDV, FT_Fixed *NDV)
Definition: svcfftl.h:52
FT_Error(* FT_CID_GetCIDFromGlyphIndexFunc)(FT_Face face, FT_UInt glyph_index, FT_UInt *cid)
Definition: svcid.h:39
FT_Error(* FT_CID_GetIsInternallyCIDKeyedFunc)(FT_Face face, FT_Bool *is_cid)
Definition: svcid.h:36
FT_Error(* FT_CID_GetRegistryOrderingSupplementFunc)(FT_Face face, const char **registry, const char **ordering, FT_Int *supplement)
Definition: svcid.h:31
#define FT_DEFINE_SERVICE_CIDREC(class_, get_ros_, get_is_cid_, get_cid_from_glyph_index_)
Definition: svcid.h:53
FT_UInt(* FT_GlyphDict_NameIndexFunc)(FT_Face face, FT_String *glyph_name)
Definition: svgldict.h:44
FT_Error(* FT_GlyphDict_GetNameFunc)(FT_Face face, FT_UInt glyph_index, FT_Pointer buffer, FT_UInt buffer_max)
Definition: svgldict.h:38
#define FT_DEFINE_SERVICE_GLYPHDICTREC(class_, get_name_, name_index_)
Definition: svgldict.h:57
FT_Error(* FT_HAdvance_Adjust_Func)(FT_Face face, FT_UInt gindex, FT_Int *avalue)
Definition: svmetric.h:39
void(* FT_Metrics_Adjust_Func)(FT_Face face)
Definition: svmetric.h:78
FT_Error(* FT_VOrg_Adjust_Func)(FT_Face face, FT_UInt gindex, FT_Int *avalue)
Definition: svmetric.h:71
#define FT_SERVICE_ID_METRICS_VARIATIONS
Definition: svmetric.h:33
FT_Error(* FT_LSB_Adjust_Func)(FT_Face face, FT_UInt gindex, FT_Int *avalue)
Definition: svmetric.h:44
FT_Error(* FT_TSB_Adjust_Func)(FT_Face face, FT_UInt gindex, FT_Int *avalue)
Definition: svmetric.h:61
FT_Error(* FT_RSB_Adjust_Func)(FT_Face face, FT_UInt gindex, FT_Int *avalue)
Definition: svmetric.h:49
FT_Error(* FT_VAdvance_Adjust_Func)(FT_Face face, FT_UInt gindex, FT_Int *avalue)
Definition: svmetric.h:56
#define FT_DEFINE_SERVICE_METRICSVARIATIONSREC(class_, hadvance_adjust_, lsb_adjust_, rsb_adjust_, vadvance_adjust_, tsb_adjust_, bsb_adjust_, vorg_adjust_, metrics_adjust_)
Definition: svmetric.h:98
FT_Error(* FT_BSB_Adjust_Func)(FT_Face face, FT_UInt gindex, FT_Int *avalue)
Definition: svmetric.h:66
FT_Error(* FT_Set_Instance_Func)(FT_Face face, FT_UInt instance_index)
Definition: svmm.h:71
FT_Error(* FT_Set_MM_Blend_Func)(FT_Face face, FT_UInt num_coords, FT_Long *coords)
Definition: svmm.h:61
FT_Error(* FT_Get_MM_Func)(FT_Face face, FT_Multi_Master *master)
Definition: svmm.h:39
FT_Error(* FT_Set_MM_Design_Func)(FT_Face face, FT_UInt num_coords, FT_Long *coords)
Definition: svmm.h:47
#define FT_DEFINE_SERVICE_MULTIMASTERSREC(class_, get_mm_, set_mm_design_, set_mm_blend_, get_mm_blend_, get_mm_var_, set_var_design_, get_var_design_, set_instance_, get_var_blend_, done_blend_)
Definition: svmm.h:109
FT_Error(* FT_Get_MM_Var_Func)(FT_Face face, FT_MM_Var **master)
Definition: svmm.h:43
FT_Error(* FT_Get_MM_Blend_Func)(FT_Face face, FT_UInt num_coords, FT_Long *coords)
Definition: svmm.h:75
#define FT_SERVICE_ID_MULTI_MASTERS
Definition: svmm.h:35
void(* FT_Done_Blend_Func)(FT_Face)
Definition: svmm.h:87
FT_Error(* FT_Get_Var_Blend_Func)(FT_Face face, FT_UInt *num_coords, FT_Fixed **coords, FT_Fixed **normalizedcoords, FT_MM_Var **mm_var)
Definition: svmm.h:80
FT_Error(* FT_Get_Var_Design_Func)(FT_Face face, FT_UInt num_coords, FT_Fixed *coords)
Definition: svmm.h:66
FT_Error(* FT_Set_Var_Design_Func)(FT_Face face, FT_UInt num_coords, FT_Fixed *coords)
Definition: svmm.h:54
const char *(* FT_PsName_GetFunc)(FT_Face face)
Definition: svpostnm.h:41
#define FT_DEFINE_SERVICE_PSFONTNAMEREC(class_, get_ps_font_name_)
Definition: svpostnm.h:52
#define FT_DEFINE_SERVICE_PROPERTIESREC(class_, set_property_, get_property_)
Definition: svprop.h:50
FT_Error(* FT_Properties_GetFunc)(FT_Module module, const char *property_name, void *value)
Definition: svprop.h:36
FT_Error(* FT_Properties_SetFunc)(FT_Module module, const char *property_name, const void *value, FT_Bool value_is_string)
Definition: svprop.h:30
FT_Long(* PS_GetFontValueFunc)(FT_Face face, PS_Dict_Keys key, FT_UInt idx, void *value, FT_Long value_len)
Definition: svpsinfo.h:48
#define FT_DEFINE_SERVICE_PSINFOREC(class_, get_font_info_, ps_get_font_extra_, has_glyph_names_, get_font_private_, get_font_value_)
Definition: svpsinfo.h:67
FT_Error(* PS_GetFontInfoFunc)(FT_Face face, PS_FontInfoRec *afont_info)
Definition: svpsinfo.h:33
FT_Int(* PS_HasGlyphNamesFunc)(FT_Face face)
Definition: svpsinfo.h:41
FT_Error(* PS_GetFontExtraFunc)(FT_Face face, PS_FontExtraRec *afont_extra)
Definition: svpsinfo.h:37
FT_Error(* PS_GetFontPrivateFunc)(FT_Face face, PS_PrivateRec *afont_private)
Definition: svpsinfo.h:44
FT_Error(* TT_CMap_Info_GetFunc)(FT_CharMap charmap, TT_CMapInfo *cmap_info)
Definition: svttcmap.h:67
#define FT_DEFINE_SERVICE_TTCMAPSREC(class_, get_cmap_info_)
Definition: svttcmap.h:78
FT_BEGIN_HEADER struct PS_FontInfoRec_ PS_FontInfoRec
FT_UInt FT_UInt FT_Vector * kerning
Definition: ttdriver.c:204
FT_UInt left_glyph
Definition: ttdriver.c:201
SFNT_Service sfnt
Definition: ttdriver.c:206
FT_UInt FT_UInt right_glyph
Definition: ttdriver.c:202
#define TT_FACE_FLAG_VAR_HADVANCE
Definition: tttypes.h:1113
struct TT_FaceRec_ * TT_Face
Definition: tttypes.h:973
#define TT_FACE_FLAG_VAR_VADVANCE
Definition: tttypes.h:1118
#define const
Definition: zconf.h:233