2009-04-05 17:12:03 +02:00
|
|
|
/***************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* cffpic.h */
|
|
|
|
/* */
|
|
|
|
/* The FreeType position independent code services for cff module. */
|
|
|
|
/* */
|
2015-01-17 20:41:43 +01:00
|
|
|
/* Copyright 2009-2015 by */
|
2009-04-05 17:12:03 +02:00
|
|
|
/* Oran Agra and Mickey Gabel. */
|
|
|
|
/* */
|
|
|
|
/* This file is part of the FreeType project, and may only be used, */
|
|
|
|
/* modified, and distributed under the terms of the FreeType project */
|
|
|
|
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
|
|
|
|
/* this file you indicate that you have read the license and */
|
|
|
|
/* understand and accept it fully. */
|
|
|
|
/* */
|
|
|
|
/***************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef __CFFPIC_H__
|
|
|
|
#define __CFFPIC_H__
|
|
|
|
|
2012-01-16 18:00:24 +01:00
|
|
|
|
2009-04-05 17:12:03 +02:00
|
|
|
FT_BEGIN_HEADER
|
|
|
|
|
|
|
|
#include FT_INTERNAL_PIC_H
|
|
|
|
|
2012-08-27 08:41:43 +02:00
|
|
|
|
2009-04-05 17:12:03 +02:00
|
|
|
#ifndef FT_CONFIG_OPTION_PIC
|
2012-08-27 08:41:43 +02:00
|
|
|
|
|
|
|
#define CFF_SERVICE_PS_INFO_GET cff_service_ps_info
|
|
|
|
#define CFF_SERVICE_GLYPH_DICT_GET cff_service_glyph_dict
|
|
|
|
#define CFF_SERVICE_PS_NAME_GET cff_service_ps_name
|
|
|
|
#define CFF_SERVICE_GET_CMAP_INFO_GET cff_service_get_cmap_info
|
|
|
|
#define CFF_SERVICE_CID_INFO_GET cff_service_cid_info
|
2013-04-12 19:48:06 +02:00
|
|
|
#define CFF_SERVICE_PROPERTIES_GET cff_service_properties
|
2012-08-27 08:41:43 +02:00
|
|
|
#define CFF_SERVICES_GET cff_services
|
|
|
|
#define CFF_CMAP_ENCODING_CLASS_REC_GET cff_cmap_encoding_class_rec
|
|
|
|
#define CFF_CMAP_UNICODE_CLASS_REC_GET cff_cmap_unicode_class_rec
|
|
|
|
#define CFF_FIELD_HANDLERS_GET cff_field_handlers
|
2009-04-05 17:12:03 +02:00
|
|
|
|
|
|
|
#else /* FT_CONFIG_OPTION_PIC */
|
|
|
|
|
|
|
|
#include FT_SERVICE_GLYPH_DICT_H
|
|
|
|
#include "cffparse.h"
|
|
|
|
#include FT_SERVICE_POSTSCRIPT_INFO_H
|
|
|
|
#include FT_SERVICE_POSTSCRIPT_NAME_H
|
|
|
|
#include FT_SERVICE_TT_CMAP_H
|
|
|
|
#include FT_SERVICE_CID_H
|
2013-04-12 19:48:06 +02:00
|
|
|
#include FT_SERVICE_PROPERTIES_H
|
2009-04-05 17:12:03 +02:00
|
|
|
|
2012-08-27 08:41:43 +02:00
|
|
|
|
|
|
|
typedef struct CffModulePIC_
|
2009-04-05 17:12:03 +02:00
|
|
|
{
|
2012-08-27 08:41:43 +02:00
|
|
|
FT_ServiceDescRec* cff_services;
|
|
|
|
CFF_Field_Handler* cff_field_handlers;
|
|
|
|
FT_Service_PsInfoRec cff_service_ps_info;
|
|
|
|
FT_Service_GlyphDictRec cff_service_glyph_dict;
|
|
|
|
FT_Service_PsFontNameRec cff_service_ps_name;
|
|
|
|
FT_Service_TTCMapsRec cff_service_get_cmap_info;
|
|
|
|
FT_Service_CIDRec cff_service_cid_info;
|
2013-04-12 19:48:06 +02:00
|
|
|
FT_Service_PropertiesRec cff_service_properties;
|
2012-08-27 08:41:43 +02:00
|
|
|
FT_CMap_ClassRec cff_cmap_encoding_class_rec;
|
|
|
|
FT_CMap_ClassRec cff_cmap_unicode_class_rec;
|
|
|
|
|
2009-04-05 17:12:03 +02:00
|
|
|
} CffModulePIC;
|
|
|
|
|
2012-08-27 08:41:43 +02:00
|
|
|
|
2013-03-17 08:14:46 +01:00
|
|
|
#define GET_PIC( lib ) \
|
|
|
|
( (CffModulePIC*)( (lib)->pic_container.cff ) )
|
2012-08-27 08:41:43 +02:00
|
|
|
|
2013-03-17 08:14:46 +01:00
|
|
|
#define CFF_SERVICE_PS_INFO_GET \
|
2012-08-27 08:41:43 +02:00
|
|
|
( GET_PIC( library )->cff_service_ps_info )
|
2013-03-17 08:14:46 +01:00
|
|
|
#define CFF_SERVICE_GLYPH_DICT_GET \
|
2012-08-27 08:41:43 +02:00
|
|
|
( GET_PIC( library )->cff_service_glyph_dict )
|
2013-03-17 08:14:46 +01:00
|
|
|
#define CFF_SERVICE_PS_NAME_GET \
|
2012-08-27 08:41:43 +02:00
|
|
|
( GET_PIC( library )->cff_service_ps_name )
|
2013-03-17 08:14:46 +01:00
|
|
|
#define CFF_SERVICE_GET_CMAP_INFO_GET \
|
2012-08-27 08:41:43 +02:00
|
|
|
( GET_PIC( library )->cff_service_get_cmap_info )
|
2013-03-17 08:14:46 +01:00
|
|
|
#define CFF_SERVICE_CID_INFO_GET \
|
2012-08-27 08:41:43 +02:00
|
|
|
( GET_PIC( library )->cff_service_cid_info )
|
2013-04-12 19:48:06 +02:00
|
|
|
#define CFF_SERVICE_PROPERTIES_GET \
|
|
|
|
( GET_PIC( library )->cff_service_properties )
|
2013-03-17 08:14:46 +01:00
|
|
|
#define CFF_SERVICES_GET \
|
2012-08-27 08:41:43 +02:00
|
|
|
( GET_PIC( library )->cff_services )
|
2013-03-17 08:14:46 +01:00
|
|
|
#define CFF_CMAP_ENCODING_CLASS_REC_GET \
|
2012-08-27 08:41:43 +02:00
|
|
|
( GET_PIC( library )->cff_cmap_encoding_class_rec )
|
2013-03-17 08:14:46 +01:00
|
|
|
#define CFF_CMAP_UNICODE_CLASS_REC_GET \
|
2012-08-27 08:41:43 +02:00
|
|
|
( GET_PIC( library )->cff_cmap_unicode_class_rec )
|
2013-03-17 08:14:46 +01:00
|
|
|
#define CFF_FIELD_HANDLERS_GET \
|
2012-08-27 08:41:43 +02:00
|
|
|
( GET_PIC( library )->cff_field_handlers )
|
2009-04-05 17:12:03 +02:00
|
|
|
|
Fix redundant declaration warning in PIC mode.
Originally FT_DEFINE_{DRIVER,MODULE,RENDERER}() macros were
designed to declare xxx_pic_{free,init} by themselves.
Because these macros are used at the end of the module
interface (e.g. ttdriver.c) and the wrapper source to build
a module as a single object (e.g. truetype.c) includes
the PIC file (e.g. ttpic.c) before the module interface,
these macros are expanded AFTER xxx_pic_{free,init} body
when the modules are built as single object.
The declaration after the implementation causes the redundant
declaration warnings, so the declarations are moved to module
PIC headers (e.g. ttpic.h). Separating to other header files
are needed for multi build.
* include/freetype/internal/ftdriver.h (FT_DEFINE_DRIVER):
Remove class_##_pic_free and class_##_pic_init declarations.
* include/freetype/internal/ftobjs.h (FT_DEFINE_RENDERER,
FT_DEFINE_MODULE): Ditto.
* src/base/basepic.h: Insert a comment and fix coding style.
* src/autofit/afpic.h: Declare autofit_module_class_pic_{free,
init}.
* src/cff/cffpic.h: Declare cff_driver_class_pic_{free,init}.
* src/pshinter/pshpic.h: Declare pshinter_module_class_pic_{free,
init}.
* src/psnames/pspic.h: Declare psnames_module_class_pic_{free,
init}.
* src/raster/rastpic.h: Declare
ft_raster{1,5}_renderer_class_pic_{free,init}
* src/sfnt/sfntpic.h: Declare sfnt_module_class_pic_{free,init}.
* src/smooth/ftspic.h: Declare
ft_smooth_{,lcd_,lcdv_}renderer_class_pic_{free,init}.
* src/truetype/ttpic.h: Declare tt_driver_class_pic_{free,init}.
2012-01-15 15:35:31 +01:00
|
|
|
/* see cffpic.c for the implementation */
|
|
|
|
void
|
|
|
|
cff_driver_class_pic_free( FT_Library library );
|
|
|
|
|
|
|
|
FT_Error
|
|
|
|
cff_driver_class_pic_init( FT_Library library );
|
|
|
|
|
2009-04-05 17:12:03 +02:00
|
|
|
#endif /* FT_CONFIG_OPTION_PIC */
|
|
|
|
|
|
|
|
/* */
|
|
|
|
|
|
|
|
FT_END_HEADER
|
|
|
|
|
|
|
|
#endif /* __CFFPIC_H__ */
|
|
|
|
|
|
|
|
|
|
|
|
/* END */
|