| 1 |
/****************************************************************************\ |
| 2 |
Part of the XeTeX typesetting system |
| 3 |
Copyright (c) 1994-2008 by SIL International |
| 4 |
Copyright (c) 2009 by Jonathan Kew |
| 5 |
|
| 6 |
SIL Author(s): Jonathan Kew |
| 7 |
|
| 8 |
Permission is hereby granted, free of charge, to any person obtaining |
| 9 |
a copy of this software and associated documentation files (the |
| 10 |
"Software"), to deal in the Software without restriction, including |
| 11 |
without limitation the rights to use, copy, modify, merge, publish, |
| 12 |
distribute, sublicense, and/or sell copies of the Software, and to |
| 13 |
permit persons to whom the Software is furnished to do so, subject to |
| 14 |
the following conditions: |
| 15 |
|
| 16 |
The above copyright notice and this permission notice shall be |
| 17 |
included in all copies or substantial portions of the Software. |
| 18 |
|
| 19 |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
| 20 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
| 21 |
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
| 22 |
NONINFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE |
| 23 |
FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF |
| 24 |
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION |
| 25 |
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
| 26 |
|
| 27 |
Except as contained in this notice, the name of the copyright holders |
| 28 |
shall not be used in advertising or otherwise to promote the sale, |
| 29 |
use or other dealings in this Software without prior written |
| 30 |
authorization from the copyright holders. |
| 31 |
\****************************************************************************/ |
| 32 |
|
| 33 |
#ifndef __XETEX_OT_MATH__ |
| 34 |
#define __XETEX_OT_MATH__ |
| 35 |
|
| 36 |
#include "XeTeX_ext.h" |
| 37 |
|
| 38 |
typedef struct { |
| 39 |
unsigned int count; |
| 40 |
hb_ot_math_glyph_part_t* parts; |
| 41 |
} GlyphAssembly; |
| 42 |
|
| 43 |
/* public "C" APIs for calling from Web(-to-C) code */ |
| 44 |
#ifdef __cplusplus |
| 45 |
extern "C" { |
| 46 |
#endif |
| 47 |
int get_native_mathsy_param(int f, int n); |
| 48 |
int get_native_mathex_param(int f, int n); |
| 49 |
int get_ot_math_constant(int f, int n); |
| 50 |
int get_ot_math_variant(int f, int g, int v, integer* adv, int horiz); |
| 51 |
void* get_ot_assembly_ptr(int f, int g, int horiz); |
| 52 |
void free_ot_assembly(GlyphAssembly* a); |
| 53 |
int get_ot_math_ital_corr(int f, int g); |
| 54 |
int get_ot_math_accent_pos(int f, int g); |
| 55 |
int get_ot_math_kern(int f, int g, int sf, int sg, int cmd, int shift); |
| 56 |
int ot_part_count(const GlyphAssembly* a); |
| 57 |
int ot_part_glyph(const GlyphAssembly* a, int i); |
| 58 |
int ot_part_is_extender(const GlyphAssembly* a, int i); |
| 59 |
int ot_part_start_connector(int f, const GlyphAssembly* a, int i); |
| 60 |
int ot_part_end_connector(int f, const GlyphAssembly* a, int i); |
| 61 |
int ot_part_full_advance(int f, const GlyphAssembly* a, int i); |
| 62 |
int ot_min_connector_overlap(int f); |
| 63 |
#ifdef __cplusplus |
| 64 |
}; |
| 65 |
#endif |
| 66 |
|
| 67 |
#endif |