hb-ot-layout-private.hh revision 4189b92aaa41e4a1756c561cc6e08b0ed024afda
1fd92a3dde32fd10df30c9eeb97641bc3c15b1e9bBehdad Esfahbod/* 26c78683c042250a7b5a6fc6ebae4717b03fadf9eBehdad Esfahbod * Copyright (C) 2007,2008,2009 Red Hat, Inc. 3fd92a3dde32fd10df30c9eeb97641bc3c15b1e9bBehdad Esfahbod * 4fd92a3dde32fd10df30c9eeb97641bc3c15b1e9bBehdad Esfahbod * This is part of HarfBuzz, an OpenType Layout engine library. 5fd92a3dde32fd10df30c9eeb97641bc3c15b1e9bBehdad Esfahbod * 6fd92a3dde32fd10df30c9eeb97641bc3c15b1e9bBehdad Esfahbod * Permission is hereby granted, without written agreement and without 7fd92a3dde32fd10df30c9eeb97641bc3c15b1e9bBehdad Esfahbod * license or royalty fees, to use, copy, modify, and distribute this 8fd92a3dde32fd10df30c9eeb97641bc3c15b1e9bBehdad Esfahbod * software and its documentation for any purpose, provided that the 9fd92a3dde32fd10df30c9eeb97641bc3c15b1e9bBehdad Esfahbod * above copyright notice and the following two paragraphs appear in 10fd92a3dde32fd10df30c9eeb97641bc3c15b1e9bBehdad Esfahbod * all copies of this software. 11fd92a3dde32fd10df30c9eeb97641bc3c15b1e9bBehdad Esfahbod * 12fd92a3dde32fd10df30c9eeb97641bc3c15b1e9bBehdad Esfahbod * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR 13fd92a3dde32fd10df30c9eeb97641bc3c15b1e9bBehdad Esfahbod * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES 14fd92a3dde32fd10df30c9eeb97641bc3c15b1e9bBehdad Esfahbod * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN 15fd92a3dde32fd10df30c9eeb97641bc3c15b1e9bBehdad Esfahbod * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 16fd92a3dde32fd10df30c9eeb97641bc3c15b1e9bBehdad Esfahbod * DAMAGE. 17fd92a3dde32fd10df30c9eeb97641bc3c15b1e9bBehdad Esfahbod * 18fd92a3dde32fd10df30c9eeb97641bc3c15b1e9bBehdad Esfahbod * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, 19fd92a3dde32fd10df30c9eeb97641bc3c15b1e9bBehdad Esfahbod * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 20fd92a3dde32fd10df30c9eeb97641bc3c15b1e9bBehdad Esfahbod * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS 21fd92a3dde32fd10df30c9eeb97641bc3c15b1e9bBehdad Esfahbod * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO 22fd92a3dde32fd10df30c9eeb97641bc3c15b1e9bBehdad Esfahbod * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 23fd92a3dde32fd10df30c9eeb97641bc3c15b1e9bBehdad Esfahbod * 24fd92a3dde32fd10df30c9eeb97641bc3c15b1e9bBehdad Esfahbod * Red Hat Author(s): Behdad Esfahbod 25fd92a3dde32fd10df30c9eeb97641bc3c15b1e9bBehdad Esfahbod */ 26fd92a3dde32fd10df30c9eeb97641bc3c15b1e9bBehdad Esfahbod 27fd92a3dde32fd10df30c9eeb97641bc3c15b1e9bBehdad Esfahbod#ifndef HB_OT_LAYOUT_PRIVATE_H 28fd92a3dde32fd10df30c9eeb97641bc3c15b1e9bBehdad Esfahbod#define HB_OT_LAYOUT_PRIVATE_H 29fd92a3dde32fd10df30c9eeb97641bc3c15b1e9bBehdad Esfahbod 30fd92a3dde32fd10df30c9eeb97641bc3c15b1e9bBehdad Esfahbod#include "hb-private.h" 31fd92a3dde32fd10df30c9eeb97641bc3c15b1e9bBehdad Esfahbod#include "hb-ot-layout.h" 32fd92a3dde32fd10df30c9eeb97641bc3c15b1e9bBehdad Esfahbod 336f425b11799aa20dab553085f05744191b7318e2Behdad Esfahbod/* XXX */ 345c0adce1ccc739415c4b26ff13ffd2d77ea4bc6cBehdad Esfahbod#include "hb-buffer.h" 356f425b11799aa20dab553085f05744191b7318e2Behdad Esfahbod 366f425b11799aa20dab553085f05744191b7318e2Behdad Esfahbod 3730bd763fa2fa4aceee51433ec9fc8dc28480b5d7Behdad Esfahbodtypedef unsigned int hb_ot_layout_class_t; 38ead428d7a0bf4dc84340a99f3959e5cc58123e99Behdad Esfahbod 3960d77cf05fddc5304b4b1fc19cdedba15cbee1e9Behdad Esfahbodstruct _hb_ot_layout_t 4060d77cf05fddc5304b4b1fc19cdedba15cbee1e9Behdad Esfahbod{ 41c43562b2a7587fa3f9ef4c1c4338e4eda77368b5Behdad Esfahbod const struct GDEF *gdef; 42c43562b2a7587fa3f9ef4c1c4338e4eda77368b5Behdad Esfahbod const struct GSUB *gsub; 435e5eb0573f7ea2ce2cf037fef0df70a4351e82c0Behdad Esfahbod const struct GPOS *gpos; 44c43562b2a7587fa3f9ef4c1c4338e4eda77368b5Behdad Esfahbod 4560d77cf05fddc5304b4b1fc19cdedba15cbee1e9Behdad Esfahbod struct 4660d77cf05fddc5304b4b1fc19cdedba15cbee1e9Behdad Esfahbod { 47c43562b2a7587fa3f9ef4c1c4338e4eda77368b5Behdad Esfahbod unsigned char *klasses; 48c43562b2a7587fa3f9ef4c1c4338e4eda77368b5Behdad Esfahbod unsigned int len; 49c43562b2a7587fa3f9ef4c1c4338e4eda77368b5Behdad Esfahbod } new_gdef; 505e5eb0573f7ea2ce2cf037fef0df70a4351e82c0Behdad Esfahbod 515e5eb0573f7ea2ce2cf037fef0df70a4351e82c0Behdad Esfahbod /* TODO full-matrix transformation? */ 5260d77cf05fddc5304b4b1fc19cdedba15cbee1e9Behdad Esfahbod struct gpos_info_t 5360d77cf05fddc5304b4b1fc19cdedba15cbee1e9Behdad Esfahbod { 545e5eb0573f7ea2ce2cf037fef0df70a4351e82c0Behdad Esfahbod unsigned int x_ppem, y_ppem; 555e5eb0573f7ea2ce2cf037fef0df70a4351e82c0Behdad Esfahbod hb_16dot16_t x_scale, y_scale; 565e5eb0573f7ea2ce2cf037fef0df70a4351e82c0Behdad Esfahbod 575e5eb0573f7ea2ce2cf037fef0df70a4351e82c0Behdad Esfahbod hb_bool_t dvi; 585e5eb0573f7ea2ce2cf037fef0df70a4351e82c0Behdad Esfahbod hb_bool_t r2l; 595e5eb0573f7ea2ce2cf037fef0df70a4351e82c0Behdad Esfahbod 605e5eb0573f7ea2ce2cf037fef0df70a4351e82c0Behdad Esfahbod unsigned int last; /* the last valid glyph--used with cursive positioning */ 615e5eb0573f7ea2ce2cf037fef0df70a4351e82c0Behdad Esfahbod hb_position_t anchor_x; /* the coordinates of the anchor point */ 625e5eb0573f7ea2ce2cf037fef0df70a4351e82c0Behdad Esfahbod hb_position_t anchor_y; /* of the last valid glyph */ 635e5eb0573f7ea2ce2cf037fef0df70a4351e82c0Behdad Esfahbod } gpos_info; 64c43562b2a7587fa3f9ef4c1c4338e4eda77368b5Behdad Esfahbod}; 65c43562b2a7587fa3f9ef4c1c4338e4eda77368b5Behdad Esfahbod 66c43562b2a7587fa3f9ef4c1c4338e4eda77368b5Behdad Esfahbod 67f96ffd43bce0ac6d9c897933c9be0e51d543e570Behdad EsfahbodHB_BEGIN_DECLS 68aff831ed6787abe8e24a977e34d97ff2e0b7dc21Behdad Esfahbod 6954e5aac5e2947d4e2864c6f2987e4d275da73100Behdad Esfahbod/* 7054e5aac5e2947d4e2864c6f2987e4d275da73100Behdad Esfahbod * GDEF 7154e5aac5e2947d4e2864c6f2987e4d275da73100Behdad Esfahbod */ 7254e5aac5e2947d4e2864c6f2987e4d275da73100Behdad Esfahbod 73347f0b8621d3adfec157e5634ff3defc818ea37fBehdad EsfahbodHB_INTERNAL hb_bool_t 74e50c3978d37b2c0d6ddd4ced6a6196f6857cd596Behdad Esfahbod_hb_ot_layout_has_new_glyph_classes (hb_ot_layout_t *layout); 756f425b11799aa20dab553085f05744191b7318e2Behdad Esfahbod 76347f0b8621d3adfec157e5634ff3defc818ea37fBehdad EsfahbodHB_INTERNAL unsigned int 7730bd763fa2fa4aceee51433ec9fc8dc28480b5d7Behdad Esfahbod_hb_ot_layout_get_glyph_property (hb_ot_layout_t *layout, 7830bd763fa2fa4aceee51433ec9fc8dc28480b5d7Behdad Esfahbod hb_codepoint_t glyph); 7930bd763fa2fa4aceee51433ec9fc8dc28480b5d7Behdad Esfahbod 80347f0b8621d3adfec157e5634ff3defc818ea37fBehdad EsfahbodHB_INTERNAL void 8130bd763fa2fa4aceee51433ec9fc8dc28480b5d7Behdad Esfahbod_hb_ot_layout_set_glyph_property (hb_ot_layout_t *layout, 8230bd763fa2fa4aceee51433ec9fc8dc28480b5d7Behdad Esfahbod hb_codepoint_t glyph, 8330bd763fa2fa4aceee51433ec9fc8dc28480b5d7Behdad Esfahbod unsigned int property); 84590d55cbb9e21ef74dfd88eee51fd0a763958cd2Behdad Esfahbod 85347f0b8621d3adfec157e5634ff3defc818ea37fBehdad EsfahbodHB_INTERNAL hb_bool_t 86c968fc2dc87cf85b53f60a40db59d5ee7b992edfBehdad Esfahbod_hb_ot_layout_check_glyph_property (hb_ot_layout_t *layout, 87c968fc2dc87cf85b53f60a40db59d5ee7b992edfBehdad Esfahbod hb_glyph_info_t *ginfo, 88c968fc2dc87cf85b53f60a40db59d5ee7b992edfBehdad Esfahbod unsigned int lookup_flags, 89c968fc2dc87cf85b53f60a40db59d5ee7b992edfBehdad Esfahbod unsigned int *property); 905a0b791184cf6ef39eae0570e14aca21abc32845Behdad Esfahbod 914189b92aaa41e4a1756c561cc6e08b0ed024afdaBehdad EsfahbodHB_INTERNAL hb_bool_t 924189b92aaa41e4a1756c561cc6e08b0ed024afdaBehdad Esfahbod_hb_ot_layout_skip_mark (hb_ot_layout_t *layout, 934189b92aaa41e4a1756c561cc6e08b0ed024afdaBehdad Esfahbod hb_glyph_info_t *ginfo, 944189b92aaa41e4a1756c561cc6e08b0ed024afdaBehdad Esfahbod unsigned int lookup_flags, 954189b92aaa41e4a1756c561cc6e08b0ed024afdaBehdad Esfahbod unsigned int *property); 964189b92aaa41e4a1756c561cc6e08b0ed024afdaBehdad Esfahbod 97f96ffd43bce0ac6d9c897933c9be0e51d543e570Behdad EsfahbodHB_END_DECLS 98fd92a3dde32fd10df30c9eeb97641bc3c15b1e9bBehdad Esfahbod 99fd92a3dde32fd10df30c9eeb97641bc3c15b1e9bBehdad Esfahbod#endif /* HB_OT_LAYOUT_PRIVATE_H */ 100