/* * Copyright © 2011 Martin Hosken * Copyright © 2011 SIL International * Copyright © 2011,2012 Google, Inc. * * This is part of HarfBuzz, a text shaping library. * * Permission is hereby granted, without written agreement and without * license or royalty fees, to use, copy, modify, and distribute this * software and its documentation for any purpose, provided that the * above copyright notice and the following two paragraphs appear in * all copies of this software. * * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH * DAMAGE. * * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. * * Google Author(s): Behdad Esfahbod */ #include "hb.hh" #ifdef HAVE_GRAPHITE2 #include "hb-shaper-impl.hh" #include "hb-graphite2.h" #include <graphite2/Segment.h> #include "hb-ot-layout.h" /** * SECTION:hb-graphite2 * @title: hb-graphite2 * @short_description: Graphite2 integration * @include: hb-graphite2.h * * Functions for using HarfBuzz with fonts that include Graphite features. * * For Graphite features to work, you must be sure that HarfBuzz was compiled * with the `graphite2` shaping engine enabled. Currently, the default is to * not enable `graphite2` shaping. **/ /* * shaper face data */ hb_graphite2_tablelist_t; struct hb_graphite2_face_data_t { … }; static const void *hb_graphite2_get_table (const void *data, unsigned int tag, size_t *len) { … } hb_graphite2_face_data_t * _hb_graphite2_shaper_face_data_create (hb_face_t *face) { … } void _hb_graphite2_shaper_face_data_destroy (hb_graphite2_face_data_t *data) { … } /** * hb_graphite2_face_get_gr_face: (skip) * @face: @hb_face_t to query * * Fetches the Graphite2 gr_face corresponding to the specified * #hb_face_t face object. * * Return value: the gr_face found * * Since: 0.9.10 */ gr_face * hb_graphite2_face_get_gr_face (hb_face_t *face) { … } /* * shaper font data */ struct hb_graphite2_font_data_t { … }; hb_graphite2_font_data_t * _hb_graphite2_shaper_font_data_create (hb_font_t *font HB_UNUSED) { … } void _hb_graphite2_shaper_font_data_destroy (hb_graphite2_font_data_t *data HB_UNUSED) { … } #ifndef HB_DISABLE_DEPRECATED /** * hb_graphite2_font_get_gr_font: (skip) * @font: An #hb_font_t * * Always returns `NULL`. Use hb_graphite2_face_get_gr_face() instead. * * Return value: (nullable): Graphite2 font associated with @font. * * Since: 0.9.10 * Deprecated: 1.4.2 */ gr_font * hb_graphite2_font_get_gr_font (hb_font_t *font HB_UNUSED) { … } #endif /* * shaper */ struct hb_graphite2_cluster_t { … }; hb_bool_t _hb_graphite2_shape (hb_shape_plan_t *shape_plan HB_UNUSED, hb_font_t *font, hb_buffer_t *buffer, const hb_feature_t *features, unsigned int num_features) { … } #endif