11512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod/*
21512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod * Copyright (C) 1998-2004  David Turner and Werner Lemberg
31512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod * Copyright (C) 2006  Behdad Esfahbod
41512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod *
51512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod * This is part of HarfBuzz, an OpenType Layout engine library.
61512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod *
71512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod * Permission is hereby granted, without written agreement and without
81512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod * license or royalty fees, to use, copy, modify, and distribute this
91512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod * software and its documentation for any purpose, provided that the
101512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod * above copyright notice and the following two paragraphs appear in
111512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod * all copies of this software.
121512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod *
131512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
141512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
151512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
161512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
171512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod * DAMAGE.
181512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod *
191512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
201512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
211512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
221512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
231512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
241512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod */
251512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod
261512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod#ifndef HARFBUZZ_GDEF_PRIVATE_H
271512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod#define HARFBUZZ_GDEF_PRIVATE_H
281512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod
291512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod#include "harfbuzz-impl.h"
301512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod#include "harfbuzz-stream-private.h"
311512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod#include "harfbuzz-buffer-private.h"
321512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod#include "harfbuzz-gdef.h"
331512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod
341512a7357513b72e2a07dda706a176bb23d694e9Behdad EsfahbodHB_BEGIN_HEADER
351512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod
361512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod
371512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod#ifdef HB_USE_PACKED_STRUCTS
381512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod#pragma pack(push, 1)
391512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod#endif
401512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod
411512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod/* Attachment related structures */
421512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod
431512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbodstruct  HB_AttachPoint_
441512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod{
451512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod  HB_UShort*  PointIndex;             /* array of contour points      */
461512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod  HB_UShort   PointCount;             /* size of the PointIndex array */
471512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod};
481512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod
491512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod/* Ligature Caret related structures */
501512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod
511512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbodstruct  HB_CaretValueFormat1_
521512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod{
531512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod  HB_Short  Coordinate;               /* x or y value (in design units) */
541512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod};
551512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod
561512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbodtypedef struct HB_CaretValueFormat1_  HB_CaretValueFormat1;
571512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod
581512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod
591512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbodstruct  HB_CaretValueFormat2_
601512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod{
611512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod  HB_UShort  CaretValuePoint;         /* contour point index on glyph */
621512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod};
631512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod
641512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbodtypedef struct HB_CaretValueFormat2_  HB_CaretValueFormat2;
651512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod
661512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod
671512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbodstruct  HB_CaretValueFormat3_
681512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod{
691512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod  HB_Device*  Device;                 /* Device table for x or y value  */
701512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod  HB_Short    Coordinate;             /* x or y value (in design units) */
711512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod};
721512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod
731512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbodtypedef struct HB_CaretValueFormat3_  HB_CaretValueFormat3;
741512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod
751512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod
761512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod#ifdef HB_SUPPORT_MULTIPLE_MASTER
771512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbodstruct  HB_CaretValueFormat4_
781512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod{
791512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod  HB_UShort  IdCaretValue;            /* metric ID */
801512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod};
811512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod
821512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbodtypedef struct HB_CaretValueFormat4_  HB_CaretValueFormat4;
831512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod#endif
841512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod
851512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod
861512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbodstruct  HB_CaretValue_
871512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod{
881512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod  union
891512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod  {
901512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod    HB_CaretValueFormat1  cvf1;
911512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod    HB_CaretValueFormat2  cvf2;
921512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod    HB_CaretValueFormat3  cvf3;
931512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod#ifdef HB_SUPPORT_MULTIPLE_MASTER
941512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod    HB_CaretValueFormat4  cvf4;
951512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod#endif
961512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod  } cvf;
971512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod
981512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod  HB_Byte  CaretValueFormat;          /* 1, 2, 3, or 4 */
991512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod};
1001512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod
1011512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbodtypedef struct HB_CaretValue_  HB_CaretValue;
1021512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod
1031512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod
1041512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbodstruct  HB_LigGlyph_
1051512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod{
1061512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod  HB_CaretValue*  CaretValue;        /* array of caret values  */
1071512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod  HB_UShort        CaretCount;        /* number of caret values */
1081512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod  HB_Bool          loaded;
1091512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod};
1101512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod
1111512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod
1121512a7357513b72e2a07dda706a176bb23d694e9Behdad EsfahbodHB_INTERNAL HB_Error
1131512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod_HB_GDEF_Add_Glyph_Property( HB_GDEFHeader* gdef,
1141512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod				       HB_UShort        glyphID,
1151512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod				       HB_UShort        property );
1161512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod
1171512a7357513b72e2a07dda706a176bb23d694e9Behdad EsfahbodHB_INTERNAL HB_Error
1181512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod_HB_GDEF_Check_Property( HB_GDEFHeader* gdef,
1191512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod				   HB_GlyphItem    item,
1201512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod				   HB_UShort        flags,
1211512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod				   HB_UShort*       property );
1221512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod
1231512a7357513b72e2a07dda706a176bb23d694e9Behdad EsfahbodHB_INTERNAL HB_Error
1241512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod_HB_GDEF_LoadMarkAttachClassDef_From_LookupFlags( HB_GDEFHeader* gdef,
1251512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod						  HB_Stream      input,
1261512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod						  HB_Lookup*     lo,
1271512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod						  HB_UShort      num_lookups );
1281512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod
1291512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod#ifdef HB_USE_PACKED_STRUCTS
1301512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod#pragma pack(pop)
1311512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod#endif
1321512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod
1331512a7357513b72e2a07dda706a176bb23d694e9Behdad EsfahbodHB_END_HEADER
1341512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod
1351512a7357513b72e2a07dda706a176bb23d694e9Behdad Esfahbod#endif /* HARFBUZZ_GDEF_PRIVATE_H */
136