blob: c1632e76e9a5df4200144d6a2de4b40e4c82120b [file] [log] [blame]
Oran Agra59b4af82009-04-05 18:23:38 +03001/***************************************************************************/
2/* */
3/* afpic.h */
4/* */
5/* The FreeType position independent code services for autofit module. */
6/* */
Werner Lembergfa1e6b32011-01-03 06:50:36 +01007/* Copyright 2009, 2011 by */
Oran Agra59b4af82009-04-05 18:23:38 +03008/* 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#ifndef FT_CONFIG_OPTION_PIC
28
29#define AF_SCRIPT_CLASSES_GET af_script_classes
30#define AF_AF_AUTOFITTER_SERVICE_GET af_autofitter_service
31
32#else /* FT_CONFIG_OPTION_PIC */
33
34#include "aftypes.h"
35
Werner Lembergfa1e6b32011-01-03 06:50:36 +010036 /* increase these when you add new scripts, */
37 /* and update autofit_module_class_pic_init */
Oran Agra59b4af82009-04-05 18:23:38 +030038#ifdef FT_OPTION_AUTOFIT2
Werner Lembergfa1e6b32011-01-03 06:50:36 +010039#define AF_SCRIPT_CLASSES_COUNT 6
Oran Agra59b4af82009-04-05 18:23:38 +030040#else
Werner Lembergfa1e6b32011-01-03 06:50:36 +010041#define AF_SCRIPT_CLASSES_COUNT 5
Oran Agra59b4af82009-04-05 18:23:38 +030042#endif
Werner Lembergfa1e6b32011-01-03 06:50:36 +010043#define AF_SCRIPT_CLASSES_REC_COUNT ( AF_SCRIPT_CLASSES_COUNT - 1 )
Oran Agra59b4af82009-04-05 18:23:38 +030044
45 typedef struct AFModulePIC_
46 {
Werner Lembergfa1e6b32011-01-03 06:50:36 +010047 AF_ScriptClass af_script_classes[AF_SCRIPT_CLASSES_COUNT];
48 AF_ScriptClassRec af_script_classes_rec[AF_SCRIPT_CLASSES_REC_COUNT];
49 FT_AutoHinter_ServiceRec af_autofitter_service;
50
Oran Agra59b4af82009-04-05 18:23:38 +030051 } AFModulePIC;
52
Werner Lembergfa1e6b32011-01-03 06:50:36 +010053#define GET_PIC( lib ) \
54 ( (AFModulePIC*)((lib)->pic_container.autofit) )
55#define AF_SCRIPT_CLASSES_GET \
56 ( GET_PIC( FT_FACE_LIBRARY(globals->face) )->af_script_classes )
57#define AF_AF_AUTOFITTER_SERVICE_GET \
58 ( GET_PIC( library )->af_autofitter_service )
Oran Agra59b4af82009-04-05 18:23:38 +030059
60#endif /* FT_CONFIG_OPTION_PIC */
61
62 /* */
63
64FT_END_HEADER
65
66#endif /* __AFPIC_H__ */
67
68
69/* END */