1 /* 2 * Copyright 2014 Adobe Systems Incorporated (http://www.adobe.com/). 3 * All Rights Reserved. 4 * 5 * This software is licensed as OpenSource, under the Apache License, Version 6 * 2.0. 7 * This license is available at: http://opensource.org/licenses/Apache-2.0. 8 */ 9 10 #ifndef CHARPATH_H 11 #define CHARPATH_H 12 13 #include "ac.h" 14 15 typedef struct _t_hintelt { 16 struct _t_hintelt *next; 17 int16_t type; /* RB, RY, RM, RV */ 18 Fixed leftorbot, rightortop; 19 int32_t pathix1, pathix2; 20 } HintElt; 21 22 typedef struct { 23 int16_t type; /* RMT, RDT, RCT, CP */ 24 /* the following fields must be cleared in charpathpriv.c/CheckPath */ 25 bool isFlex:1; 26 HintElt* hints; 27 Fixed x, y, x1, y1, x2, y2, x3, y3; /* absolute coordinates */ 28 int32_t rx, ry, rx1, ry1, rx2, ry2, rx3, ry3; /* relative coordinates */ 29 } GlyphPathElt; 30 31 typedef struct { 32 GlyphPathElt* path; 33 HintElt* mainhints; 34 int32_t sb; 35 int16_t width; 36 } PathList; 37 38 extern int32_t gPathEntries; /* number of elements in a glyph path */ 39 extern bool gAddHints; /* whether to include hints in the font */ 40 41 GlyphPathElt* AppendGlyphPathElement(int); 42 43 void ResetMaxPathEntries(void); 44 45 void SetCurrPathList(PathList*); 46 47 void SetHintsElt(int16_t, Cd*, int32_t, int32_t, bool); 48 49 void SetNoHints(void); 50 51 #endif /*CHARPATH_H*/ 52 53