afpic.h revision ec62c527eb34ee4481a0153ceb42dfd35d7e1d26
1/***************************************************************************/ 2/* */ 3/* afpic.h */ 4/* */ 5/* The FreeType position independent code services for autofit module. */ 6/* */ 7/* Copyright 2009-2015 by */ 8/* Oran Agra and Mickey Gabel. */ 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 __AFPIC_H__ 20#define __AFPIC_H__ 21 22 23FT_BEGIN_HEADER 24 25#include FT_INTERNAL_PIC_H 26 27 28#ifndef FT_CONFIG_OPTION_PIC 29 30#define AF_SERVICES_GET af_services 31#define AF_SERVICE_PROPERTIES_GET af_service_properties 32 33#define AF_WRITING_SYSTEM_CLASSES_GET af_writing_system_classes 34#define AF_SCRIPT_CLASSES_GET af_script_classes 35#define AF_STYLE_CLASSES_GET af_style_classes 36#define AF_INTERFACE_GET af_autofitter_interface 37 38#else /* FT_CONFIG_OPTION_PIC */ 39 40 /* some include files required for members of AFModulePIC */ 41#include FT_SERVICE_PROPERTIES_H 42 43#include "aftypes.h" 44 45 46 typedef struct AFModulePIC_ 47 { 48 FT_ServiceDescRec* af_services; 49 FT_Service_PropertiesRec af_service_properties; 50 51 AF_WritingSystemClass af_writing_system_classes 52 [AF_WRITING_SYSTEM_MAX + 1]; 53 AF_WritingSystemClassRec af_writing_system_classes_rec 54 [AF_WRITING_SYSTEM_MAX]; 55 56 AF_ScriptClass af_script_classes 57 [AF_SCRIPT_MAX + 1]; 58 AF_ScriptClassRec af_script_classes_rec 59 [AF_SCRIPT_MAX]; 60 61 AF_StyleClass af_style_classes 62 [AF_STYLE_MAX + 1]; 63 AF_StyleClassRec af_style_classes_rec 64 [AF_STYLE_MAX]; 65 66 FT_AutoHinter_InterfaceRec af_autofitter_interface; 67 68 } AFModulePIC; 69 70 71#define GET_PIC( lib ) \ 72 ( (AFModulePIC*)((lib)->pic_container.autofit) ) 73 74#define AF_SERVICES_GET \ 75 ( GET_PIC( library )->af_services ) 76#define AF_SERVICE_PROPERTIES_GET \ 77 ( GET_PIC( library )->af_service_properties ) 78 79#define AF_WRITING_SYSTEM_CLASSES_GET \ 80 ( GET_PIC( FT_FACE_LIBRARY( globals->face ) )->af_writing_system_classes ) 81#define AF_SCRIPT_CLASSES_GET \ 82 ( GET_PIC( FT_FACE_LIBRARY( globals->face ) )->af_script_classes ) 83#define AF_STYLE_CLASSES_GET \ 84 ( GET_PIC( FT_FACE_LIBRARY( globals->face ) )->af_style_classes ) 85#define AF_INTERFACE_GET \ 86 ( GET_PIC( library )->af_autofitter_interface ) 87 88 89 /* see afpic.c for the implementation */ 90 void 91 autofit_module_class_pic_free( FT_Library library ); 92 93 FT_Error 94 autofit_module_class_pic_init( FT_Library library ); 95 96#endif /* FT_CONFIG_OPTION_PIC */ 97 98 /* */ 99 100FT_END_HEADER 101 102#endif /* __AFPIC_H__ */ 103 104 105/* END */ 106