1 /***************************************************************************/ 2 /* */ 3 /* svcfftl.h */ 4 /* */ 5 /* The FreeType CFF tables loader service (specification). */ 6 /* */ 7 /* Copyright 2017-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 #ifndef SVCFFTL_H_ 20 #define SVCFFTL_H_ 21 22 #include FT_INTERNAL_SERVICE_H 23 #include FT_INTERNAL_CFF_TYPES_H 24 25 26 FT_BEGIN_HEADER 27 28 29 #define FT_SERVICE_ID_CFF_LOAD "cff-load" 30 31 32 typedef FT_UShort 33 (*FT_Get_Standard_Encoding_Func)( FT_UInt charcode ); 34 35 typedef FT_Error 36 (*FT_Load_Private_Dict_Func)( CFF_Font font, 48 FT_UInt lenNDV, 49 FT_Fixed* NDV ); 50 51 typedef FT_Error 52 (*FT_Blend_Build_Vector_Func)( CFF_Blend blend, 53 FT_UInt vsindex, 54 FT_UInt lenNDV, 55 FT_Fixed* NDV ); 56 57 58 FT_DEFINE_SERVICE( CFFLoad ) 59 { 60 FT_Get_Standard_Encoding_Func get_standard_encoding; 61 FT_Load_Private_Dict_Func load_private_dict; 62 FT_FD_Select_Get_Func fd_select_get; 63 FT_Blend_Check_Vector_Func blend_check_vector; 64 FT_Blend_Build_Vector_Func blend_build_vector; 65 }; 66 67 68 #ifndef FT_CONFIG_OPTION_PIC 69 70 #define FT_DEFINE_SERVICE_CFFLOADREC( class_, \ 71 get_standard_encoding_, \ 72 load_private_dict_, \ 73 fd_select_get_, \ 74 blend_check_vector_, \ 75 blend_build_vector_ ) \ 76 static const FT_Service_CFFLoadRec class_ = \ 77 { \ 78 get_standard_encoding_, \ 79 load_private_dict_, \ 80 fd_select_get_, \ 81 blend_check_vector_, \ 82 blend_build_vector_ \ 83 }; 84 85 #else /* FT_CONFIG_OPTION_PIC */ 86 87 #define FT_DEFINE_SERVICE_CFFLOADREC( class_, \ 88 get_standard_encoding_, \ 89 load_private_dict_, \ 90 fd_select_get_, \ 91 blend_check_vector_, \ 92 blend_build_vector_ ) \ 93 void \ 94 FT_Init_Class_ ## class_( FT_Service_CFFLoadRec* clazz ) \ 95 { \ 96 clazz->get_standard_encoding = get_standard_encoding_; \ 97 clazz->load_private_dict = load_private_dict_; \ 98 clazz->fd_select_get = fd_select_get_; \ 99 clazz->blend_check_vector = blend_check_vector_; \ 100 clazz->blend_build_vector = blend_build_vector_; \ 101 } 102 103 #endif /* FT_CONFIG_OPTION_PIC */ 104 105 106 FT_END_HEADER 107 108 109 #endif 110 111 112 /* END */ | 1 /**************************************************************************** 2 * 3 * svcfftl.h 4 * 5 * The FreeType CFF tables loader service (specification). 6 * 7 * Copyright (C) 2017-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 #ifndef SVCFFTL_H_ 20 #define SVCFFTL_H_ 21 22 #include FT_INTERNAL_SERVICE_H 23 #include FT_INTERNAL_CFF_TYPES_H 24 25 26 FT_BEGIN_HEADER 27 28 29 #define FT_SERVICE_ID_CFF_LOAD "cff-load" 30 31 32 typedef FT_UShort 33 (*FT_Get_Standard_Encoding_Func)( FT_UInt charcode ); 34 35 typedef FT_Error 36 (*FT_Load_Private_Dict_Func)( CFF_Font font, 48 FT_UInt lenNDV, 49 FT_Fixed* NDV ); 50 51 typedef FT_Error 52 (*FT_Blend_Build_Vector_Func)( CFF_Blend blend, 53 FT_UInt vsindex, 54 FT_UInt lenNDV, 55 FT_Fixed* NDV ); 56 57 58 FT_DEFINE_SERVICE( CFFLoad ) 59 { 60 FT_Get_Standard_Encoding_Func get_standard_encoding; 61 FT_Load_Private_Dict_Func load_private_dict; 62 FT_FD_Select_Get_Func fd_select_get; 63 FT_Blend_Check_Vector_Func blend_check_vector; 64 FT_Blend_Build_Vector_Func blend_build_vector; 65 }; 66 67 68 #define FT_DEFINE_SERVICE_CFFLOADREC( class_, \ 69 get_standard_encoding_, \ 70 load_private_dict_, \ 71 fd_select_get_, \ 72 blend_check_vector_, \ 73 blend_build_vector_ ) \ 74 static const FT_Service_CFFLoadRec class_ = \ 75 { \ 76 get_standard_encoding_, \ 77 load_private_dict_, \ 78 fd_select_get_, \ 79 blend_check_vector_, \ 80 blend_build_vector_ \ 81 }; 82 83 84 FT_END_HEADER 85 86 87 #endif 88 89 90 /* END */ |