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, 37 CFF_SubFont subfont, 38 FT_UInt lenNDV, 39 FT_Fixed* NDV ); 40 41 typedef FT_Byte 42 (*FT_FD_Select_Get_Func)( CFF_FDSelect fdselect, 43 FT_UInt glyph_index ); 44 45 typedef FT_Bool 46 (*FT_Blend_Check_Vector_Func)( CFF_Blend blend, 47 FT_UInt vsindex, 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 FT_DEFINE_SERVICE(CFFLoad)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 */ 91