hb-ot-layout.h revision dfa811965133bc4d1696fa5a0166e17ed4142c98
164aef3a54999496fd1de4f5aa5b019e4c03b3836Behdad Esfahbod/* 264aef3a54999496fd1de4f5aa5b019e4c03b3836Behdad Esfahbod * Copyright (C) 2007,2008 Red Hat, Inc. 364aef3a54999496fd1de4f5aa5b019e4c03b3836Behdad Esfahbod * 464aef3a54999496fd1de4f5aa5b019e4c03b3836Behdad Esfahbod * This is part of HarfBuzz, an OpenType Layout engine library. 564aef3a54999496fd1de4f5aa5b019e4c03b3836Behdad Esfahbod * 664aef3a54999496fd1de4f5aa5b019e4c03b3836Behdad Esfahbod * Permission is hereby granted, without written agreement and without 764aef3a54999496fd1de4f5aa5b019e4c03b3836Behdad Esfahbod * license or royalty fees, to use, copy, modify, and distribute this 864aef3a54999496fd1de4f5aa5b019e4c03b3836Behdad Esfahbod * software and its documentation for any purpose, provided that the 964aef3a54999496fd1de4f5aa5b019e4c03b3836Behdad Esfahbod * above copyright notice and the following two paragraphs appear in 1064aef3a54999496fd1de4f5aa5b019e4c03b3836Behdad Esfahbod * all copies of this software. 1164aef3a54999496fd1de4f5aa5b019e4c03b3836Behdad Esfahbod * 1264aef3a54999496fd1de4f5aa5b019e4c03b3836Behdad Esfahbod * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR 1364aef3a54999496fd1de4f5aa5b019e4c03b3836Behdad Esfahbod * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES 1464aef3a54999496fd1de4f5aa5b019e4c03b3836Behdad Esfahbod * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN 1564aef3a54999496fd1de4f5aa5b019e4c03b3836Behdad Esfahbod * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 1664aef3a54999496fd1de4f5aa5b019e4c03b3836Behdad Esfahbod * DAMAGE. 1764aef3a54999496fd1de4f5aa5b019e4c03b3836Behdad Esfahbod * 1864aef3a54999496fd1de4f5aa5b019e4c03b3836Behdad Esfahbod * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, 1964aef3a54999496fd1de4f5aa5b019e4c03b3836Behdad Esfahbod * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 2064aef3a54999496fd1de4f5aa5b019e4c03b3836Behdad Esfahbod * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS 2164aef3a54999496fd1de4f5aa5b019e4c03b3836Behdad Esfahbod * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO 2264aef3a54999496fd1de4f5aa5b019e4c03b3836Behdad Esfahbod * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 2364aef3a54999496fd1de4f5aa5b019e4c03b3836Behdad Esfahbod * 2464aef3a54999496fd1de4f5aa5b019e4c03b3836Behdad Esfahbod * Red Hat Author(s): Behdad Esfahbod 2564aef3a54999496fd1de4f5aa5b019e4c03b3836Behdad Esfahbod */ 2664aef3a54999496fd1de4f5aa5b019e4c03b3836Behdad Esfahbod 27fd92a3dde32fd10df30c9eeb97641bc3c15b1e9bBehdad Esfahbod#ifndef HB_OT_LAYOUT_H 28fd92a3dde32fd10df30c9eeb97641bc3c15b1e9bBehdad Esfahbod#define HB_OT_LAYOUT_H 2912c4568c680ea2b9b98a16a8b7402ca185c90ef6Behdad Esfahbod 308dd1c8b8d6797d899d0f5b0a8015886bf6520ca2Behdad Esfahbod#include "hb-common.h" 3112c4568c680ea2b9b98a16a8b7402ca185c90ef6Behdad Esfahbod 328dd1c8b8d6797d899d0f5b0a8015886bf6520ca2Behdad EsfahbodHB_BEGIN_DECLS(); 3312c4568c680ea2b9b98a16a8b7402ca185c90ef6Behdad Esfahbod 34aff831ed6787abe8e24a977e34d97ff2e0b7dc21Behdad Esfahbod/* 35aff831ed6787abe8e24a977e34d97ff2e0b7dc21Behdad Esfahbod * HB_OT_Layout 36aff831ed6787abe8e24a977e34d97ff2e0b7dc21Behdad Esfahbod */ 37aff831ed6787abe8e24a977e34d97ff2e0b7dc21Behdad Esfahbod 38fd92a3dde32fd10df30c9eeb97641bc3c15b1e9bBehdad Esfahbodtypedef struct _HB_OT_Layout HB_OT_Layout; 39fd92a3dde32fd10df30c9eeb97641bc3c15b1e9bBehdad Esfahbod 40fd92a3dde32fd10df30c9eeb97641bc3c15b1e9bBehdad EsfahbodHB_OT_Layout * 41dfa811965133bc4d1696fa5a0166e17ed4142c98Behdad Esfahbodhb_ot_layout_create_for_data (const char *font_data, 42dfa811965133bc4d1696fa5a0166e17ed4142c98Behdad Esfahbod int face_index); 43fd92a3dde32fd10df30c9eeb97641bc3c15b1e9bBehdad Esfahbod 44fd92a3dde32fd10df30c9eeb97641bc3c15b1e9bBehdad Esfahbodvoid 45fd92a3dde32fd10df30c9eeb97641bc3c15b1e9bBehdad Esfahbodhb_ot_layout_destroy (HB_OT_Layout *layout); 46fd92a3dde32fd10df30c9eeb97641bc3c15b1e9bBehdad Esfahbod 47fd92a3dde32fd10df30c9eeb97641bc3c15b1e9bBehdad Esfahbod/* TODO 48fd92a3dde32fd10df30c9eeb97641bc3c15b1e9bBehdad EsfahbodHB_OT_Layout * 49fd92a3dde32fd10df30c9eeb97641bc3c15b1e9bBehdad Esfahbodhb_ot_layout_create_sanitize (char *data, 50fd92a3dde32fd10df30c9eeb97641bc3c15b1e9bBehdad Esfahbod make_writable_func); 51fd92a3dde32fd10df30c9eeb97641bc3c15b1e9bBehdad Esfahbod*/ 52fd92a3dde32fd10df30c9eeb97641bc3c15b1e9bBehdad Esfahbod 53590d55cbb9e21ef74dfd88eee51fd0a763958cd2Behdad Esfahbod/* 54590d55cbb9e21ef74dfd88eee51fd0a763958cd2Behdad Esfahbod * GDEF 55590d55cbb9e21ef74dfd88eee51fd0a763958cd2Behdad Esfahbod */ 56590d55cbb9e21ef74dfd88eee51fd0a763958cd2Behdad Esfahbod 576f425b11799aa20dab553085f05744191b7318e2Behdad Esfahbodtypedef enum { 586f425b11799aa20dab553085f05744191b7318e2Behdad Esfahbod HB_OT_LAYOUT_GLYPH_CLASS_UNCLASSIFIED = 0x0000, 596f425b11799aa20dab553085f05744191b7318e2Behdad Esfahbod HB_OT_LAYOUT_GLYPH_CLASS_BASE_GLYPH = 0x0002, 606f425b11799aa20dab553085f05744191b7318e2Behdad Esfahbod HB_OT_LAYOUT_GLYPH_CLASS_LIGATURE = 0x0004, 616f425b11799aa20dab553085f05744191b7318e2Behdad Esfahbod HB_OT_LAYOUT_GLYPH_CLASS_MARK = 0x0008, 626f425b11799aa20dab553085f05744191b7318e2Behdad Esfahbod HB_OT_LAYOUT_GLYPH_CLASS_COMPONENT = 0x0010 636f425b11799aa20dab553085f05744191b7318e2Behdad Esfahbod} hb_ot_layout_glyph_class_t; 646f425b11799aa20dab553085f05744191b7318e2Behdad Esfahbod 65590d55cbb9e21ef74dfd88eee51fd0a763958cd2Behdad Esfahbodhb_bool_t 66590d55cbb9e21ef74dfd88eee51fd0a763958cd2Behdad Esfahbodhb_ot_layout_has_font_glyph_classes (HB_OT_Layout *layout); 67590d55cbb9e21ef74dfd88eee51fd0a763958cd2Behdad Esfahbod 68aff831ed6787abe8e24a977e34d97ff2e0b7dc21Behdad Esfahbodhb_ot_layout_glyph_class_t 69590d55cbb9e21ef74dfd88eee51fd0a763958cd2Behdad Esfahbodhb_ot_layout_get_glyph_class (HB_OT_Layout *layout, 70590d55cbb9e21ef74dfd88eee51fd0a763958cd2Behdad Esfahbod hb_glyph_t glyph); 71fd92a3dde32fd10df30c9eeb97641bc3c15b1e9bBehdad Esfahbod 72fd92a3dde32fd10df30c9eeb97641bc3c15b1e9bBehdad Esfahbodvoid 73aff831ed6787abe8e24a977e34d97ff2e0b7dc21Behdad Esfahbodhb_ot_layout_set_glyph_class (HB_OT_Layout *layout, 74590d55cbb9e21ef74dfd88eee51fd0a763958cd2Behdad Esfahbod hb_glyph_t glyph, 75aff831ed6787abe8e24a977e34d97ff2e0b7dc21Behdad Esfahbod hb_ot_layout_glyph_class_t klass); 76fd92a3dde32fd10df30c9eeb97641bc3c15b1e9bBehdad Esfahbod 77590d55cbb9e21ef74dfd88eee51fd0a763958cd2Behdad Esfahbodvoid 78590d55cbb9e21ef74dfd88eee51fd0a763958cd2Behdad Esfahbodhb_ot_layout_build_glyph_classes (HB_OT_Layout *layout, 79590d55cbb9e21ef74dfd88eee51fd0a763958cd2Behdad Esfahbod uint16_t num_total_glyphs, 80590d55cbb9e21ef74dfd88eee51fd0a763958cd2Behdad Esfahbod hb_glyph_t *glyphs, 81590d55cbb9e21ef74dfd88eee51fd0a763958cd2Behdad Esfahbod unsigned char *klasses, 82590d55cbb9e21ef74dfd88eee51fd0a763958cd2Behdad Esfahbod uint16_t count); 83590d55cbb9e21ef74dfd88eee51fd0a763958cd2Behdad Esfahbod 848dd1c8b8d6797d899d0f5b0a8015886bf6520ca2Behdad EsfahbodHB_END_DECLS(); 8512c4568c680ea2b9b98a16a8b7402ca185c90ef6Behdad Esfahbod 86fd92a3dde32fd10df30c9eeb97641bc3c15b1e9bBehdad Esfahbod#endif /* HB_OT_LAYOUT_H */ 87