164aef3a54999496fd1de4f5aa5b019e4c03b3836Behdad Esfahbod/* 22409d5f8d7dd8b535ce5ea29e933f7db27d33793Behdad Esfahbod * Copyright © 2007,2008,2009 Red Hat, Inc. 364aef3a54999496fd1de4f5aa5b019e4c03b3836Behdad Esfahbod * 4c755cb3e3ac55156d0d2ec05adea7a650b97cc41Behdad Esfahbod * This is part of HarfBuzz, a text shaping 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 27d1c9eb458c843215da8df84b596bfae51fee135bBehdad Esfahbod#ifndef HB_OT_H_IN 28d1c9eb458c843215da8df84b596bfae51fee135bBehdad Esfahbod#error "Include <hb-ot.h> instead." 29d1c9eb458c843215da8df84b596bfae51fee135bBehdad Esfahbod#endif 30d1c9eb458c843215da8df84b596bfae51fee135bBehdad Esfahbod 31fd92a3dde32fd10df30c9eeb97641bc3c15b1e9bBehdad Esfahbod#ifndef HB_OT_LAYOUT_H 32fd92a3dde32fd10df30c9eeb97641bc3c15b1e9bBehdad Esfahbod#define HB_OT_LAYOUT_H 3312c4568c680ea2b9b98a16a8b7402ca185c90ef6Behdad Esfahbod 34d1c9eb458c843215da8df84b596bfae51fee135bBehdad Esfahbod#include "hb.h" 3512c4568c680ea2b9b98a16a8b7402ca185c90ef6Behdad Esfahbod 368a3511ac6c795226699c2b36e03401ecdf88f5f8Behdad Esfahbod#include "hb-ot-tag.h" 378a3511ac6c795226699c2b36e03401ecdf88f5f8Behdad Esfahbod 38f96ffd43bce0ac6d9c897933c9be0e51d543e570Behdad EsfahbodHB_BEGIN_DECLS 3912c4568c680ea2b9b98a16a8b7402ca185c90ef6Behdad Esfahbod 40acdba3f90b232fc12fcb200dca2584481b339118Behdad Esfahbod 410ead481a5a8623103565fd7d924666e7342278ddBehdad Esfahbod#define HB_OT_TAG_GDEF HB_TAG('G','D','E','F') 420ead481a5a8623103565fd7d924666e7342278ddBehdad Esfahbod#define HB_OT_TAG_GSUB HB_TAG('G','S','U','B') 430ead481a5a8623103565fd7d924666e7342278ddBehdad Esfahbod#define HB_OT_TAG_GPOS HB_TAG('G','P','O','S') 446c48f20eea22c6e686416ab4ec8388be3e8cd0b5Behdad Esfahbod#define HB_OT_TAG_JSTF HB_TAG('J','S','T','F') 45fd92a3dde32fd10df30c9eeb97641bc3c15b1e9bBehdad Esfahbod 46cfe9882610489e1b917e09a74dfbf6bbba2e4a57Behdad Esfahbod 47590d55cbb9e21ef74dfd88eee51fd0a763958cd2Behdad Esfahbod/* 48590d55cbb9e21ef74dfd88eee51fd0a763958cd2Behdad Esfahbod * GDEF 49590d55cbb9e21ef74dfd88eee51fd0a763958cd2Behdad Esfahbod */ 50590d55cbb9e21ef74dfd88eee51fd0a763958cd2Behdad Esfahbod 51590d55cbb9e21ef74dfd88eee51fd0a763958cd2Behdad Esfahbodhb_bool_t 52b4b4272c8d19ba3e0cb8f12b3b7d1590349e3d14Behdad Esfahbodhb_ot_layout_has_glyph_classes (hb_face_t *face); 53590d55cbb9e21ef74dfd88eee51fd0a763958cd2Behdad Esfahbod 54f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbodtypedef enum { 555a08ecf9200a6ac9b4ebb7ec5c13dcb42d8820ceBehdad Esfahbod HB_OT_LAYOUT_GLYPH_CLASS_UNCLASSIFIED = 0, 565a08ecf9200a6ac9b4ebb7ec5c13dcb42d8820ceBehdad Esfahbod HB_OT_LAYOUT_GLYPH_CLASS_BASE_GLYPH = 1, 575a08ecf9200a6ac9b4ebb7ec5c13dcb42d8820ceBehdad Esfahbod HB_OT_LAYOUT_GLYPH_CLASS_LIGATURE = 2, 585a08ecf9200a6ac9b4ebb7ec5c13dcb42d8820ceBehdad Esfahbod HB_OT_LAYOUT_GLYPH_CLASS_MARK = 3, 595a08ecf9200a6ac9b4ebb7ec5c13dcb42d8820ceBehdad Esfahbod HB_OT_LAYOUT_GLYPH_CLASS_COMPONENT = 4 60f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod} hb_ot_layout_glyph_class_t; 61f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod 62f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbodhb_ot_layout_glyph_class_t 635a08ecf9200a6ac9b4ebb7ec5c13dcb42d8820ceBehdad Esfahbodhb_ot_layout_get_glyph_class (hb_face_t *face, 64f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod hb_codepoint_t glyph); 65f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod 6689ca8eeb83fedde06727d386369a0a39d410f12bBehdad Esfahbodvoid 6789ca8eeb83fedde06727d386369a0a39d410f12bBehdad Esfahbodhb_ot_layout_get_glyphs_in_class (hb_face_t *face, 68f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod hb_ot_layout_glyph_class_t klass, 69f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod hb_set_t *glyphs /* OUT */); 70f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod 71f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod 72bff3c0fde5da04a70d1f7aeeb9fa2a75fe5c07f6Behdad Esfahbod/* Not that useful. Provides list of attach points for a glyph that a 73bff3c0fde5da04a70d1f7aeeb9fa2a75fe5c07f6Behdad Esfahbod * client may want to cache */ 74e21899bc3593aa0d3adf64cee21c5de2ea219783Behdad Esfahbodunsigned int 750ead481a5a8623103565fd7d924666e7342278ddBehdad Esfahbodhb_ot_layout_get_attach_points (hb_face_t *face, 7679420ad9caf2d5fc94c3693e8292edfa27060b2dBehdad Esfahbod hb_codepoint_t glyph, 77e21899bc3593aa0d3adf64cee21c5de2ea219783Behdad Esfahbod unsigned int start_offset, 7879420ad9caf2d5fc94c3693e8292edfa27060b2dBehdad Esfahbod unsigned int *point_count /* IN/OUT */, 7979420ad9caf2d5fc94c3693e8292edfa27060b2dBehdad Esfahbod unsigned int *point_array /* OUT */); 8079420ad9caf2d5fc94c3693e8292edfa27060b2dBehdad Esfahbod 81bff3c0fde5da04a70d1f7aeeb9fa2a75fe5c07f6Behdad Esfahbod/* Ligature caret positions */ 82e21899bc3593aa0d3adf64cee21c5de2ea219783Behdad Esfahbodunsigned int 83e204674fe340a57c48a9fe7e1ed02a9a08f4aca4Behdad Esfahbodhb_ot_layout_get_ligature_carets (hb_font_t *font, 84e204674fe340a57c48a9fe7e1ed02a9a08f4aca4Behdad Esfahbod hb_direction_t direction, 85e204674fe340a57c48a9fe7e1ed02a9a08f4aca4Behdad Esfahbod hb_codepoint_t glyph, 86e204674fe340a57c48a9fe7e1ed02a9a08f4aca4Behdad Esfahbod unsigned int start_offset, 87e204674fe340a57c48a9fe7e1ed02a9a08f4aca4Behdad Esfahbod unsigned int *caret_count /* IN/OUT */, 8860fbb36096e344e9af79409ce8cfe3f1f7b0d321Behdad Esfahbod hb_position_t *caret_array /* OUT */); 8962964afcecd96038cfaa8bc2bc931f43ee83be7eBehdad Esfahbod 90bff3c0fde5da04a70d1f7aeeb9fa2a75fe5c07f6Behdad Esfahbod 91706ab25a4cb043d46e6088aa0a7184ee200276c9Behdad Esfahbod/* 92bff3c0fde5da04a70d1f7aeeb9fa2a75fe5c07f6Behdad Esfahbod * GSUB/GPOS feature query and enumeration interface 93706ab25a4cb043d46e6088aa0a7184ee200276c9Behdad Esfahbod */ 94706ab25a4cb043d46e6088aa0a7184ee200276c9Behdad Esfahbod 957627100f428ac0ec8509d961d368d2d25d8f0b6eBehdad Esfahbod#define HB_OT_LAYOUT_NO_SCRIPT_INDEX 0xFFFFu 967627100f428ac0ec8509d961d368d2d25d8f0b6eBehdad Esfahbod#define HB_OT_LAYOUT_NO_FEATURE_INDEX 0xFFFFu 977627100f428ac0ec8509d961d368d2d25d8f0b6eBehdad Esfahbod#define HB_OT_LAYOUT_DEFAULT_LANGUAGE_INDEX 0xFFFFu 98706ab25a4cb043d46e6088aa0a7184ee200276c9Behdad Esfahbod 99e21899bc3593aa0d3adf64cee21c5de2ea219783Behdad Esfahbodunsigned int 100bff3c0fde5da04a70d1f7aeeb9fa2a75fe5c07f6Behdad Esfahbodhb_ot_layout_table_get_script_tags (hb_face_t *face, 101bff3c0fde5da04a70d1f7aeeb9fa2a75fe5c07f6Behdad Esfahbod hb_tag_t table_tag, 102e21899bc3593aa0d3adf64cee21c5de2ea219783Behdad Esfahbod unsigned int start_offset, 103bff3c0fde5da04a70d1f7aeeb9fa2a75fe5c07f6Behdad Esfahbod unsigned int *script_count /* IN/OUT */, 104bff3c0fde5da04a70d1f7aeeb9fa2a75fe5c07f6Behdad Esfahbod hb_tag_t *script_tags /* OUT */); 105706ab25a4cb043d46e6088aa0a7184ee200276c9Behdad Esfahbod 106706ab25a4cb043d46e6088aa0a7184ee200276c9Behdad Esfahbodhb_bool_t 1070ead481a5a8623103565fd7d924666e7342278ddBehdad Esfahbodhb_ot_layout_table_find_script (hb_face_t *face, 1080ead481a5a8623103565fd7d924666e7342278ddBehdad Esfahbod hb_tag_t table_tag, 1090ead481a5a8623103565fd7d924666e7342278ddBehdad Esfahbod hb_tag_t script_tag, 1100ead481a5a8623103565fd7d924666e7342278ddBehdad Esfahbod unsigned int *script_index); 111706ab25a4cb043d46e6088aa0a7184ee200276c9Behdad Esfahbod 1122014b8d110231b13e524008282ece7451f1ae9e7Behdad Esfahbod/* Like find_script, but takes zero-terminated array of scripts to test */ 1132014b8d110231b13e524008282ece7451f1ae9e7Behdad Esfahbodhb_bool_t 1142014b8d110231b13e524008282ece7451f1ae9e7Behdad Esfahbodhb_ot_layout_table_choose_script (hb_face_t *face, 1152014b8d110231b13e524008282ece7451f1ae9e7Behdad Esfahbod hb_tag_t table_tag, 1162014b8d110231b13e524008282ece7451f1ae9e7Behdad Esfahbod const hb_tag_t *script_tags, 117c47a31fb4793b825f4be57e9cb1b10db352b9512Behdad Esfahbod unsigned int *script_index, 118c47a31fb4793b825f4be57e9cb1b10db352b9512Behdad Esfahbod hb_tag_t *chosen_script); 1192014b8d110231b13e524008282ece7451f1ae9e7Behdad Esfahbod 120e21899bc3593aa0d3adf64cee21c5de2ea219783Behdad Esfahbodunsigned int 121bff3c0fde5da04a70d1f7aeeb9fa2a75fe5c07f6Behdad Esfahbodhb_ot_layout_table_get_feature_tags (hb_face_t *face, 122bff3c0fde5da04a70d1f7aeeb9fa2a75fe5c07f6Behdad Esfahbod hb_tag_t table_tag, 123e21899bc3593aa0d3adf64cee21c5de2ea219783Behdad Esfahbod unsigned int start_offset, 124bff3c0fde5da04a70d1f7aeeb9fa2a75fe5c07f6Behdad Esfahbod unsigned int *feature_count /* IN/OUT */, 125bff3c0fde5da04a70d1f7aeeb9fa2a75fe5c07f6Behdad Esfahbod hb_tag_t *feature_tags /* OUT */); 126706ab25a4cb043d46e6088aa0a7184ee200276c9Behdad Esfahbod 127e21899bc3593aa0d3adf64cee21c5de2ea219783Behdad Esfahbodunsigned int 128bff3c0fde5da04a70d1f7aeeb9fa2a75fe5c07f6Behdad Esfahbodhb_ot_layout_script_get_language_tags (hb_face_t *face, 129bff3c0fde5da04a70d1f7aeeb9fa2a75fe5c07f6Behdad Esfahbod hb_tag_t table_tag, 130bff3c0fde5da04a70d1f7aeeb9fa2a75fe5c07f6Behdad Esfahbod unsigned int script_index, 131e21899bc3593aa0d3adf64cee21c5de2ea219783Behdad Esfahbod unsigned int start_offset, 132bff3c0fde5da04a70d1f7aeeb9fa2a75fe5c07f6Behdad Esfahbod unsigned int *language_count /* IN/OUT */, 133bff3c0fde5da04a70d1f7aeeb9fa2a75fe5c07f6Behdad Esfahbod hb_tag_t *language_tags /* OUT */); 1344a26ea408c87f0bb59deca9ff44008d138471aa3Behdad Esfahbod 1354a26ea408c87f0bb59deca9ff44008d138471aa3Behdad Esfahbodhb_bool_t 1360ead481a5a8623103565fd7d924666e7342278ddBehdad Esfahbodhb_ot_layout_script_find_language (hb_face_t *face, 1370ead481a5a8623103565fd7d924666e7342278ddBehdad Esfahbod hb_tag_t table_tag, 1380ead481a5a8623103565fd7d924666e7342278ddBehdad Esfahbod unsigned int script_index, 1390ead481a5a8623103565fd7d924666e7342278ddBehdad Esfahbod hb_tag_t language_tag, 1400ead481a5a8623103565fd7d924666e7342278ddBehdad Esfahbod unsigned int *language_index); 141c44733596c6648e209c12349e18e35424edf3d59Behdad Esfahbod 142c44733596c6648e209c12349e18e35424edf3d59Behdad Esfahbodhb_bool_t 143911ca38645bd51764e7859bc482319e8f6d2f710Behdad Esfahbodhb_ot_layout_language_get_required_feature_index (hb_face_t *face, 144911ca38645bd51764e7859bc482319e8f6d2f710Behdad Esfahbod hb_tag_t table_tag, 145911ca38645bd51764e7859bc482319e8f6d2f710Behdad Esfahbod unsigned int script_index, 146911ca38645bd51764e7859bc482319e8f6d2f710Behdad Esfahbod unsigned int language_index, 147911ca38645bd51764e7859bc482319e8f6d2f710Behdad Esfahbod unsigned int *feature_index); 148911ca38645bd51764e7859bc482319e8f6d2f710Behdad Esfahbod 149911ca38645bd51764e7859bc482319e8f6d2f710Behdad Esfahbodhb_bool_t 150da132937989acb4d8ca9bd41c79f98750e7dda30Jonathan Kewhb_ot_layout_language_get_required_feature (hb_face_t *face, 151da132937989acb4d8ca9bd41c79f98750e7dda30Jonathan Kew hb_tag_t table_tag, 152da132937989acb4d8ca9bd41c79f98750e7dda30Jonathan Kew unsigned int script_index, 153da132937989acb4d8ca9bd41c79f98750e7dda30Jonathan Kew unsigned int language_index, 154da132937989acb4d8ca9bd41c79f98750e7dda30Jonathan Kew unsigned int *feature_index, 155da132937989acb4d8ca9bd41c79f98750e7dda30Jonathan Kew hb_tag_t *feature_tag); 156c44733596c6648e209c12349e18e35424edf3d59Behdad Esfahbod 157e21899bc3593aa0d3adf64cee21c5de2ea219783Behdad Esfahbodunsigned int 158bff3c0fde5da04a70d1f7aeeb9fa2a75fe5c07f6Behdad Esfahbodhb_ot_layout_language_get_feature_indexes (hb_face_t *face, 159bff3c0fde5da04a70d1f7aeeb9fa2a75fe5c07f6Behdad Esfahbod hb_tag_t table_tag, 160bff3c0fde5da04a70d1f7aeeb9fa2a75fe5c07f6Behdad Esfahbod unsigned int script_index, 161bff3c0fde5da04a70d1f7aeeb9fa2a75fe5c07f6Behdad Esfahbod unsigned int language_index, 162e21899bc3593aa0d3adf64cee21c5de2ea219783Behdad Esfahbod unsigned int start_offset, 163bff3c0fde5da04a70d1f7aeeb9fa2a75fe5c07f6Behdad Esfahbod unsigned int *feature_count /* IN/OUT */, 164bff3c0fde5da04a70d1f7aeeb9fa2a75fe5c07f6Behdad Esfahbod unsigned int *feature_indexes /* OUT */); 1654a26ea408c87f0bb59deca9ff44008d138471aa3Behdad Esfahbod 166e21899bc3593aa0d3adf64cee21c5de2ea219783Behdad Esfahbodunsigned int 167bff3c0fde5da04a70d1f7aeeb9fa2a75fe5c07f6Behdad Esfahbodhb_ot_layout_language_get_feature_tags (hb_face_t *face, 168bff3c0fde5da04a70d1f7aeeb9fa2a75fe5c07f6Behdad Esfahbod hb_tag_t table_tag, 169bff3c0fde5da04a70d1f7aeeb9fa2a75fe5c07f6Behdad Esfahbod unsigned int script_index, 170bff3c0fde5da04a70d1f7aeeb9fa2a75fe5c07f6Behdad Esfahbod unsigned int language_index, 171e21899bc3593aa0d3adf64cee21c5de2ea219783Behdad Esfahbod unsigned int start_offset, 172bff3c0fde5da04a70d1f7aeeb9fa2a75fe5c07f6Behdad Esfahbod unsigned int *feature_count /* IN/OUT */, 173bff3c0fde5da04a70d1f7aeeb9fa2a75fe5c07f6Behdad Esfahbod hb_tag_t *feature_tags /* OUT */); 1744a26ea408c87f0bb59deca9ff44008d138471aa3Behdad Esfahbod 1754a26ea408c87f0bb59deca9ff44008d138471aa3Behdad Esfahbodhb_bool_t 1760ead481a5a8623103565fd7d924666e7342278ddBehdad Esfahbodhb_ot_layout_language_find_feature (hb_face_t *face, 1770ead481a5a8623103565fd7d924666e7342278ddBehdad Esfahbod hb_tag_t table_tag, 1780ead481a5a8623103565fd7d924666e7342278ddBehdad Esfahbod unsigned int script_index, 1790ead481a5a8623103565fd7d924666e7342278ddBehdad Esfahbod unsigned int language_index, 1800ead481a5a8623103565fd7d924666e7342278ddBehdad Esfahbod hb_tag_t feature_tag, 1810ead481a5a8623103565fd7d924666e7342278ddBehdad Esfahbod unsigned int *feature_index); 182c44733596c6648e209c12349e18e35424edf3d59Behdad Esfahbod 183e21899bc3593aa0d3adf64cee21c5de2ea219783Behdad Esfahbodunsigned int 184f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbodhb_ot_layout_feature_get_lookups (hb_face_t *face, 185f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod hb_tag_t table_tag, 186f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod unsigned int feature_index, 187f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod unsigned int start_offset, 188f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod unsigned int *lookup_count /* IN/OUT */, 189f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod unsigned int *lookup_indexes /* OUT */); 190f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod 19127674b4bb351e501373bd9994e4ba6546e465cf7Behdad Esfahbodunsigned int 19227674b4bb351e501373bd9994e4ba6546e465cf7Behdad Esfahbodhb_ot_layout_table_get_lookup_count (hb_face_t *face, 19327674b4bb351e501373bd9994e4ba6546e465cf7Behdad Esfahbod hb_tag_t table_tag); 19427674b4bb351e501373bd9994e4ba6546e465cf7Behdad Esfahbod 19527674b4bb351e501373bd9994e4ba6546e465cf7Behdad Esfahbod 196f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbodvoid 197a88e7160217b9f44e4e5b4b814d0ca98c457ee40Behdad Esfahbodhb_ot_layout_collect_lookups (hb_face_t *face, 198f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod hb_tag_t table_tag, 199f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod const hb_tag_t *scripts, 200f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod const hb_tag_t *languages, 201f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod const hb_tag_t *features, 202f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod hb_set_t *lookup_indexes /* OUT */); 203f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod 204f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbodvoid 205e8cfdd7fa8d0fb66e0a261f3547e5824897e5131Behdad Esfahbodhb_ot_layout_lookup_collect_glyphs (hb_face_t *face, 206f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod hb_tag_t table_tag, 207f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod unsigned int lookup_index, 208f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod hb_set_t *glyphs_before, /* OUT. May be NULL */ 209f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod hb_set_t *glyphs_input, /* OUT. May be NULL */ 210f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod hb_set_t *glyphs_after, /* OUT. May be NULL */ 211f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod hb_set_t *glyphs_output /* OUT. May be NULL */); 212f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod 213f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod#ifdef HB_NOT_IMPLEMENTED 214f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbodtypedef struct 215f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod{ 216f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod const hb_codepoint_t *before, 217f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod unsigned int before_length, 218f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod const hb_codepoint_t *input, 219f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod unsigned int input_length, 220f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod const hb_codepoint_t *after, 221f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod unsigned int after_length, 222f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod} hb_ot_layout_glyph_sequence_t; 223f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod 224f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbodtypedef hb_bool_t 225f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod(*hb_ot_layout_glyph_sequence_func_t) (hb_font_t *font, 226f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod hb_tag_t table_tag, 227f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod unsigned int lookup_index, 228f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod const hb_ot_layout_glyph_sequence_t *sequence, 229f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod void *user_data); 230f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod 231f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbodvoid 232977f1740ace730dcdff8221a17f2a592c2ec7c74Behdad EsfahbodXhb_ot_layout_lookup_enumerate_sequences (hb_face_t *face, 233bff3c0fde5da04a70d1f7aeeb9fa2a75fe5c07f6Behdad Esfahbod hb_tag_t table_tag, 234f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod unsigned int lookup_index, 235f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod hb_ot_layout_glyph_sequence_func_t callback, 236f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod void *user_data); 237f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod#endif 238c44733596c6648e209c12349e18e35424edf3d59Behdad Esfahbod 239706ab25a4cb043d46e6088aa0a7184ee200276c9Behdad Esfahbod 2402d15e72c75931398db5e027e660f1320bb979117Behdad Esfahbod/* 2412d15e72c75931398db5e027e660f1320bb979117Behdad Esfahbod * GSUB 2422d15e72c75931398db5e027e660f1320bb979117Behdad Esfahbod */ 2432d15e72c75931398db5e027e660f1320bb979117Behdad Esfahbod 2442d15e72c75931398db5e027e660f1320bb979117Behdad Esfahbodhb_bool_t 2450ead481a5a8623103565fd7d924666e7342278ddBehdad Esfahbodhb_ot_layout_has_substitution (hb_face_t *face); 246f9cd1014f8f4d0394b5e0e9eefc1e2af13c59cabBehdad Esfahbod 247e72b360ac6381b549249b8836fa3e70b909d3437Behdad Esfahbodhb_bool_t 248362a990b2246f5448ecb9d600761f710aea7d42dBehdad Esfahbodhb_ot_layout_lookup_would_substitute (hb_face_t *face, 249d9b204d3d24cde165167714728bf380267903d6aBehdad Esfahbod unsigned int lookup_index, 250e72b360ac6381b549249b8836fa3e70b909d3437Behdad Esfahbod const hb_codepoint_t *glyphs, 251e72b360ac6381b549249b8836fa3e70b909d3437Behdad Esfahbod unsigned int glyphs_length, 252d9b204d3d24cde165167714728bf380267903d6aBehdad Esfahbod hb_bool_t zero_context); 253e72b360ac6381b549249b8836fa3e70b909d3437Behdad Esfahbod 2545caece67ab9eee322bdcdf6f4b607eadde297e56Behdad Esfahbodvoid 255362a990b2246f5448ecb9d600761f710aea7d42dBehdad Esfahbodhb_ot_layout_lookup_substitute_closure (hb_face_t *face, 256d9b204d3d24cde165167714728bf380267903d6aBehdad Esfahbod unsigned int lookup_index, 257f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod hb_set_t *glyphs 258f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod /*TODO , hb_bool_t inclusive */); 259f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod 260f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod#ifdef HB_NOT_IMPLEMENTED 261f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod/* Note: You better have GDEF when using this API, or marks won't do much. */ 262f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbodhb_bool_t 263977f1740ace730dcdff8221a17f2a592c2ec7c74Behdad EsfahbodXhb_ot_layout_lookup_substitute (hb_font_t *font, 264f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod unsigned int lookup_index, 265f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod const hb_ot_layout_glyph_sequence_t *sequence, 266f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod unsigned int out_size, 267f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod hb_codepoint_t *glyphs_out, /* OUT */ 268f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod unsigned int *clusters_out, /* OUT */ 269f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod unsigned int *out_length /* OUT */); 270f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod#endif 271f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod 2723e32cd9570fd8b09901fb790b80365ae425f681aBehdad Esfahbod 273f9cd1014f8f4d0394b5e0e9eefc1e2af13c59cabBehdad Esfahbod/* 274f9cd1014f8f4d0394b5e0e9eefc1e2af13c59cabBehdad Esfahbod * GPOS 275f9cd1014f8f4d0394b5e0e9eefc1e2af13c59cabBehdad Esfahbod */ 276f9cd1014f8f4d0394b5e0e9eefc1e2af13c59cabBehdad Esfahbod 277f9cd1014f8f4d0394b5e0e9eefc1e2af13c59cabBehdad Esfahbodhb_bool_t 2780ead481a5a8623103565fd7d924666e7342278ddBehdad Esfahbodhb_ot_layout_has_positioning (hb_face_t *face); 279f9cd1014f8f4d0394b5e0e9eefc1e2af13c59cabBehdad Esfahbod 280f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod#ifdef HB_NOT_IMPLEMENTED 281f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod/* Note: You better have GDEF when using this API, or marks won't do much. */ 282f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbodhb_bool_t 283977f1740ace730dcdff8221a17f2a592c2ec7c74Behdad EsfahbodXhb_ot_layout_lookup_position (hb_font_t *font, 284f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod unsigned int lookup_index, 285f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod const hb_ot_layout_glyph_sequence_t *sequence, 286f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod hb_glyph_position_t *positions /* IN / OUT */); 287f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod#endif 288f30641038ba96e83950729b1bd9d86d2e98e46c5Behdad Esfahbod 289e9ad71dee845407da74ccacfbb53ad7ededf07fdBehdad Esfahbod/* Optical 'size' feature info. Returns true if found. 2904ab99fb8c363cfc6a4f5952e69a19757f0cab344Behdad Esfahbod * http://www.microsoft.com/typography/otspec/features_pt.htm#size */ 291f54cce3c6a0432268ce159dbe6c5c6b7f583b87aBehdad Esfahbodhb_bool_t 292875a5cbc9c37f4264241c43b80afad2628eab749Behdad Esfahbodhb_ot_layout_get_size_params (hb_face_t *face, 293875a5cbc9c37f4264241c43b80afad2628eab749Behdad Esfahbod unsigned int *design_size, /* OUT. May be NULL */ 294875a5cbc9c37f4264241c43b80afad2628eab749Behdad Esfahbod unsigned int *subfamily_id, /* OUT. May be NULL */ 295875a5cbc9c37f4264241c43b80afad2628eab749Behdad Esfahbod unsigned int *subfamily_name_id, /* OUT. May be NULL */ 296875a5cbc9c37f4264241c43b80afad2628eab749Behdad Esfahbod unsigned int *range_start, /* OUT. May be NULL */ 297875a5cbc9c37f4264241c43b80afad2628eab749Behdad Esfahbod unsigned int *range_end /* OUT. May be NULL */); 298f54cce3c6a0432268ce159dbe6c5c6b7f583b87aBehdad Esfahbod 299706ab25a4cb043d46e6088aa0a7184ee200276c9Behdad Esfahbod 300f96ffd43bce0ac6d9c897933c9be0e51d543e570Behdad EsfahbodHB_END_DECLS 30112c4568c680ea2b9b98a16a8b7402ca185c90ef6Behdad Esfahbod 302fd92a3dde32fd10df30c9eeb97641bc3c15b1e9bBehdad Esfahbod#endif /* HB_OT_LAYOUT_H */ 303