1727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease/***************************************************************************/ 2727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease/* */ 3727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease/* cf2glue.h */ 4727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease/* */ 5727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease/* Adobe's code for shared stuff (specification only). */ 6727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease/* */ 7727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease/* Copyright 2007-2013 Adobe Systems Incorporated. */ 8727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease/* */ 9727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease/* This software, and all works of authorship, whether in source or */ 10727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease/* object code form as indicated by the copyright notice(s) included */ 11727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease/* herein (collectively, the "Work") is made available, and may only be */ 12727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease/* used, modified, and distributed under the FreeType Project License, */ 13727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease/* LICENSE.TXT. Additionally, subject to the terms and conditions of the */ 14727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease/* FreeType Project License, each contributor to the Work hereby grants */ 15727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease/* to any individual or legal entity exercising permissions granted by */ 16727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease/* the FreeType Project License and this section (hereafter, "You" or */ 17727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease/* "Your") a perpetual, worldwide, non-exclusive, no-charge, */ 18727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease/* royalty-free, irrevocable (except as stated in this section) patent */ 19727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease/* license to make, have made, use, offer to sell, sell, import, and */ 20727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease/* otherwise transfer the Work, where such license applies only to those */ 21727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease/* patent claims licensable by such contributor that are necessarily */ 22727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease/* infringed by their contribution(s) alone or by combination of their */ 23727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease/* contribution(s) with the Work to which such contribution(s) was */ 24727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease/* submitted. If You institute patent litigation against any entity */ 25727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease/* (including a cross-claim or counterclaim in a lawsuit) alleging that */ 26727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease/* the Work or a contribution incorporated within the Work constitutes */ 27727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease/* direct or contributory patent infringement, then any patent licenses */ 28727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease/* granted to You under this License for that Work shall terminate as of */ 29727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease/* the date such litigation is filed. */ 30727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease/* */ 31727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease/* By using, modifying, or distributing the Work you indicate that you */ 32727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease/* have read and understood the terms and conditions of the */ 33727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease/* FreeType Project License as well as those provided in this section, */ 34727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease/* and you accept them fully. */ 35727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease/* */ 36727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease/***************************************************************************/ 37727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease 38727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease 39055aee28cedc3631434b2636fc6093c0d4d818abJungshik Shin#ifndef CF2GLUE_H_ 40055aee28cedc3631434b2636fc6093c0d4d818abJungshik Shin#define CF2GLUE_H_ 41727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease 42727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease 43727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease/* common includes for other modules */ 44727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease#include "cf2error.h" 45727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease#include "cf2fixed.h" 46727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease#include "cf2arrst.h" 47727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease#include "cf2read.h" 48727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease 49727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease 50727dee178a392d20eb050d0c446f2fcc29058fa1Victoria LeaseFT_BEGIN_HEADER 51727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease 52727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease 53727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease /* rendering parameters */ 54727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease 55727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease /* apply hints to rendered glyphs */ 56727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease#define CF2_FlagsHinted 1 57727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease /* for testing */ 58727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease#define CF2_FlagsDarkened 2 59727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease 60727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease /* type for holding the flags */ 61727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease typedef CF2_Int CF2_RenderingFlags; 62727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease 63727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease 64727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease /* elements of a glyph outline */ 65727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease typedef enum CF2_PathOp_ 66727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease { 67727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease CF2_PathOpMoveTo = 1, /* change the current point */ 68727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease CF2_PathOpLineTo = 2, /* line */ 69727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease CF2_PathOpQuadTo = 3, /* quadratic curve */ 70727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease CF2_PathOpCubeTo = 4 /* cubic curve */ 71727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease 72727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease } CF2_PathOp; 73727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease 74727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease 75727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease /* a matrix of fixed point values */ 76727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease typedef struct CF2_Matrix_ 77727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease { 78727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease CF2_F16Dot16 a; 79727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease CF2_F16Dot16 b; 80727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease CF2_F16Dot16 c; 81727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease CF2_F16Dot16 d; 82727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease CF2_F16Dot16 tx; 83727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease CF2_F16Dot16 ty; 84727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease 85727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease } CF2_Matrix; 86727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease 87727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease 88727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease /* these typedefs are needed by more than one header file */ 89727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease /* and gcc compiler doesn't allow redefinition */ 90727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease typedef struct CF2_FontRec_ CF2_FontRec, *CF2_Font; 91727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease typedef struct CF2_HintRec_ CF2_HintRec, *CF2_Hint; 92727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease 93727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease 94727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease /* A common structure for all callback parameters. */ 95727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease /* */ 96727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease /* Some members may be unused. For example, `pt0' is not used for */ 97727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease /* `moveTo' and `pt3' is not used for `quadTo'. The initial point `pt0' */ 98727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease /* is included for each path element for generality; curve conversions */ 99727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease /* need it. The `op' parameter allows one function to handle multiple */ 100727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease /* element types. */ 101727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease 102727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease typedef struct CF2_CallbackParamsRec_ 103727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease { 104727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease FT_Vector pt0; 105727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease FT_Vector pt1; 106727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease FT_Vector pt2; 107727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease FT_Vector pt3; 108727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease 109727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease CF2_Int op; 110727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease 111727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease } CF2_CallbackParamsRec, *CF2_CallbackParams; 112727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease 113727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease 114727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease /* forward reference */ 115727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease typedef struct CF2_OutlineCallbacksRec_ CF2_OutlineCallbacksRec, 116727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease *CF2_OutlineCallbacks; 117727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease 118727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease /* callback function pointers */ 119727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease typedef void 120727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease (*CF2_Callback_Type)( CF2_OutlineCallbacks callbacks, 121727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease const CF2_CallbackParams params ); 122727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease 123727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease 124727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease struct CF2_OutlineCallbacksRec_ 125727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease { 126727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease CF2_Callback_Type moveTo; 127727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease CF2_Callback_Type lineTo; 128727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease CF2_Callback_Type quadTo; 129727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease CF2_Callback_Type cubeTo; 130727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease 131727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease CF2_Int windingMomentum; /* for winding order detection */ 132727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease 133727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease FT_Memory memory; 134727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease FT_Error* error; 135727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease }; 136727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease 137727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease 138727dee178a392d20eb050d0c446f2fcc29058fa1Victoria LeaseFT_END_HEADER 139727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease 140727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease 141055aee28cedc3631434b2636fc6093c0d4d818abJungshik Shin#endif /* CF2GLUE_H_ */ 142727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease 143727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease 144727dee178a392d20eb050d0c446f2fcc29058fa1Victoria Lease/* END */ 145