1/* 2 * Copyright (C) 1998-2004 David Turner and Werner Lemberg 3 * Copyright (C) 2004,2007 Red Hat, Inc. 4 * 5 * This is part of HarfBuzz, an OpenType Layout engine library. 6 * 7 * Permission is hereby granted, without written agreement and without 8 * license or royalty fees, to use, copy, modify, and distribute this 9 * software and its documentation for any purpose, provided that the 10 * above copyright notice and the following two paragraphs appear in 11 * all copies of this software. 12 * 13 * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR 14 * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES 15 * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN 16 * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 17 * DAMAGE. 18 * 19 * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, 20 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 21 * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS 22 * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO 23 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 24 * 25 * Red Hat Author(s): Owen Taylor, Behdad Esfahbod 26 */ 27 28#ifndef HARFBUZZ_BUFFER_H 29#define HARFBUZZ_BUFFER_H 30 31#include "harfbuzz-global.h" 32 33HB_BEGIN_HEADER 34 35#ifdef HB_USE_PACKED_STRUCTS 36#pragma pack(push, 1) 37#endif 38 39typedef struct HB_GlyphItemRec_ { 40 HB_UInt gindex; 41 HB_UInt properties; 42 HB_UInt cluster; 43 HB_UShort component; 44 HB_UShort ligID; 45 HB_UShort gproperties; 46} HB_GlyphItemRec, *HB_GlyphItem; 47 48typedef struct HB_PositionRec_ { 49 HB_Fixed x_pos; 50 HB_Fixed y_pos; 51 HB_Fixed x_advance; 52 HB_Fixed y_advance; 53 HB_UShort back; /* number of glyphs to go back 54 for drawing current glyph */ 55 HB_Short cursive_chain; /* character to which this connects, 56 may be positive or negative; used 57 only internally */ 58 HB_Bool new_advance; /* if set, the advance width values are 59 absolute, i.e., they won't be 60 added to the original glyph's value 61 but rather replace them. */ 62} HB_PositionRec, *HB_Position; 63 64 65typedef struct HB_BufferRec_{ 66 HB_UInt allocated; 67 68 HB_UInt in_length; 69 HB_UInt out_length; 70 HB_UInt in_pos; 71 HB_UInt out_pos; 72 73 HB_GlyphItem in_string; 74 HB_GlyphItem out_string; 75 HB_GlyphItem alt_string; 76 HB_Position positions; 77 HB_UShort max_ligID; 78 HB_Bool separate_out; 79} HB_BufferRec, *HB_Buffer; 80 81HB_Error 82hb_buffer_new( HB_Buffer *buffer ); 83 84void 85hb_buffer_free( HB_Buffer buffer ); 86 87void 88hb_buffer_clear( HB_Buffer buffer ); 89 90HB_Error 91hb_buffer_add_glyph( HB_Buffer buffer, 92 HB_UInt glyph_index, 93 HB_UInt properties, 94 HB_UInt cluster ); 95 96#ifdef HB_USE_PACKED_STRUCTS 97#pragma pack(pop) 98#endif 99 100HB_END_HEADER 101 102#endif /* HARFBUZZ_BUFFER_H */ 103