ReactOS 0.4.16-dev-959-g2ec3a19
cffdrivr.c
Go to the documentation of this file.
1/****************************************************************************
2 *
3 * cffdrivr.c
4 *
5 * OpenType font driver implementation (body).
6 *
7 * Copyright (C) 1996-2019 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
46#include FT_SERVICE_FONT_FORMAT_H
47#include FT_SERVICE_GLYPH_DICT_H
48#include FT_SERVICE_PROPERTIES_H
49#include FT_DRIVER_H
50
51
52 /**************************************************************************
53 *
54 * The macro FT_COMPONENT is used in trace mode. It is an implicit
55 * parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log
56 * messages during execution.
57 */
58#undef FT_COMPONENT
59#define FT_COMPONENT cffdriver
60
61
62 /*************************************************************************/
63 /*************************************************************************/
64 /*************************************************************************/
65 /**** ****/
66 /**** ****/
67 /**** F A C E S ****/
68 /**** ****/
69 /**** ****/
70 /*************************************************************************/
71 /*************************************************************************/
72 /*************************************************************************/
73
74
75 /**************************************************************************
76 *
77 * @Function:
78 * cff_get_kerning
79 *
80 * @Description:
81 * A driver method used to return the kerning vector between two
82 * glyphs of the same face.
83 *
84 * @Input:
85 * face ::
86 * A handle to the source face object.
87 *
88 * left_glyph ::
89 * The index of the left glyph in the kern pair.
90 *
91 * right_glyph ::
92 * The index of the right glyph in the kern pair.
93 *
94 * @Output:
95 * kerning ::
96 * The kerning vector. This is in font units for
97 * scalable formats, and in pixels for fixed-sizes
98 * formats.
99 *
100 * @Return:
101 * FreeType error code. 0 means success.
102 *
103 * @Note:
104 * Only horizontal layouts (left-to-right & right-to-left) are
105 * supported by this function. Other layouts, or more sophisticated
106 * kernings, are out of scope of this method (the basic driver
107 * interface is meant to be simple).
108 *
109 * They can be implemented by format-specific interfaces.
110 */
112 cff_get_kerning( FT_Face ttface, /* TT_Face */
116 {
117 TT_Face face = (TT_Face)ttface;
119
120
121 kerning->x = 0;
122 kerning->y = 0;
123
124 if ( sfnt )
126
127 return FT_Err_Ok;
128 }
129
130
131 /**************************************************************************
132 *
133 * @Function:
134 * cff_glyph_load
135 *
136 * @Description:
137 * A driver method used to load a glyph within a given glyph slot.
138 *
139 * @Input:
140 * slot ::
141 * A handle to the target slot object where the glyph
142 * will be loaded.
143 *
144 * size ::
145 * A handle to the source face size at which the glyph
146 * must be scaled, loaded, etc.
147 *
148 * glyph_index ::
149 * The index of the glyph in the font file.
150 *
151 * load_flags ::
152 * A flag indicating what to load for this glyph. The
153 * FT_LOAD_??? constants can be used to control the
154 * glyph loading process (e.g., whether the outline
155 * should be scaled, whether to load bitmaps or not,
156 * whether to hint the outline, etc).
157 *
158 * @Return:
159 * FreeType error code. 0 means success.
160 */
162 cff_glyph_load( FT_GlyphSlot cffslot, /* CFF_GlyphSlot */
163 FT_Size cffsize, /* CFF_Size */
164 FT_UInt glyph_index,
165 FT_Int32 load_flags )
166 {
169 CFF_Size size = (CFF_Size)cffsize;
170
171
172 if ( !slot )
173 return FT_THROW( Invalid_Slot_Handle );
174
175 FT_TRACE1(( "cff_glyph_load: glyph index %d\n", glyph_index ));
176
177 /* check whether we want a scaled outline or bitmap */
178 if ( !size )
179 load_flags |= FT_LOAD_NO_SCALE | FT_LOAD_NO_HINTING;
180
181 /* reset the size object if necessary */
182 if ( load_flags & FT_LOAD_NO_SCALE )
183 size = NULL;
184
185 if ( size )
186 {
187 /* these two objects must have the same parent */
188 if ( cffsize->face != cffslot->face )
189 return FT_THROW( Invalid_Face_Handle );
190 }
191
192 /* now load the glyph outline if necessary */
193 error = cff_slot_load( slot, size, glyph_index, load_flags );
194
195 /* force drop-out mode to 2 - irrelevant now */
196 /* slot->outline.dropout_mode = 2; */
197
198 return error;
199 }
200
201
206 FT_Int32 flags,
207 FT_Fixed* advances )
208 {
209 FT_UInt nn;
211 FT_GlyphSlot slot = face->glyph;
212
213
214 if ( FT_IS_SFNT( face ) )
215 {
216 /* OpenType 1.7 mandates that the data from `hmtx' table be used; */
217 /* it is no longer necessary that those values are identical to */
218 /* the values in the `CFF' table */
219
220 TT_Face ttface = (TT_Face)face;
222
223
225 {
226#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
227 /* no fast retrieval for blended MM fonts without VVAR table */
228 if ( ( FT_IS_NAMED_INSTANCE( face ) || FT_IS_VARIATION( face ) ) &&
229 !( ttface->variation_support & TT_FACE_FLAG_VAR_VADVANCE ) )
230 return FT_THROW( Unimplemented_Feature );
231#endif
232
233 /* check whether we have data from the `vmtx' table at all; */
234 /* otherwise we extract the info from the CFF glyphstrings */
235 /* (instead of synthesizing a global value using the `OS/2' */
236 /* table) */
237 if ( !ttface->vertical_info )
238 goto Missing_Table;
239
240 for ( nn = 0; nn < count; nn++ )
241 {
242 FT_UShort ah;
243
244
245 ( (SFNT_Service)ttface->sfnt )->get_metrics( ttface,
246 1,
247 start + nn,
248 &dummy,
249 &ah );
250
251 FT_TRACE5(( " idx %d: advance height %d font unit%s\n",
252 start + nn,
253 ah,
254 ah == 1 ? "" : "s" ));
255 advances[nn] = ah;
256 }
257 }
258 else
259 {
260#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
261 /* no fast retrieval for blended MM fonts without HVAR table */
262 if ( ( FT_IS_NAMED_INSTANCE( face ) || FT_IS_VARIATION( face ) ) &&
263 !( ttface->variation_support & TT_FACE_FLAG_VAR_HADVANCE ) )
264 return FT_THROW( Unimplemented_Feature );
265#endif
266
267 /* check whether we have data from the `hmtx' table at all */
268 if ( !ttface->horizontal.number_Of_HMetrics )
269 goto Missing_Table;
270
271 for ( nn = 0; nn < count; nn++ )
272 {
273 FT_UShort aw;
274
275
276 ( (SFNT_Service)ttface->sfnt )->get_metrics( ttface,
277 0,
278 start + nn,
279 &dummy,
280 &aw );
281
282 FT_TRACE5(( " idx %d: advance width %d font unit%s\n",
283 start + nn,
284 aw,
285 aw == 1 ? "" : "s" ));
286 advances[nn] = aw;
287 }
288 }
289
290 return error;
291 }
292
293 Missing_Table:
294 flags |= (FT_UInt32)FT_LOAD_ADVANCE_ONLY;
295
296 for ( nn = 0; nn < count; nn++ )
297 {
298 error = cff_glyph_load( slot, face->size, start + nn, flags );
299 if ( error )
300 break;
301
302 advances[nn] = ( flags & FT_LOAD_VERTICAL_LAYOUT )
303 ? slot->linearVertAdvance
304 : slot->linearHoriAdvance;
305 }
306
307 return error;
308 }
309
310
311 /*
312 * GLYPH DICT SERVICE
313 *
314 */
315
316 static FT_Error
318 FT_UInt glyph_index,
320 FT_UInt buffer_max )
321 {
322 CFF_Font font = (CFF_Font)face->extra.data;
323 FT_String* gname;
326
327
328 /* CFF2 table does not have glyph names; */
329 /* we need to use `post' table method */
330 if ( font->version_major == 2 )
331 {
333 FT_Module sfnt_module = FT_Get_Module( library, "sfnt" );
334 FT_Service_GlyphDict service =
335 (FT_Service_GlyphDict)ft_module_get_service(
336 sfnt_module,
338 0 );
339
340
341 if ( service && service->get_name )
342 return service->get_name( FT_FACE( face ),
343 glyph_index,
344 buffer,
345 buffer_max );
346 else
347 {
348 FT_ERROR(( "cff_get_glyph_name:"
349 " cannot get glyph name from a CFF2 font\n"
350 " "
351 " without the `psnames' module\n" ));
352 error = FT_THROW( Missing_Module );
353 goto Exit;
354 }
355 }
356
357 if ( !font->psnames )
358 {
359 FT_ERROR(( "cff_get_glyph_name:"
360 " cannot get glyph name from CFF & CEF fonts\n"
361 " "
362 " without the `psnames' module\n" ));
363 error = FT_THROW( Missing_Module );
364 goto Exit;
365 }
366
367 /* first, locate the sid in the charset table */
368 sid = font->charset.sids[glyph_index];
369
370 /* now, lookup the name itself */
372
373 if ( gname )
374 FT_STRCPYN( buffer, gname, buffer_max );
375
377
378 Exit:
379 return error;
380 }
381
382
383 static FT_UInt
385 FT_String* glyph_name )
386 {
389 FT_Service_PsCMaps psnames;
392 FT_UInt i;
393
394
395 cff = (CFF_FontRec *)face->extra.data;
396 charset = &cff->charset;
397
398 /* CFF2 table does not have glyph names; */
399 /* we need to use `post' table method */
400 if ( cff->version_major == 2 )
401 {
403 FT_Module sfnt_module = FT_Get_Module( library, "sfnt" );
404 FT_Service_GlyphDict service =
405 (FT_Service_GlyphDict)ft_module_get_service(
406 sfnt_module,
408 0 );
409
410
411 if ( service && service->name_index )
412 return service->name_index( FT_FACE( face ), glyph_name );
413 else
414 {
415 FT_ERROR(( "cff_get_name_index:"
416 " cannot get glyph index from a CFF2 font\n"
417 " "
418 " without the `psnames' module\n" ));
419 return 0;
420 }
421 }
422
423 FT_FACE_FIND_GLOBAL_SERVICE( face, psnames, POSTSCRIPT_CMAPS );
424 if ( !psnames )
425 return 0;
426
427 for ( i = 0; i < cff->num_glyphs; i++ )
428 {
429 sid = charset->sids[i];
430
431 if ( sid > 390 )
432 name = cff_index_get_string( cff, sid - 391 );
433 else
434 name = (FT_String *)psnames->adobe_std_strings( sid );
435
436 if ( !name )
437 continue;
438
439 if ( !ft_strcmp( glyph_name, name ) )
440 return i;
441 }
442
443 return 0;
444 }
445
446
449
452 )
453
454
455 /*
456 * POSTSCRIPT INFO SERVICE
457 *
458 */
459
460 static FT_Int
461 cff_ps_has_glyph_names( FT_Face face )
462 {
463 return ( face->face_flags & FT_FACE_FLAG_GLYPH_NAMES ) > 0;
464 }
465
466
467 static FT_Error
469 PS_FontInfoRec* afont_info )
470 {
471 CFF_Font cff = (CFF_Font)face->extra.data;
473
474
475 if ( cff && !cff->font_info )
476 {
478 PS_FontInfoRec *font_info = NULL;
479 FT_Memory memory = face->root.memory;
480
481
482 if ( FT_ALLOC( font_info, sizeof ( *font_info ) ) )
483 goto Fail;
484
485 font_info->version = cff_index_get_sid_string( cff,
486 dict->version );
487 font_info->notice = cff_index_get_sid_string( cff,
488 dict->notice );
489 font_info->full_name = cff_index_get_sid_string( cff,
490 dict->full_name );
491 font_info->family_name = cff_index_get_sid_string( cff,
492 dict->family_name );
493 font_info->weight = cff_index_get_sid_string( cff,
494 dict->weight );
495 font_info->italic_angle = dict->italic_angle;
496 font_info->is_fixed_pitch = dict->is_fixed_pitch;
497 font_info->underline_position = (FT_Short)dict->underline_position;
498 font_info->underline_thickness = (FT_UShort)dict->underline_thickness;
499
500 cff->font_info = font_info;
501 }
502
503 if ( cff )
504 *afont_info = *cff->font_info;
505
506 Fail:
507 return error;
508 }
509
510
511 static FT_Error
513 PS_FontExtraRec* afont_extra )
514 {
515 CFF_Font cff = (CFF_Font)face->extra.data;
517
518
519 if ( cff && cff->font_extra == NULL )
520 {
522 PS_FontExtraRec* font_extra = NULL;
523 FT_Memory memory = face->root.memory;
524 FT_String* embedded_postscript;
525
526
527 if ( FT_ALLOC( font_extra, sizeof ( *font_extra ) ) )
528 goto Fail;
529
530 font_extra->fs_type = 0U;
531
532 embedded_postscript = cff_index_get_sid_string(
533 cff,
534 dict->embedded_postscript );
535 if ( embedded_postscript )
536 {
537 FT_String* start_fstype;
538 FT_String* start_def;
539
540
541 /* Identify the XYZ integer in `/FSType XYZ def' substring. */
542 if ( ( start_fstype = ft_strstr( embedded_postscript,
543 "/FSType" ) ) != NULL &&
544 ( start_def = ft_strstr( start_fstype +
545 sizeof ( "/FSType" ) - 1,
546 "def" ) ) != NULL )
547 {
548 FT_String* s;
549
550
551 for ( s = start_fstype + sizeof ( "/FSType" ) - 1;
552 s != start_def;
553 s++ )
554 {
555 if ( *s >= '0' && *s <= '9' )
556 {
557 if ( font_extra->fs_type >= ( FT_USHORT_MAX - 9 ) / 10 )
558 {
559 /* Overflow - ignore the FSType value. */
560 font_extra->fs_type = 0U;
561 break;
562 }
563
564 font_extra->fs_type *= 10;
565 font_extra->fs_type += (FT_UShort)( *s - '0' );
566 }
567 else if ( *s != ' ' && *s != '\n' && *s != '\r' )
568 {
569 /* Non-whitespace character between `/FSType' and next `def' */
570 /* - ignore the FSType value. */
571 font_extra->fs_type = 0U;
572 break;
573 }
574 }
575 }
576 }
577
578 cff->font_extra = font_extra;
579 }
580
581 if ( cff )
582 *afont_extra = *cff->font_extra;
583
584 Fail:
585 return error;
586 }
587
588
591
592 (PS_GetFontInfoFunc) cff_ps_get_font_info, /* ps_get_font_info */
593 (PS_GetFontExtraFunc) cff_ps_get_font_extra, /* ps_get_font_extra */
594 (PS_HasGlyphNamesFunc) cff_ps_has_glyph_names, /* ps_has_glyph_names */
595 /* unsupported with CFF fonts */
596 (PS_GetFontPrivateFunc)NULL, /* ps_get_font_private */
597 /* not implemented */
598 (PS_GetFontValueFunc) NULL /* ps_get_font_value */
599 )
600
601
602 /*
603 * POSTSCRIPT NAME SERVICE
604 *
605 */
606
607 static const char*
608 cff_get_ps_name( CFF_Face face )
609 {
610 CFF_Font cff = (CFF_Font)face->extra.data;
612
613
614 /* following the OpenType specification 1.7, we return the name stored */
615 /* in the `name' table for a CFF wrapped into an SFNT container */
616
617 if ( FT_IS_SFNT( FT_FACE( face ) ) && sfnt )
618 {
620 FT_Module sfnt_module = FT_Get_Module( library, "sfnt" );
621 FT_Service_PsFontName service =
622 (FT_Service_PsFontName)ft_module_get_service(
623 sfnt_module,
625 0 );
626
627
628 if ( service && service->get_ps_font_name )
629 return service->get_ps_font_name( FT_FACE( face ) );
630 }
631
632 return (const char*)cff->font_name;
633 }
634
635
638
639 (FT_PsName_GetFunc)cff_get_ps_name /* get_ps_font_name */
640 )
641
642
643 /*
644 * TT CMAP INFO
645 *
646 * If the charmap is a synthetic Unicode encoding cmap or
647 * a Type 1 standard (or expert) encoding cmap, hide TT CMAP INFO
648 * service defined in SFNT module.
649 *
650 * Otherwise call the service function in the sfnt module.
651 *
652 */
653 static FT_Error
654 cff_get_cmap_info( FT_CharMap charmap,
656 {
657 FT_CMap cmap = FT_CMAP( charmap );
659
662
663
664 if ( cmap->clazz != &cff_cmap_encoding_class_rec &&
665 cmap->clazz != &cff_cmap_unicode_class_rec )
666 {
667 FT_Module sfnt = FT_Get_Module( library, "sfnt" );
668 FT_Service_TTCMaps service =
669 (FT_Service_TTCMaps)ft_module_get_service( sfnt,
671 0 );
672
673
674 if ( service && service->get_cmap_info )
675 error = service->get_cmap_info( charmap, cmap_info );
676 }
677 else
678 error = FT_THROW( Invalid_CharMap_Format );
679
680 return error;
681 }
682
683
686
687 (TT_CMap_Info_GetFunc)cff_get_cmap_info /* get_cmap_info */
688 )
689
690
691 /*
692 * CID INFO SERVICE
693 *
694 */
695 static FT_Error
696 cff_get_ros( CFF_Face face,
697 const char* *registry,
698 const char* *ordering,
700 {
702 CFF_Font cff = (CFF_Font)face->extra.data;
703
704
705 if ( cff )
706 {
708
709
710 if ( dict->cid_registry == 0xFFFFU )
711 {
712 error = FT_THROW( Invalid_Argument );
713 goto Fail;
714 }
715
716 if ( registry )
717 {
718 if ( !cff->registry )
720 dict->cid_registry );
722 }
723
724 if ( ordering )
725 {
726 if ( !cff->ordering )
728 dict->cid_ordering );
730 }
731
732 /*
733 * XXX: According to Adobe TechNote #5176, the supplement in CFF
734 * can be a real number. We truncate it to fit public API
735 * since freetype-2.3.6.
736 */
737 if ( supplement )
738 {
739 if ( dict->cid_supplement < FT_INT_MIN ||
740 dict->cid_supplement > FT_INT_MAX )
741 FT_TRACE1(( "cff_get_ros: too large supplement %d is truncated\n",
742 dict->cid_supplement ));
744 }
745 }
746
748 return error;
749 }
750
751
752 static FT_Error
754 FT_Bool *is_cid )
755 {
757 CFF_Font cff = (CFF_Font)face->extra.data;
758
759
760 *is_cid = 0;
761
762 if ( cff )
763 {
765
766
767 if ( dict->cid_registry != 0xFFFFU )
768 *is_cid = 1;
769 }
770
771 return error;
772 }
773
774
775 static FT_Error
777 FT_UInt glyph_index,
778 FT_UInt *cid )
779 {
782
783
784 cff = (CFF_Font)face->extra.data;
785
786 if ( cff )
787 {
788 FT_UInt c;
790
791
792 if ( dict->cid_registry == 0xFFFFU )
793 {
794 error = FT_THROW( Invalid_Argument );
795 goto Fail;
796 }
797
798 if ( glyph_index >= cff->num_glyphs )
799 {
800 error = FT_THROW( Invalid_Argument );
801 goto Fail;
802 }
803
804 c = cff->charset.sids[glyph_index];
805
806 if ( cid )
807 *cid = c;
808 }
809
810 Fail:
811 return error;
812 }
813
814
817
819 cff_get_ros, /* get_ros */
821 cff_get_is_cid, /* get_is_cid */
823 cff_get_cid_from_glyph_index /* get_cid_from_glyph_index */
824 )
825
826
827 /*
828 * PROPERTY SERVICE
829 *
830 */
831
834
836 (FT_Properties_GetFunc)ps_property_get ) /* get_property */
837
838
839#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
840
841 /*
842 * MULTIPLE MASTER SERVICE
843 *
844 */
845
846 static FT_Error
847 cff_set_mm_blend( CFF_Face face,
848 FT_UInt num_coords,
850 {
851 FT_Service_MultiMasters mm = (FT_Service_MultiMasters)face->mm;
852
853
854 return mm->set_mm_blend( FT_FACE( face ), num_coords, coords );
855 }
856
857
858 static FT_Error
859 cff_get_mm_blend( CFF_Face face,
860 FT_UInt num_coords,
862 {
863 FT_Service_MultiMasters mm = (FT_Service_MultiMasters)face->mm;
864
865
866 return mm->get_mm_blend( FT_FACE( face ), num_coords, coords );
867 }
868
869
870 static FT_Error
871 cff_set_mm_weightvector( CFF_Face face,
872 FT_UInt len,
873 FT_Fixed* weightvector )
874 {
875 FT_Service_MultiMasters mm = (FT_Service_MultiMasters)face->mm;
876
877
878 return mm->set_mm_weightvector( FT_FACE( face ), len, weightvector );
879 }
880
881
882 static FT_Error
883 cff_get_mm_weightvector( CFF_Face face,
884 FT_UInt* len,
885 FT_Fixed* weightvector )
886 {
887 FT_Service_MultiMasters mm = (FT_Service_MultiMasters)face->mm;
888
889
890 return mm->get_mm_weightvector( FT_FACE( face ), len, weightvector );
891 }
892
893
894 static FT_Error
895 cff_get_mm_var( CFF_Face face,
896 FT_MM_Var* *master )
897 {
898 FT_Service_MultiMasters mm = (FT_Service_MultiMasters)face->mm;
899
900
901 return mm->get_mm_var( FT_FACE( face ), master );
902 }
903
904
905 static FT_Error
906 cff_set_var_design( CFF_Face face,
907 FT_UInt num_coords,
909 {
910 FT_Service_MultiMasters mm = (FT_Service_MultiMasters)face->mm;
911
912
913 return mm->set_var_design( FT_FACE( face ), num_coords, coords );
914 }
915
916
917 static FT_Error
918 cff_get_var_design( CFF_Face face,
919 FT_UInt num_coords,
921 {
922 FT_Service_MultiMasters mm = (FT_Service_MultiMasters)face->mm;
923
924
925 return mm->get_var_design( FT_FACE( face ), num_coords, coords );
926 }
927
928
929 static FT_Error
930 cff_set_instance( CFF_Face face,
931 FT_UInt instance_index )
932 {
933 FT_Service_MultiMasters mm = (FT_Service_MultiMasters)face->mm;
934
935
936 return mm->set_instance( FT_FACE( face ), instance_index );
937 }
938
939
941 cff_service_multi_masters,
942
943 (FT_Get_MM_Func) NULL, /* get_mm */
944 (FT_Set_MM_Design_Func) NULL, /* set_mm_design */
945 (FT_Set_MM_Blend_Func) cff_set_mm_blend, /* set_mm_blend */
946 (FT_Get_MM_Blend_Func) cff_get_mm_blend, /* get_mm_blend */
947 (FT_Get_MM_Var_Func) cff_get_mm_var, /* get_mm_var */
948 (FT_Set_Var_Design_Func) cff_set_var_design, /* set_var_design */
949 (FT_Get_Var_Design_Func) cff_get_var_design, /* get_var_design */
950 (FT_Set_Instance_Func) cff_set_instance, /* set_instance */
951 (FT_Set_MM_WeightVector_Func)cff_set_mm_weightvector, /* set_mm_weightvector */
952 (FT_Get_MM_WeightVector_Func)cff_get_mm_weightvector, /* get_mm_weightvector */
953
954 (FT_Get_Var_Blend_Func) cff_get_var_blend, /* get_var_blend */
955 (FT_Done_Blend_Func) cff_done_blend /* done_blend */
956 )
957
958
959 /*
960 * METRICS VARIATIONS SERVICE
961 *
962 */
963
964 static FT_Error
965 cff_hadvance_adjust( CFF_Face face,
966 FT_UInt gindex,
967 FT_Int *avalue )
968 {
969 FT_Service_MetricsVariations var = (FT_Service_MetricsVariations)face->var;
970
971
972 return var->hadvance_adjust( FT_FACE( face ), gindex, avalue );
973 }
974
975
976 static void
977 cff_metrics_adjust( CFF_Face face )
978 {
979 FT_Service_MetricsVariations var = (FT_Service_MetricsVariations)face->var;
980
981
982 var->metrics_adjust( FT_FACE( face ) );
983 }
984
985
987 cff_service_metrics_variations,
988
989 (FT_HAdvance_Adjust_Func)cff_hadvance_adjust, /* hadvance_adjust */
990 (FT_LSB_Adjust_Func) NULL, /* lsb_adjust */
991 (FT_RSB_Adjust_Func) NULL, /* rsb_adjust */
992
993 (FT_VAdvance_Adjust_Func)NULL, /* vadvance_adjust */
994 (FT_TSB_Adjust_Func) NULL, /* tsb_adjust */
995 (FT_BSB_Adjust_Func) NULL, /* bsb_adjust */
996 (FT_VOrg_Adjust_Func) NULL, /* vorg_adjust */
997
998 (FT_Metrics_Adjust_Func) cff_metrics_adjust /* metrics_adjust */
999 )
1000#endif
1001
1002
1003 /*
1004 * CFFLOAD SERVICE
1005 *
1006 */
1007
1009 cff_service_cff_load,
1010
1016 )
1017
1018
1019 /*************************************************************************/
1020 /*************************************************************************/
1021 /*************************************************************************/
1022 /**** ****/
1023 /**** ****/
1024 /**** D R I V E R I N T E R F A C E ****/
1025 /**** ****/
1026 /**** ****/
1027 /*************************************************************************/
1028 /*************************************************************************/
1029 /*************************************************************************/
1030
1031#if !defined FT_CONFIG_OPTION_NO_GLYPH_NAMES && \
1032 defined TT_CONFIG_OPTION_GX_VAR_SUPPORT
1034 cff_services,
1035
1037 FT_SERVICE_ID_MULTI_MASTERS, &cff_service_multi_masters,
1038 FT_SERVICE_ID_METRICS_VARIATIONS, &cff_service_metrics_variations,
1045 FT_SERVICE_ID_CFF_LOAD, &cff_service_cff_load
1046 )
1047#elif !defined FT_CONFIG_OPTION_NO_GLYPH_NAMES
1049 cff_services,
1050
1058 FT_SERVICE_ID_CFF_LOAD, &cff_service_cff_load
1059 )
1060#elif defined TT_CONFIG_OPTION_GX_VAR_SUPPORT
1062 cff_services,
1063
1065 FT_SERVICE_ID_MULTI_MASTERS, &cff_service_multi_masters,
1066 FT_SERVICE_ID_METRICS_VARIATIONS, &cff_service_metrics_var,
1072 FT_SERVICE_ID_CFF_LOAD, &cff_service_cff_load
1073 )
1074#else
1076 cff_services,
1077
1084 FT_SERVICE_ID_CFF_LOAD, &cff_service_cff_load
1085 )
1086#endif
1087
1088
1091 const char* module_interface )
1092 {
1096
1097
1099 if ( result )
1100 return result;
1101
1102 /* `driver' is not yet evaluated */
1103 if ( !driver )
1104 return NULL;
1105 library = driver->library;
1106 if ( !library )
1107 return NULL;
1108
1109 /* we pass our request to the `sfnt' module */
1110 sfnt = FT_Get_Module( library, "sfnt" );
1111
1112 return sfnt ? sfnt->clazz->get_interface( sfnt, module_interface ) : 0;
1113 }
1114
1115
1116 /* The FT_DriverInterface structure is defined in ftdriver.h. */
1117
1118#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
1119#define CFF_SIZE_SELECT cff_size_select
1120#else
1121#define CFF_SIZE_SELECT 0
1122#endif
1123
1125 cff_driver_class,
1126
1131
1132 sizeof ( PS_DriverRec ),
1133 "cff",
1134 0x10000L,
1135 0x20000L,
1136
1137 NULL, /* module-specific interface */
1138
1139 cff_driver_init, /* FT_Module_Constructor module_init */
1140 cff_driver_done, /* FT_Module_Destructor module_done */
1141 cff_get_interface, /* FT_Module_Requester get_interface */
1142
1143 sizeof ( TT_FaceRec ),
1144 sizeof ( CFF_SizeRec ),
1145 sizeof ( CFF_GlyphSlotRec ),
1146
1147 cff_face_init, /* FT_Face_InitFunc init_face */
1148 cff_face_done, /* FT_Face_DoneFunc done_face */
1149 cff_size_init, /* FT_Size_InitFunc init_size */
1150 cff_size_done, /* FT_Size_DoneFunc done_size */
1151 cff_slot_init, /* FT_Slot_InitFunc init_slot */
1152 cff_slot_done, /* FT_Slot_DoneFunc done_slot */
1153
1154 cff_glyph_load, /* FT_Slot_LoadFunc load_glyph */
1155
1156 cff_get_kerning, /* FT_Face_GetKerningFunc get_kerning */
1157 NULL, /* FT_Face_AttachFunc attach_file */
1158 cff_get_advances, /* FT_Face_GetAdvancesFunc get_advances */
1159
1160 cff_size_request, /* FT_Size_RequestFunc request_size */
1161 CFF_SIZE_SELECT /* FT_Size_SelectFunc select_size */
1162 )
1163
1164
1165/* 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:698
CFF_Font cff
Definition: cffdrivr.c:702
static FT_Error cff_get_cid_from_glyph_index(CFF_Face face, FT_UInt glyph_index, FT_UInt *cid)
Definition: cffdrivr.c:776
const char const char FT_Int * supplement
Definition: cffdrivr.c:700
cff_get_advances(FT_Face face, FT_UInt start, FT_UInt count, FT_Int32 flags, FT_Fixed *advances)
Definition: cffdrivr.c:203
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get &cff_service_cff_load cff_get_interface(FT_Module driver, const char *module_interface)
Definition: cffdrivr.c:1090
#define CFF_SIZE_SELECT
Definition: cffdrivr.c:1121
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get FT_SERVICE_ID_PROPERTIES
Definition: cffdrivr.c:1057
static FT_Error cff_ps_get_font_extra(CFF_Face face, PS_FontExtraRec *afont_extra)
Definition: cffdrivr.c:512
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get & cff_service_get_cmap_info
Definition: cffdrivr.c:1055
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get & cff_service_glyph_dict
Definition: cffdrivr.c:1054
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get FT_SERVICE_ID_TT_CMAP
Definition: cffdrivr.c:1055
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get & cff_service_cid_info
Definition: cffdrivr.c:1056
FT_Properties_SetFunc ps_property_set
Definition: cffdrivr.c:835
static FT_Error cff_get_glyph_name(CFF_Face face, FT_UInt glyph_index, FT_Pointer buffer, FT_UInt buffer_max)
Definition: cffdrivr.c:317
cff_get_kerning(FT_Face ttface, FT_UInt left_glyph, FT_UInt right_glyph, FT_Vector *kerning)
Definition: cffdrivr.c:112
cff_glyph_load(FT_GlyphSlot cffslot, FT_Size cffsize, FT_UInt glyph_index, FT_Int32 load_flags)
Definition: cffdrivr.c:162
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get FT_SERVICE_ID_POSTSCRIPT_FONT_NAME
Definition: cffdrivr.c:1053
static FT_Error cff_ps_get_font_info(CFF_Face face, PS_FontInfoRec *afont_info)
Definition: cffdrivr.c:468
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get & cff_service_properties
Definition: cffdrivr.c:1057
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get FT_SERVICE_ID_CFF_LOAD
Definition: cffdrivr.c:1058
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get & cff_service_ps_name
Definition: cffdrivr.c:1053
static FT_Error cff_get_is_cid(CFF_Face face, FT_Bool *is_cid)
Definition: cffdrivr.c:753
const char ** registry
Definition: cffdrivr.c:697
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get & cff_service_ps_info
Definition: cffdrivr.c:1052
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get FT_SERVICE_ID_GLYPH_DICT
Definition: cffdrivr.c:1054
FT_Library library
Definition: cffdrivr.c:661
FT_Error error
Definition: cffdrivr.c:658
static FT_UInt cff_get_name_index(CFF_Face face, FT_String *glyph_name)
Definition: cffdrivr.c:384
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get FT_FONT_FORMAT_CFF
Definition: cffdrivr.c:1051
TT_CMapInfo * cmap_info
Definition: cffdrivr.c:656
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get FT_SERVICE_ID_FONT_FORMAT
Definition: cffdrivr.c:1051
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get FT_SERVICE_ID_CID
Definition: cffdrivr.c:1056
FT_Properties_SetFunc FT_Properties_GetFunc ps_property_get FT_SERVICE_ID_POSTSCRIPT_INFO
Definition: cffdrivr.c:1052
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:1872
cff_blend_check_vector(CFF_Blend blend, FT_UInt vsindex, FT_UInt lenNDV, FT_Fixed *NDV)
Definition: cffload.c:1561
cff_face_done(FT_Face cffface)
Definition: cffobjs.c:1123
cff_slot_done(FT_GlyphSlot slot)
Definition: cffobjs.c:350
cff_size_init(FT_Size cffsize)
Definition: cffobjs.c:164
cff_slot_init(FT_GlyphSlot slot)
Definition: cffobjs.c:357
cff_size_request(FT_Size size, FT_Size_Request req)
Definition: cffobjs.c:274
cff_driver_done(FT_Module module)
Definition: cffobjs.c:1200
cff_size_done(FT_Size cffsize)
Definition: cffobjs.c:82
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:489
FT_BEGIN_HEADER typedef TT_Face CFF_Face
Definition: cffotypes.h:33
struct CFF_GlyphSlotRec_ * CFF_GlyphSlot
struct CFF_SizeRec_ * CFF_Size
struct CFF_FontRec_ * CFF_Font
Definition: cfftypes.h:157
#define NULL
Definition: types.h:112
int Fail
Definition: ehthrow.cxx:24
#define FT_LOAD_VERTICAL_LAYOUT
Definition: freetype.h:3031
#define FT_IS_SFNT(face)
Definition: freetype.h:1303
#define FT_LOAD_NO_SCALE
Definition: freetype.h:3027
#define FT_LOAD_ADVANCE_ONLY
Definition: freetype.h:3049
#define FT_LOAD_NO_HINTING
Definition: freetype.h:3028
#define FT_IS_VARIATION(face)
Definition: freetype.h:1414
#define FT_FACE_FLAG_GLYPH_NAMES
Definition: freetype.h:1219
#define FT_IS_NAMED_INSTANCE(face)
Definition: freetype.h:1396
return FT_Err_Ok
Definition: ftbbox.c:527
#define FT_CALLBACK_DEF(x)
Definition: ftconfig.h:544
#define FT_ERROR(varformat)
Definition: ftdebug.h:209
#define FT_TRACE5(varformat)
Definition: ftdebug.h:190
#define FT_THROW(e)
Definition: ftdebug.h:241
#define FT_TRACE1(varformat)
Definition: ftdebug.h:186
#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:220
#define FT_ALLOC(ptr, size)
Definition: ftmemory.h:302
#define FT_STRCPYN(dst, src, size)
Definition: ftmemory.h:381
#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:4964
#define FT_MODULE_DRIVER_SCALABLE
Definition: ftmodapi.h:115
#define FT_FACE_LIBRARY(x)
Definition: ftobjs.h:604
#define FT_FACE(x)
Definition: ftobjs.h:599
ft_module_get_service(FT_Module module, const char *service_id, FT_Bool global)
Definition: ftobjs.c:5007
#define FT_CMAP(x)
Definition: ftobjs.h:157
#define FT_CMAP_FACE(x)
Definition: ftobjs.h:163
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:302
#define FT_FACE_FIND_GLOBAL_SERVICE(face, ptr, id)
Definition: ftserv.h:127
#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:260
ft_service_list_lookup(FT_ServiceDesc service_descriptors, const char *service_id)
Definition: ftobjs.c:110
#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:280
#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:326
#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:65
FT_BEGIN_HEADER typedef unsigned char FT_Bool
Definition: fttypes.h:108
signed long FT_Fixed
Definition: fttypes.h:287
int FT_Error
Definition: fttypes.h:299
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
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLdouble s
Definition: gl.h:2039
GLuint buffer
Definition: glext.h:5915
GLsizeiptr size
Definition: glext.h:5919
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
GLenum GLsizei len
Definition: glext.h:6722
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 @1708::@1709 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:1184
SFNT_Interface * SFNT_Service
Definition: sfnt.h:784
static void Exit(void)
Definition: sock.c:1330
FT_UShort * sids
Definition: cfftypes.h:103
FT_UInt family_name
Definition: cfftypes.h:191
FT_UInt cid_ordering
Definition: cfftypes.h:216
FT_UInt embedded_postscript
Definition: cfftypes.h:212
FT_UInt cid_registry
Definition: cfftypes.h:215
FT_Bool is_fixed_pitch
Definition: cfftypes.h:193
FT_Fixed underline_position
Definition: cfftypes.h:195
FT_Fixed underline_thickness
Definition: cfftypes.h:196
FT_Long cid_supplement
Definition: cfftypes.h:217
FT_Fixed italic_angle
Definition: cfftypes.h:194
FT_String * font_name
Definition: cfftypes.h:367
FT_Byte version_major
Definition: cfftypes.h:347
CFF_CharsetRec charset
Definition: cfftypes.h:360
CFF_SubFontRec top_font
Definition: cfftypes.h:378
PS_FontExtraRec * font_extra
Definition: cfftypes.h:407
FT_String * registry
Definition: cfftypes.h:397
FT_String * ordering
Definition: cfftypes.h:398
PS_FontInfoRec * font_info
Definition: cfftypes.h:394
FT_UInt num_glyphs
Definition: cfftypes.h:345
CFF_FontRecDictRec font_dict
Definition: cfftypes.h:305
FT_CMap_Class clazz
Definition: ftobjs.h:152
FT_Pos x
Definition: ftimage.h:78
FT_Pos y
Definition: ftimage.h:79
FT_UShort fs_type
Definition: t1types.h:92
FT_Module_Requester get_interface
Definition: sfnt.h:717
TT_Face_GetKerningFunc get_kerning
Definition: sfnt.h:752
FT_Bool vertical_info
Definition: tttypes.h:1551
void * sfnt
Definition: tttypes.h:1573
TT_HoriHeader horizontal
Definition: tttypes.h:1547
FT_UShort number_Of_HMetrics
Definition: tttables.h:220
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:68
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:51
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:55
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:96
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
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
#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_, set_weightvector_, get_weightvector_, get_var_blend_, done_blend_)
Definition: svmm.h:119
FT_Error(* FT_Get_Var_Design_Func)(FT_Face face, FT_UInt num_coords, FT_Fixed *coords)
Definition: svmm.h:66
FT_Error(* FT_Get_MM_WeightVector_Func)(FT_Face face, FT_UInt *len, FT_Fixed *weight_vector)
Definition: svmm.h:95
FT_Error(* FT_Set_MM_WeightVector_Func)(FT_Face face, FT_UInt len, FT_Fixed *weight_vector)
Definition: svmm.h:90
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:50
#define FT_DEFINE_SERVICE_PROPERTIESREC(class_, set_property_, get_property_)
Definition: svprop.h:48
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:65
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:66
#define FT_DEFINE_SERVICE_TTCMAPSREC(class_, get_cmap_info_)
Definition: svttcmap.h:76
FT_BEGIN_HEADER struct PS_FontInfoRec_ PS_FontInfoRec
FT_UInt FT_UInt FT_Vector * kerning
Definition: ttdriver.c:207
FT_UInt left_glyph
Definition: ttdriver.c:204
SFNT_Service sfnt
Definition: ttdriver.c:209
FT_UInt FT_UInt right_glyph
Definition: ttdriver.c:205
#define TT_FACE_FLAG_VAR_HADVANCE
Definition: tttypes.h:1211
struct TT_FaceRec_ * TT_Face
Definition: tttypes.h:1064
#define TT_FACE_FLAG_VAR_VADVANCE
Definition: tttypes.h:1216
#define const
Definition: zconf.h:233