2009-04-05 17:23:38 +02:00
|
|
|
/***************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* afpic.h */
|
|
|
|
/* */
|
|
|
|
/* The FreeType position independent code services for autofit module. */
|
|
|
|
/* */
|
2012-08-23 13:34:26 +02:00
|
|
|
/* Copyright 2009, 2011-2012 by */
|
2009-04-05 17:23:38 +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 __AFPIC_H__
|
|
|
|
#define __AFPIC_H__
|
|
|
|
|
2012-01-16 18:00:24 +01:00
|
|
|
|
2009-04-05 17:23:38 +02:00
|
|
|
FT_BEGIN_HEADER
|
|
|
|
|
|
|
|
#include FT_INTERNAL_PIC_H
|
|
|
|
|
2012-08-27 06:57:05 +02:00
|
|
|
|
2009-04-05 17:23:38 +02:00
|
|
|
#ifndef FT_CONFIG_OPTION_PIC
|
|
|
|
|
2012-08-27 06:57:05 +02:00
|
|
|
#define AF_SCRIPT_CLASSES_GET af_script_classes
|
|
|
|
#define AF_AUTOFITTER_INTERFACE_GET af_autofitter_interface
|
2009-04-05 17:23:38 +02:00
|
|
|
|
|
|
|
#else /* FT_CONFIG_OPTION_PIC */
|
|
|
|
|
|
|
|
#include "aftypes.h"
|
|
|
|
|
2011-01-03 06:50:36 +01:00
|
|
|
/* increase these when you add new scripts, */
|
|
|
|
/* and update autofit_module_class_pic_init */
|
2009-04-05 17:23:38 +02:00
|
|
|
#ifdef FT_OPTION_AUTOFIT2
|
2012-08-27 06:57:05 +02:00
|
|
|
#define AF_SCRIPT_CLASSES_COUNT 6
|
2009-04-05 17:23:38 +02:00
|
|
|
#else
|
2012-08-27 06:57:05 +02:00
|
|
|
#define AF_SCRIPT_CLASSES_COUNT 5
|
2009-04-05 17:23:38 +02:00
|
|
|
#endif
|
2012-08-27 06:57:05 +02:00
|
|
|
|
2012-01-16 18:00:24 +01:00
|
|
|
#define AF_SCRIPT_CLASSES_REC_COUNT ( AF_SCRIPT_CLASSES_COUNT - 1 )
|
2009-04-05 17:23:38 +02:00
|
|
|
|
2012-08-27 06:57:05 +02:00
|
|
|
|
|
|
|
typedef struct AFModulePIC_
|
2009-04-05 17:23:38 +02:00
|
|
|
{
|
2012-08-27 06:57:05 +02:00
|
|
|
AF_ScriptClass af_script_classes[AF_SCRIPT_CLASSES_COUNT];
|
|
|
|
AF_ScriptClassRec af_script_classes_rec[AF_SCRIPT_CLASSES_REC_COUNT];
|
|
|
|
FT_AutoHinter_InterfaceRec af_autofitter_interface;
|
2011-01-03 06:50:36 +01:00
|
|
|
|
2009-04-05 17:23:38 +02:00
|
|
|
} AFModulePIC;
|
|
|
|
|
2012-08-27 06:57:05 +02:00
|
|
|
|
2011-01-03 06:50:36 +01:00
|
|
|
#define GET_PIC( lib ) \
|
|
|
|
( (AFModulePIC*)((lib)->pic_container.autofit) )
|
2012-08-27 06:57:05 +02:00
|
|
|
|
2011-01-03 06:50:36 +01:00
|
|
|
#define AF_SCRIPT_CLASSES_GET \
|
|
|
|
( GET_PIC( FT_FACE_LIBRARY(globals->face) )->af_script_classes )
|
2012-08-27 06:57:05 +02:00
|
|
|
#define AF_AUTOFITTER_INTERFACE_GET \
|
|
|
|
( GET_PIC( library )->af_autofitter_interface )
|
|
|
|
|
2009-04-05 17:23:38 +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 afpic.c for the implementation */
|
|
|
|
void
|
|
|
|
autofit_module_class_pic_free( FT_Library library );
|
|
|
|
|
|
|
|
FT_Error
|
|
|
|
autofit_module_class_pic_init( FT_Library library );
|
|
|
|
|
2009-04-05 17:23:38 +02:00
|
|
|
#endif /* FT_CONFIG_OPTION_PIC */
|
|
|
|
|
|
|
|
/* */
|
|
|
|
|
|
|
|
FT_END_HEADER
|
|
|
|
|
|
|
|
#endif /* __AFPIC_H__ */
|
|
|
|
|
|
|
|
|
|
|
|
/* END */
|