GraphiteExtra.h (1032B)
1 // -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- 2 // vim: set ts=2 et sw=2 tw=80: 3 // This Source Code is subject to the terms of the Mozilla Public License 4 // version 2.0 (the "License"). You can obtain a copy of the License at 5 // http://mozilla.org/MPL/2.0/. 6 7 #ifndef GraphiteExtra_h__ 8 #define GraphiteExtra_h__ 9 10 #include <stdint.h> 11 12 #ifdef __cplusplus 13 extern "C" { 14 #endif 15 16 #include "graphite2/Segment.h" 17 18 typedef struct { 19 uint32_t baseChar; // in UTF16 code units, not Unicode character indices 20 uint32_t baseGlyph; 21 uint32_t nChars; // UTF16 code units 22 uint32_t nGlyphs; 23 } gr_glyph_to_char_cluster; 24 25 typedef struct { 26 gr_glyph_to_char_cluster* clusters; 27 uint16_t* gids; 28 float* xLocs; 29 float* yLocs; 30 uint32_t cIndex; 31 } gr_glyph_to_char_association; 32 33 gr_glyph_to_char_association* gr_get_glyph_to_char_association( 34 gr_segment* aSegment, uint32_t aLength, const char16_t* aText); 35 36 void gr_free_char_association(gr_glyph_to_char_association* aData); 37 38 #ifdef __cplusplus 39 } 40 #endif 41 42 #endif