| OLD | NEW |
| 1 /***************************************************************************/ | 1 /***************************************************************************/ |
| 2 /* */ | 2 /* */ |
| 3 /* afpic.c */ | 3 /* afpic.c */ |
| 4 /* */ | 4 /* */ |
| 5 /* The FreeType position independent code services for autofit module. */ | 5 /* The FreeType position independent code services for autofit module. */ |
| 6 /* */ | 6 /* */ |
| 7 /* Copyright 2009, 2010, 2011 by */ | 7 /* Copyright 2009, 2010, 2011 by */ |
| 8 /* Oran Agra and Mickey Gabel. */ | 8 /* Oran Agra and Mickey Gabel. */ |
| 9 /* */ | 9 /* */ |
| 10 /* This file is part of the FreeType project, and may only be used, */ | 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 */ | 11 /* modified, and distributed under the terms of the FreeType project */ |
| 12 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ | 12 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ |
| 13 /* this file you indicate that you have read the license and */ | 13 /* this file you indicate that you have read the license and */ |
| 14 /* understand and accept it fully. */ | 14 /* understand and accept it fully. */ |
| 15 /* */ | 15 /* */ |
| 16 /***************************************************************************/ | 16 /***************************************************************************/ |
| 17 | 17 |
| 18 | 18 |
| 19 #include <ft2build.h> | 19 #include <ft2build.h> |
| 20 #include FT_FREETYPE_H | 20 #include FT_FREETYPE_H |
| 21 #include FT_INTERNAL_OBJECTS_H | 21 #include FT_INTERNAL_OBJECTS_H |
| 22 #include "afpic.h" | 22 #include "afpic.h" |
| 23 #include "aferrors.h" |
| 23 | 24 |
| 24 #ifdef FT_CONFIG_OPTION_PIC | 25 #ifdef FT_CONFIG_OPTION_PIC |
| 25 | 26 |
| 26 /* forward declaration of PIC init functions from afmodule.c */ | 27 /* forward declaration of PIC init functions from afmodule.c */ |
| 27 void FT_Init_Class_af_autofitter_service( FT_Library, | 28 void FT_Init_Class_af_autofitter_service( |
| 28 FT_AutoHinter_ServiceRec* ); | 29 FT_Library library, |
| 30 FT_AutoHinter_ServiceRec* clazz ); |
| 29 | 31 |
| 30 /* forward declaration of PIC init functions from script classes */ | 32 /* forward declaration of PIC init functions from script classes */ |
| 31 #include "aflatin.h" | 33 #include "aflatin.h" |
| 34 #ifdef FT_OPTION_AUTOFIT2 |
| 32 #include "aflatin2.h" | 35 #include "aflatin2.h" |
| 36 #endif |
| 33 #include "afcjk.h" | 37 #include "afcjk.h" |
| 34 #include "afdummy.h" | 38 #include "afdummy.h" |
| 35 #include "afindic.h" | 39 #include "afindic.h" |
| 36 | 40 |
| 37 void | 41 void |
| 38 autofit_module_class_pic_free( FT_Library library ) | 42 autofit_module_class_pic_free( FT_Library library ) |
| 39 { | 43 { |
| 40 FT_PIC_Container* pic_container = &library->pic_container; | 44 FT_PIC_Container* pic_container = &library->pic_container; |
| 41 FT_Memory memory = library->memory; | 45 FT_Memory memory = library->memory; |
| 42 | 46 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 66 pic_container->autofit = container; | 70 pic_container->autofit = container; |
| 67 | 71 |
| 68 /* initialize pointer table - */ | 72 /* initialize pointer table - */ |
| 69 /* this is how the module usually expects this data */ | 73 /* this is how the module usually expects this data */ |
| 70 for ( ss = 0 ; ss < AF_SCRIPT_CLASSES_REC_COUNT ; ss++ ) | 74 for ( ss = 0 ; ss < AF_SCRIPT_CLASSES_REC_COUNT ; ss++ ) |
| 71 { | 75 { |
| 72 container->af_script_classes[ss] = | 76 container->af_script_classes[ss] = |
| 73 &container->af_script_classes_rec[ss]; | 77 &container->af_script_classes_rec[ss]; |
| 74 } | 78 } |
| 75 container->af_script_classes[AF_SCRIPT_CLASSES_COUNT - 1] = NULL; | 79 container->af_script_classes[AF_SCRIPT_CLASSES_COUNT - 1] = NULL; |
| 76 | 80 |
| 77 /* add call to initialization function when you add new scripts */ | 81 /* add call to initialization function when you add new scripts */ |
| 78 ss = 0; | 82 ss = 0; |
| 79 FT_Init_Class_af_dummy_script_class( | 83 FT_Init_Class_af_dummy_script_class( |
| 80 &container->af_script_classes_rec[ss++] ); | 84 &container->af_script_classes_rec[ss++] ); |
| 81 #ifdef FT_OPTION_AUTOFIT2 | 85 #ifdef FT_OPTION_AUTOFIT2 |
| 82 FT_Init_Class_af_latin2_script_class( | 86 FT_Init_Class_af_latin2_script_class( |
| 83 &container->af_script_classes_rec[ss++] ); | 87 &container->af_script_classes_rec[ss++] ); |
| 84 #endif | 88 #endif |
| 85 FT_Init_Class_af_latin_script_class( | 89 FT_Init_Class_af_latin_script_class( |
| 86 &container->af_script_classes_rec[ss++] ); | 90 &container->af_script_classes_rec[ss++] ); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 97 if ( error ) | 101 if ( error ) |
| 98 autofit_module_class_pic_free( library ); | 102 autofit_module_class_pic_free( library ); |
| 99 return error; | 103 return error; |
| 100 } | 104 } |
| 101 | 105 |
| 102 | 106 |
| 103 #endif /* FT_CONFIG_OPTION_PIC */ | 107 #endif /* FT_CONFIG_OPTION_PIC */ |
| 104 | 108 |
| 105 | 109 |
| 106 /* END */ | 110 /* END */ |
| OLD | NEW |