ReactOS 0.4.16-dev-2332-g4cba65d
t1driver.c
Go to the documentation of this file.
1/****************************************************************************
2 *
3 * t1driver.c
4 *
5 * Type 1 driver interface (body).
6 *
7 * Copyright (C) 1996-2020 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 "t1driver.h"
20#include "t1gload.h"
21#include "t1load.h"
22
23#include "t1errors.h"
24
25#ifndef T1_CONFIG_OPTION_NO_AFM
26#include "t1afm.h"
27#endif
28
33#include <freetype/ftdriver.h>
34
43
44
45 /**************************************************************************
46 *
47 * The macro FT_COMPONENT is used in trace mode. It is an implicit
48 * parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log
49 * messages during execution.
50 */
51#undef FT_COMPONENT
52#define FT_COMPONENT t1driver
53
54 /*
55 * GLYPH DICT SERVICE
56 *
57 */
58
59 static FT_Error
61 FT_UInt glyph_index,
63 FT_UInt buffer_max )
64 {
65 FT_STRCPYN( buffer, face->type1.glyph_names[glyph_index], buffer_max );
66
67 return FT_Err_Ok;
68 }
69
70
71 static FT_UInt
73 const FT_String* glyph_name )
74 {
75 FT_Int i;
76
77
78 for ( i = 0; i < face->type1.num_glyphs; i++ )
79 {
80 FT_String* gname = face->type1.glyph_names[i];
81
82
83 if ( !ft_strcmp( glyph_name, gname ) )
84 return (FT_UInt)i;
85 }
86
87 return 0;
88 }
89
90
91 static const FT_Service_GlyphDictRec t1_service_glyph_dict =
92 {
95 };
96
97
98 /*
99 * POSTSCRIPT NAME SERVICE
100 *
101 */
102
103 static const char*
105 {
106 return (const char*) face->type1.font_name;
107 }
108
109
110 static const FT_Service_PsFontNameRec t1_service_ps_name =
111 {
112 (FT_PsName_GetFunc)t1_get_ps_name /* get_ps_font_name */
113 };
114
115
116 /*
117 * MULTIPLE MASTERS SERVICE
118 *
119 */
120
121#ifndef T1_CONFIG_OPTION_NO_MM_SUPPORT
122 static const FT_Service_MultiMastersRec t1_service_multi_masters =
123 {
124 (FT_Get_MM_Func) T1_Get_Multi_Master, /* get_mm */
125 (FT_Set_MM_Design_Func) T1_Set_MM_Design, /* set_mm_design */
126 (FT_Set_MM_Blend_Func) T1_Set_MM_Blend, /* set_mm_blend */
127 (FT_Get_MM_Blend_Func) T1_Get_MM_Blend, /* get_mm_blend */
128 (FT_Get_MM_Var_Func) T1_Get_MM_Var, /* get_mm_var */
129 (FT_Set_Var_Design_Func) T1_Set_Var_Design, /* set_var_design */
130 (FT_Get_Var_Design_Func) T1_Get_Var_Design, /* get_var_design */
131 (FT_Set_Instance_Func) T1_Reset_MM_Blend, /* set_instance */
132 (FT_Set_MM_WeightVector_Func)T1_Set_MM_WeightVector, /* set_mm_weightvector */
133 (FT_Get_MM_WeightVector_Func)T1_Get_MM_WeightVector, /* get_mm_weightvector */
134
135 (FT_Get_Var_Blend_Func) NULL, /* get_var_blend */
136 (FT_Done_Blend_Func) T1_Done_Blend /* done_blend */
137 };
138#endif
139
140
141 /*
142 * POSTSCRIPT INFO SERVICE
143 *
144 */
145
146 static FT_Error
148 PS_FontInfoRec* afont_info )
149 {
150 *afont_info = ((T1_Face)face)->type1.font_info;
151
152 return FT_Err_Ok;
153 }
154
155
156 static FT_Error
158 PS_FontExtraRec* afont_extra )
159 {
160 *afont_extra = ((T1_Face)face)->type1.font_extra;
161
162 return FT_Err_Ok;
163 }
164
165
166 static FT_Int
168 {
169 FT_UNUSED( face );
170
171 return 1;
172 }
173
174
175 static FT_Error
177 PS_PrivateRec* afont_private )
178 {
179 *afont_private = ((T1_Face)face)->type1.private_dict;
180
181 return FT_Err_Ok;
182 }
183
184
185 static FT_Long
188 FT_UInt idx,
189 void *value,
190 FT_Long value_len_ )
191 {
192 FT_ULong retval = 0; /* always >= 1 if valid */
193 FT_ULong value_len = value_len_ < 0 ? 0 : (FT_ULong)value_len_;
194
195 T1_Face t1face = (T1_Face)face;
196 T1_Font type1 = &t1face->type1;
197
198
199 switch ( key )
200 {
202 retval = sizeof ( type1->font_type );
203 if ( value && value_len >= retval )
204 *((FT_Byte *)value) = type1->font_type;
205 break;
206
208 if ( idx < sizeof ( type1->font_matrix ) /
209 sizeof ( type1->font_matrix.xx ) )
210 {
211 FT_Fixed val = 0;
212
213
214 retval = sizeof ( val );
215 if ( value && value_len >= retval )
216 {
217 switch ( idx )
218 {
219 case 0:
220 val = type1->font_matrix.xx;
221 break;
222 case 1:
223 val = type1->font_matrix.xy;
224 break;
225 case 2:
226 val = type1->font_matrix.yx;
227 break;
228 case 3:
229 val = type1->font_matrix.yy;
230 break;
231 }
232 *((FT_Fixed *)value) = val;
233 }
234 }
235 break;
236
238 if ( idx < sizeof ( type1->font_bbox ) /
239 sizeof ( type1->font_bbox.xMin ) )
240 {
241 FT_Fixed val = 0;
242
243
244 retval = sizeof ( val );
245 if ( value && value_len >= retval )
246 {
247 switch ( idx )
248 {
249 case 0:
250 val = type1->font_bbox.xMin;
251 break;
252 case 1:
253 val = type1->font_bbox.yMin;
254 break;
255 case 2:
256 val = type1->font_bbox.xMax;
257 break;
258 case 3:
259 val = type1->font_bbox.yMax;
260 break;
261 }
262 *((FT_Fixed *)value) = val;
263 }
264 }
265 break;
266
268 retval = sizeof ( type1->paint_type );
269 if ( value && value_len >= retval )
270 *((FT_Byte *)value) = type1->paint_type;
271 break;
272
274 if ( type1->font_name )
275 {
276 retval = ft_strlen( type1->font_name ) + 1;
277 if ( value && value_len >= retval )
278 ft_memcpy( value, (void *)( type1->font_name ), retval );
279 }
280 break;
281
283 retval = sizeof ( type1->private_dict.unique_id );
284 if ( value && value_len >= retval )
285 *((FT_Int *)value) = type1->private_dict.unique_id;
286 break;
287
289 retval = sizeof ( type1->num_glyphs );
290 if ( value && value_len >= retval )
291 *((FT_Int *)value) = type1->num_glyphs;
292 break;
293
295 if ( idx < (FT_UInt)type1->num_glyphs )
296 {
297 retval = ft_strlen( type1->glyph_names[idx] ) + 1;
298 if ( value && value_len >= retval )
299 {
300 ft_memcpy( value, (void *)( type1->glyph_names[idx] ), retval );
301 ((FT_Char *)value)[retval - 1] = (FT_Char)'\0';
302 }
303 }
304 break;
305
307 if ( idx < (FT_UInt)type1->num_glyphs )
308 {
309 retval = type1->charstrings_len[idx] + 1;
310 if ( value && value_len >= retval )
311 {
312 ft_memcpy( value, (void *)( type1->charstrings[idx] ),
313 retval - 1 );
314 ((FT_Char *)value)[retval - 1] = (FT_Char)'\0';
315 }
316 }
317 break;
318
320 retval = sizeof ( type1->encoding_type );
321 if ( value && value_len >= retval )
322 *((T1_EncodingType *)value) = type1->encoding_type;
323 break;
324
326 if ( type1->encoding_type == T1_ENCODING_TYPE_ARRAY &&
327 idx < (FT_UInt)type1->encoding.num_chars )
328 {
329 retval = ft_strlen( type1->encoding.char_name[idx] ) + 1;
330 if ( value && value_len >= retval )
331 {
332 ft_memcpy( value, (void *)( type1->encoding.char_name[idx] ),
333 retval - 1 );
334 ((FT_Char *)value)[retval - 1] = (FT_Char)'\0';
335 }
336 }
337 break;
338
340 retval = sizeof ( type1->num_subrs );
341 if ( value && value_len >= retval )
342 *((FT_Int *)value) = type1->num_subrs;
343 break;
344
345 case PS_DICT_SUBR:
346 {
347 FT_Bool ok = 0;
348
349
350 if ( type1->subrs_hash )
351 {
352 /* convert subr index to array index */
353 size_t* val = ft_hash_num_lookup( (FT_Int)idx,
354 type1->subrs_hash );
355
356
357 if ( val )
358 {
359 idx = *val;
360 ok = 1;
361 }
362 }
363 else
364 {
365 if ( idx < (FT_UInt)type1->num_subrs )
366 ok = 1;
367 }
368
369 if ( ok && type1->subrs )
370 {
371 retval = type1->subrs_len[idx] + 1;
372 if ( value && value_len >= retval )
373 {
374 ft_memcpy( value, (void *)( type1->subrs[idx] ), retval - 1 );
375 ((FT_Char *)value)[retval - 1] = (FT_Char)'\0';
376 }
377 }
378 }
379 break;
380
381 case PS_DICT_STD_HW:
382 retval = sizeof ( type1->private_dict.standard_width[0] );
383 if ( value && value_len >= retval )
384 *((FT_UShort *)value) = type1->private_dict.standard_width[0];
385 break;
386
387 case PS_DICT_STD_VW:
388 retval = sizeof ( type1->private_dict.standard_height[0] );
389 if ( value && value_len >= retval )
391 break;
392
394 retval = sizeof ( type1->private_dict.num_blue_values );
395 if ( value && value_len >= retval )
397 break;
398
400 if ( idx < type1->private_dict.num_blue_values )
401 {
402 retval = sizeof ( type1->private_dict.blue_values[idx] );
403 if ( value && value_len >= retval )
404 *((FT_Short *)value) = type1->private_dict.blue_values[idx];
405 }
406 break;
407
409 retval = sizeof ( type1->private_dict.blue_scale );
410 if ( value && value_len >= retval )
411 *((FT_Fixed *)value) = type1->private_dict.blue_scale;
412 break;
413
415 retval = sizeof ( type1->private_dict.blue_fuzz );
416 if ( value && value_len >= retval )
417 *((FT_Int *)value) = type1->private_dict.blue_fuzz;
418 break;
419
421 retval = sizeof ( type1->private_dict.blue_shift );
422 if ( value && value_len >= retval )
423 *((FT_Int *)value) = type1->private_dict.blue_shift;
424 break;
425
427 retval = sizeof ( type1->private_dict.num_other_blues );
428 if ( value && value_len >= retval )
430 break;
431
433 if ( idx < type1->private_dict.num_other_blues )
434 {
435 retval = sizeof ( type1->private_dict.other_blues[idx] );
436 if ( value && value_len >= retval )
437 *((FT_Short *)value) = type1->private_dict.other_blues[idx];
438 }
439 break;
440
442 retval = sizeof ( type1->private_dict.num_family_blues );
443 if ( value && value_len >= retval )
445 break;
446
448 if ( idx < type1->private_dict.num_family_blues )
449 {
450 retval = sizeof ( type1->private_dict.family_blues[idx] );
451 if ( value && value_len >= retval )
453 }
454 break;
455
457 retval = sizeof ( type1->private_dict.num_family_other_blues );
458 if ( value && value_len >= retval )
460 break;
461
463 if ( idx < type1->private_dict.num_family_other_blues )
464 {
465 retval = sizeof ( type1->private_dict.family_other_blues[idx] );
466 if ( value && value_len >= retval )
468 }
469 break;
470
472 retval = sizeof ( type1->private_dict.num_snap_widths );
473 if ( value && value_len >= retval )
475 break;
476
478 if ( idx < type1->private_dict.num_snap_widths )
479 {
480 retval = sizeof ( type1->private_dict.snap_widths[idx] );
481 if ( value && value_len >= retval )
482 *((FT_Short *)value) = type1->private_dict.snap_widths[idx];
483 }
484 break;
485
487 retval = sizeof ( type1->private_dict.num_snap_heights );
488 if ( value && value_len >= retval )
490 break;
491
493 if ( idx < type1->private_dict.num_snap_heights )
494 {
495 retval = sizeof ( type1->private_dict.snap_heights[idx] );
496 if ( value && value_len >= retval )
498 }
499 break;
500
502 retval = sizeof ( type1->private_dict.round_stem_up );
503 if ( value && value_len >= retval )
505 break;
506
508 retval = sizeof ( type1->private_dict.force_bold );
509 if ( value && value_len >= retval )
510 *((FT_Bool *)value) = type1->private_dict.force_bold;
511 break;
512
514 if ( idx < sizeof ( type1->private_dict.min_feature ) /
515 sizeof ( type1->private_dict.min_feature[0] ) )
516 {
517 retval = sizeof ( type1->private_dict.min_feature[idx] );
518 if ( value && value_len >= retval )
519 *((FT_Short *)value) = type1->private_dict.min_feature[idx];
520 }
521 break;
522
523 case PS_DICT_LEN_IV:
524 retval = sizeof ( type1->private_dict.lenIV );
525 if ( value && value_len >= retval )
526 *((FT_Int *)value) = type1->private_dict.lenIV;
527 break;
528
529 case PS_DICT_PASSWORD:
530 retval = sizeof ( type1->private_dict.password );
531 if ( value && value_len >= retval )
532 *((FT_Long *)value) = type1->private_dict.password;
533 break;
534
536 retval = sizeof ( type1->private_dict.language_group );
537 if ( value && value_len >= retval )
539 break;
540
542 retval = sizeof ( type1->font_info.is_fixed_pitch );
543 if ( value && value_len >= retval )
544 *((FT_Bool *)value) = type1->font_info.is_fixed_pitch;
545 break;
546
548 retval = sizeof ( type1->font_info.underline_position );
549 if ( value && value_len >= retval )
550 *((FT_Short *)value) = type1->font_info.underline_position;
551 break;
552
554 retval = sizeof ( type1->font_info.underline_thickness );
555 if ( value && value_len >= retval )
556 *((FT_UShort *)value) = type1->font_info.underline_thickness;
557 break;
558
559 case PS_DICT_FS_TYPE:
560 retval = sizeof ( type1->font_extra.fs_type );
561 if ( value && value_len >= retval )
562 *((FT_UShort *)value) = type1->font_extra.fs_type;
563 break;
564
565 case PS_DICT_VERSION:
566 if ( type1->font_info.version )
567 {
568 retval = ft_strlen( type1->font_info.version ) + 1;
569 if ( value && value_len >= retval )
570 ft_memcpy( value, (void *)( type1->font_info.version ), retval );
571 }
572 break;
573
574 case PS_DICT_NOTICE:
575 if ( type1->font_info.notice )
576 {
577 retval = ft_strlen( type1->font_info.notice ) + 1;
578 if ( value && value_len >= retval )
579 ft_memcpy( value, (void *)( type1->font_info.notice ), retval );
580 }
581 break;
582
584 if ( type1->font_info.full_name )
585 {
586 retval = ft_strlen( type1->font_info.full_name ) + 1;
587 if ( value && value_len >= retval )
588 ft_memcpy( value, (void *)( type1->font_info.full_name ), retval );
589 }
590 break;
591
593 if ( type1->font_info.family_name )
594 {
595 retval = ft_strlen( type1->font_info.family_name ) + 1;
596 if ( value && value_len >= retval )
597 ft_memcpy( value, (void *)( type1->font_info.family_name ),
598 retval );
599 }
600 break;
601
602 case PS_DICT_WEIGHT:
603 if ( type1->font_info.weight )
604 {
605 retval = ft_strlen( type1->font_info.weight ) + 1;
606 if ( value && value_len >= retval )
607 ft_memcpy( value, (void *)( type1->font_info.weight ), retval );
608 }
609 break;
610
612 retval = sizeof ( type1->font_info.italic_angle );
613 if ( value && value_len >= retval )
614 *((FT_Long *)value) = type1->font_info.italic_angle;
615 break;
616 }
617
618 return retval == 0 ? -1 : (FT_Long)retval;
619 }
620
621
622 static const FT_Service_PsInfoRec t1_service_ps_info =
623 {
624 (PS_GetFontInfoFunc) t1_ps_get_font_info, /* ps_get_font_info */
625 (PS_GetFontExtraFunc) t1_ps_get_font_extra, /* ps_get_font_extra */
626 (PS_HasGlyphNamesFunc) t1_ps_has_glyph_names, /* ps_has_glyph_names */
627 (PS_GetFontPrivateFunc)t1_ps_get_font_private, /* ps_get_font_private */
628 (PS_GetFontValueFunc) t1_ps_get_font_value, /* ps_get_font_value */
629 };
630
631
632#ifndef T1_CONFIG_OPTION_NO_AFM
633 static const FT_Service_KerningRec t1_service_kerning =
634 {
635 T1_Get_Track_Kerning, /* get_track */
636 };
637#endif
638
639
640 /*
641 * PROPERTY SERVICE
642 *
643 */
644
646 t1_service_properties,
647
648 (FT_Properties_SetFunc)ps_property_set, /* set_property */
649 (FT_Properties_GetFunc)ps_property_get ) /* get_property */
650
651
652 /*
653 * SERVICE LIST
654 *
655 */
656
657 static const FT_ServiceDescRec t1_services[] =
658 {
663 { FT_SERVICE_ID_PROPERTIES, &t1_service_properties },
664
665#ifndef T1_CONFIG_OPTION_NO_AFM
667#endif
668
669#ifndef T1_CONFIG_OPTION_NO_MM_SUPPORT
671#endif
672 { NULL, NULL }
673 };
674
675
678 const FT_String* t1_interface )
679 {
680 FT_UNUSED( module );
681
682 return ft_service_list_lookup( t1_services, t1_interface );
683 }
684
685
686#ifndef T1_CONFIG_OPTION_NO_AFM
687
688 /**************************************************************************
689 *
690 * @Function:
691 * Get_Kerning
692 *
693 * @Description:
694 * A driver method used to return the kerning vector between two
695 * glyphs of the same face.
696 *
697 * @Input:
698 * face ::
699 * A handle to the source face object.
700 *
701 * left_glyph ::
702 * The index of the left glyph in the kern pair.
703 *
704 * right_glyph ::
705 * The index of the right glyph in the kern pair.
706 *
707 * @Output:
708 * kerning ::
709 * The kerning vector. This is in font units for
710 * scalable formats, and in pixels for fixed-sizes
711 * formats.
712 *
713 * @Return:
714 * FreeType error code. 0 means success.
715 *
716 * @Note:
717 * Only horizontal layouts (left-to-right & right-to-left) are
718 * supported by this function. Other layouts, or more sophisticated
719 * kernings are out of scope of this method (the basic driver
720 * interface is meant to be simple).
721 *
722 * They can be implemented by format-specific interfaces.
723 */
724 static FT_Error
725 Get_Kerning( FT_Face t1face, /* T1_Face */
729 {
730 T1_Face face = (T1_Face)t1face;
731
732
733 kerning->x = 0;
734 kerning->y = 0;
735
736 if ( face->afm_data )
737 T1_Get_Kerning( (AFM_FontInfo)face->afm_data,
740 kerning );
741
742 return FT_Err_Ok;
743 }
744
745
746#endif /* T1_CONFIG_OPTION_NO_AFM */
747
748
751 {
752 {
756
757 sizeof ( PS_DriverRec ),
758
759 "type1",
760 0x10000L,
761 0x20000L,
762
763 NULL, /* module-specific interface */
764
765 T1_Driver_Init, /* FT_Module_Constructor module_init */
766 T1_Driver_Done, /* FT_Module_Destructor module_done */
767 Get_Interface, /* FT_Module_Requester get_interface */
768 },
769
770 sizeof ( T1_FaceRec ),
771 sizeof ( T1_SizeRec ),
772 sizeof ( T1_GlyphSlotRec ),
773
774 T1_Face_Init, /* FT_Face_InitFunc init_face */
775 T1_Face_Done, /* FT_Face_DoneFunc done_face */
776 T1_Size_Init, /* FT_Size_InitFunc init_size */
777 T1_Size_Done, /* FT_Size_DoneFunc done_size */
778 T1_GlyphSlot_Init, /* FT_Slot_InitFunc init_slot */
779 T1_GlyphSlot_Done, /* FT_Slot_DoneFunc done_slot */
780
781 T1_Load_Glyph, /* FT_Slot_LoadFunc load_glyph */
782
783#ifdef T1_CONFIG_OPTION_NO_AFM
784 NULL, /* FT_Face_GetKerningFunc get_kerning */
785 NULL, /* FT_Face_AttachFunc attach_file */
786#else
787 Get_Kerning, /* FT_Face_GetKerningFunc get_kerning */
788 T1_Read_Metrics, /* FT_Face_AttachFunc attach_file */
789#endif
790 T1_Get_Advances, /* FT_Face_GetAdvancesFunc get_advances */
791
792 T1_Size_Request, /* FT_Size_RequestFunc request_size */
793 NULL /* FT_Size_SelectFunc select_size */
794 };
795
796
797/* END */
#define ok(value,...)
Definition: atltest.h:57
FT_Properties_SetFunc ps_property_set
Definition: cffdrivr.c:834
#define FT_CALLBACK_DEF(x)
#define FT_CALLBACK_TABLE_DEF
#define NULL
Definition: types.h:112
unsigned int idx
Definition: utils.c:41
return FT_Err_Ok
Definition: ftbbox.c:526
size_t * ft_hash_num_lookup(FT_Int num, FT_Hash hash)
Definition: fthash.c:326
#define FT_STRCPYN(dst, src, size)
Definition: ftmemory.h:390
#define FT_MODULE_FONT_DRIVER
Definition: ftmodapi.h:109
#define FT_MODULE_DRIVER_HAS_HINTER
Definition: ftmodapi.h:118
#define FT_MODULE_DRIVER_SCALABLE
Definition: ftmodapi.h:114
ps_property_get(FT_Module module, const char *property_name, void *value)
Definition: ftpsprop.c:230
ft_service_list_lookup(FT_ServiceDesc service_descriptors, const char *service_id)
Definition: ftobjs.c:109
#define ft_memcpy
Definition: ftstdlib.h:82
#define ft_strcmp
Definition: ftstdlib.h:86
#define ft_strlen
Definition: ftstdlib.h:88
signed char FT_Char
Definition: fttypes.h:143
FT_BEGIN_HEADER typedef unsigned char FT_Bool
Definition: fttypes.h:108
unsigned long FT_ULong
Definition: fttypes.h:253
unsigned char FT_Byte
Definition: fttypes.h:154
signed long FT_Fixed
Definition: fttypes.h:287
int FT_Error
Definition: fttypes.h:299
signed long FT_Long
Definition: fttypes.h:242
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 buffer
Definition: glext.h:5915
GLenum GLuint GLint GLenum face
Definition: glext.h:7025
GLuint GLfloat * val
Definition: glext.h:7180
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
FT_BEGIN_HEADER struct PS_DriverRec_ PS_DriverRec
#define FT_UNUSED(arg)
FT_Pos xMin
Definition: ftimage.h:120
FT_Pos yMax
Definition: ftimage.h:121
FT_Pos yMin
Definition: ftimage.h:120
FT_Pos xMax
Definition: ftimage.h:121
FT_Fixed xx
Definition: fttypes.h:392
FT_Fixed yx
Definition: fttypes.h:393
FT_Fixed yy
Definition: fttypes.h:393
FT_Fixed xy
Definition: fttypes.h:392
FT_Pos x
Definition: ftimage.h:77
FT_Pos y
Definition: ftimage.h:78
FT_UShort fs_type
Definition: t1types.h:91
FT_Byte num_snap_widths
Definition: t1tables.h:159
FT_Byte num_other_blues
Definition: t1tables.h:142
FT_UShort standard_width[1]
Definition: t1tables.h:156
FT_Byte num_family_blues
Definition: t1tables.h:143
FT_Int blue_fuzz
Definition: t1tables.h:154
FT_Long password
Definition: t1tables.h:170
FT_Short snap_heights[13]
Definition: t1tables.h:165
FT_Short snap_widths[13]
Definition: t1tables.h:164
FT_Bool force_bold
Definition: t1tables.h:161
FT_Byte num_snap_heights
Definition: t1tables.h:160
FT_Short other_blues[10]
Definition: t1tables.h:147
FT_Byte num_family_other_blues
Definition: t1tables.h:144
FT_Int lenIV
Definition: t1tables.h:139
FT_UShort standard_height[1]
Definition: t1tables.h:157
FT_Bool round_stem_up
Definition: t1tables.h:162
FT_Short family_blues[14]
Definition: t1tables.h:149
FT_Int blue_shift
Definition: t1tables.h:153
FT_Short family_other_blues[10]
Definition: t1tables.h:150
FT_Short blue_values[14]
Definition: t1tables.h:146
FT_Byte num_blue_values
Definition: t1tables.h:141
FT_Int unique_id
Definition: t1tables.h:138
FT_Fixed blue_scale
Definition: t1tables.h:152
FT_Short min_feature[2]
Definition: t1tables.h:172
FT_Long language_group
Definition: t1tables.h:169
T1_FontRec type1
Definition: t1types.h:205
PS_PrivateRec private_dict
Definition: t1types.h:100
T1_EncodingType encoding_type
Definition: t1types.h:103
PS_FontInfoRec font_info
Definition: t1types.h:98
FT_Byte ** subrs
Definition: t1types.h:111
FT_Int num_glyphs
Definition: t1types.h:115
FT_UInt * charstrings_len
Definition: t1types.h:118
FT_String ** glyph_names
Definition: t1types.h:116
T1_EncodingRec encoding
Definition: t1types.h:104
FT_Byte paint_type
Definition: t1types.h:120
FT_BBox font_bbox
Definition: t1types.h:124
FT_String * font_name
Definition: t1types.h:101
FT_Matrix font_matrix
Definition: t1types.h:122
FT_Int num_subrs
Definition: t1types.h:110
PS_FontExtraRec font_extra
Definition: t1types.h:99
FT_Hash subrs_hash
Definition: t1types.h:113
FT_Byte font_type
Definition: t1types.h:121
FT_Byte ** charstrings
Definition: t1types.h:117
FT_UInt * subrs_len
Definition: t1types.h:112
Definition: copy.c:22
#define FT_SERVICE_ID_FONT_FORMAT
Definition: svfntfmt.h:34
#define FT_FONT_FORMAT_TYPE_1
Definition: svfntfmt.h:37
#define FT_SERVICE_ID_GLYPH_DICT
Definition: svgldict.h:34
FT_UInt(* FT_GlyphDict_NameIndexFunc)(FT_Face face, const 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_SERVICE_ID_KERNING
Definition: svkern.h:28
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
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
#define FT_SERVICE_ID_POSTSCRIPT_FONT_NAME
Definition: svpostnm.h:37
const char *(* FT_PsName_GetFunc)(FT_Face face)
Definition: svpostnm.h:41
#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
#define FT_SERVICE_ID_PROPERTIES
Definition: svprop.h:26
FT_Long(* PS_GetFontValueFunc)(FT_Face face, PS_Dict_Keys key, FT_UInt idx, void *value, FT_Long value_len)
Definition: svpsinfo.h:48
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
#define FT_SERVICE_ID_POSTSCRIPT_INFO
Definition: svpsinfo.h:29
T1_Get_Kerning(AFM_FontInfo fi, FT_UInt glyph1, FT_UInt glyph2, FT_Vector *kerning)
Definition: t1afm.c:329
T1_Read_Metrics(FT_Face t1_face, FT_Stream stream)
Definition: t1afm.c:235
T1_Get_Track_Kerning(FT_Face face, FT_Fixed ptsize, FT_Int degree, FT_Fixed *kerning)
Definition: t1afm.c:370
static const char * t1_get_ps_name(T1_Face face)
Definition: t1driver.c:104
FT_CALLBACK_TABLE_DEF const FT_Driver_ClassRec t1_driver_class
Definition: t1driver.c:750
static FT_Error t1_ps_get_font_private(FT_Face face, PS_PrivateRec *afont_private)
Definition: t1driver.c:176
static FT_Error t1_get_glyph_name(T1_Face face, FT_UInt glyph_index, FT_Pointer buffer, FT_UInt buffer_max)
Definition: t1driver.c:60
static const FT_Service_PsFontNameRec t1_service_ps_name
Definition: t1driver.c:110
static const FT_Service_GlyphDictRec t1_service_glyph_dict
Definition: t1driver.c:91
static FT_Int t1_ps_has_glyph_names(FT_Face face)
Definition: t1driver.c:167
static FT_UInt t1_get_name_index(T1_Face face, const FT_String *glyph_name)
Definition: t1driver.c:72
static const FT_Service_PsInfoRec t1_service_ps_info
Definition: t1driver.c:622
static FT_Error t1_ps_get_font_extra(FT_Face face, PS_FontExtraRec *afont_extra)
Definition: t1driver.c:157
static FT_Error Get_Kerning(FT_Face t1face, FT_UInt left_glyph, FT_UInt right_glyph, FT_Vector *kerning)
Definition: t1driver.c:725
static FT_Long t1_ps_get_font_value(FT_Face face, PS_Dict_Keys key, FT_UInt idx, void *value, FT_Long value_len_)
Definition: t1driver.c:186
static FT_Error t1_ps_get_font_info(FT_Face face, PS_FontInfoRec *afont_info)
Definition: t1driver.c:147
static const FT_Service_MultiMastersRec t1_service_multi_masters
Definition: t1driver.c:122
Get_Interface(FT_Module module, const FT_String *t1_interface)
Definition: t1driver.c:677
static const FT_Service_KerningRec t1_service_kerning
Definition: t1driver.c:633
T1_Get_Advances(FT_Face t1face, FT_UInt first, FT_UInt count, FT_Int32 load_flags, FT_Fixed *advances)
Definition: t1gload.c:297
T1_Load_Glyph(FT_GlyphSlot t1glyph, FT_Size t1size, FT_UInt glyph_index, FT_Int32 load_flags)
Definition: t1gload.c:392
T1_Get_MM_WeightVector(T1_Face face, FT_UInt *len, FT_Fixed *weightvector)
Definition: t1load.c:548
T1_Reset_MM_Blend(T1_Face face, FT_UInt instance_index)
Definition: t1load.c:664
T1_Get_Var_Design(T1_Face face, FT_UInt num_coords, FT_Fixed *coords)
Definition: t1load.c:698
T1_Get_MM_Blend(T1_Face face, FT_UInt num_coords, FT_Fixed *coords)
Definition: t1load.c:473
T1_Set_Var_Design(T1_Face face, FT_UInt num_coords, FT_Fixed *coords)
Definition: t1load.c:679
T1_Set_MM_Blend(T1_Face face, FT_UInt num_coords, FT_Fixed *coords)
Definition: t1load.c:452
T1_Done_Blend(T1_Face face)
Definition: t1load.c:734
T1_Set_MM_Design(T1_Face face, FT_UInt num_coords, FT_Long *coords)
Definition: t1load.c:577
T1_Get_MM_Var(T1_Face face, FT_MM_Var **master)
Definition: t1load.c:302
T1_Get_Multi_Master(T1_Face face, FT_Multi_Master *master)
Definition: t1load.c:192
T1_Set_MM_WeightVector(T1_Face face, FT_UInt len, FT_Fixed *weightvector)
Definition: t1load.c:508
T1_Face_Init(FT_Stream stream, FT_Face t1face, FT_Int face_index, FT_Int num_params, FT_Parameter *params)
Definition: t1objs.c:306
T1_Driver_Init(FT_Module module)
Definition: t1objs.c:593
T1_GlyphSlot_Done(FT_GlyphSlot slot)
Definition: t1objs.c:142
T1_Size_Done(FT_Size t1size)
Definition: t1objs.c:72
T1_Driver_Done(FT_Module driver)
Definition: t1objs.c:647
T1_Size_Request(FT_Size t1size, FT_Size_Request req)
Definition: t1objs.c:116
T1_Size_Init(FT_Size t1size)
Definition: t1objs.c:92
T1_Face_Done(FT_Face t1face)
Definition: t1objs.c:199
T1_GlyphSlot_Init(FT_GlyphSlot slot)
Definition: t1objs.c:149
struct T1_GlyphSlotRec_ T1_GlyphSlotRec
@ T1_ENCODING_TYPE_ARRAY
Definition: t1tables.h:566
@ PS_DICT_ITALIC_ANGLE
Definition: t1tables.h:686
@ PS_DICT_FONT_BBOX
Definition: t1tables.h:639
@ PS_DICT_NUM_BLUE_VALUES
Definition: t1tables.h:654
@ PS_DICT_WEIGHT
Definition: t1tables.h:681
@ PS_DICT_BLUE_SHIFT
Definition: t1tables.h:664
@ PS_DICT_FONT_NAME
Definition: t1tables.h:641
@ PS_DICT_NUM_STEM_SNAP_V
Definition: t1tables.h:667
@ PS_DICT_SUBR
Definition: t1tables.h:651
@ PS_DICT_PASSWORD
Definition: t1tables.h:673
@ PS_DICT_NUM_CHAR_STRINGS
Definition: t1tables.h:643
@ PS_DICT_STEM_SNAP_H
Definition: t1tables.h:666
@ PS_DICT_NUM_STEM_SNAP_H
Definition: t1tables.h:665
@ PS_DICT_BLUE_SCALE
Definition: t1tables.h:663
@ PS_DICT_ENCODING_ENTRY
Definition: t1tables.h:647
@ PS_DICT_FS_TYPE
Definition: t1tables.h:685
@ PS_DICT_FONT_MATRIX
Definition: t1tables.h:638
@ PS_DICT_NUM_FAMILY_OTHER_BLUES
Definition: t1tables.h:661
@ PS_DICT_IS_FIXED_PITCH
Definition: t1tables.h:682
@ PS_DICT_FAMILY_OTHER_BLUE
Definition: t1tables.h:662
@ PS_DICT_LANGUAGE_GROUP
Definition: t1tables.h:674
@ PS_DICT_NUM_SUBRS
Definition: t1tables.h:650
@ PS_DICT_FAMILY_NAME
Definition: t1tables.h:680
@ PS_DICT_LEN_IV
Definition: t1tables.h:672
@ PS_DICT_FONT_TYPE
Definition: t1tables.h:637
@ PS_DICT_FULL_NAME
Definition: t1tables.h:679
@ PS_DICT_STD_HW
Definition: t1tables.h:652
@ PS_DICT_NUM_FAMILY_BLUES
Definition: t1tables.h:659
@ PS_DICT_BLUE_VALUE
Definition: t1tables.h:655
@ PS_DICT_MIN_FEATURE
Definition: t1tables.h:671
@ PS_DICT_NOTICE
Definition: t1tables.h:678
@ PS_DICT_STEM_SNAP_V
Definition: t1tables.h:668
@ PS_DICT_NUM_OTHER_BLUES
Definition: t1tables.h:657
@ PS_DICT_STD_VW
Definition: t1tables.h:653
@ PS_DICT_ENCODING_TYPE
Definition: t1tables.h:646
@ PS_DICT_FORCE_BOLD
Definition: t1tables.h:669
@ PS_DICT_BLUE_FUZZ
Definition: t1tables.h:656
@ PS_DICT_CHAR_STRING_KEY
Definition: t1tables.h:644
@ PS_DICT_UNDERLINE_POSITION
Definition: t1tables.h:683
@ PS_DICT_UNDERLINE_THICKNESS
Definition: t1tables.h:684
@ PS_DICT_VERSION
Definition: t1tables.h:677
@ PS_DICT_RND_STEM_UP
Definition: t1tables.h:670
@ PS_DICT_CHAR_STRING
Definition: t1tables.h:645
@ PS_DICT_OTHER_BLUE
Definition: t1tables.h:658
@ PS_DICT_UNIQUE_ID
Definition: t1tables.h:642
@ PS_DICT_PAINT_TYPE
Definition: t1tables.h:640
@ PS_DICT_FAMILY_BLUE
Definition: t1tables.h:660
enum PS_Dict_Keys_ PS_Dict_Keys
FT_BEGIN_HEADER struct PS_FontInfoRec_ PS_FontInfoRec
enum T1_EncodingType_ T1_EncodingType
struct T1_FaceRec_ T1_FaceRec
struct T1_FaceRec_ * T1_Face
Definition: t1types.h:198
FT_UInt FT_UInt FT_Vector * kerning
Definition: ttdriver.c:206
FT_UInt left_glyph
Definition: ttdriver.c:203
FT_UInt FT_UInt right_glyph
Definition: ttdriver.c:204
Definition: pdh_main.c:96
int retval
Definition: wcstombs.cpp:91
#define const
Definition: zconf.h:233