gfx/harfbuzz/src/hb-shape.h

Fri, 16 Jan 2015 18:13:44 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 16 Jan 2015 18:13:44 +0100
branch
TOR_BUG_9701
changeset 14
925c144e1f1f
permissions
-rw-r--r--

Integrate suggestion from review to improve consistency with existing code.

michael@0 1 /*
michael@0 2 * Copyright © 2009 Red Hat, Inc.
michael@0 3 * Copyright © 2012 Google, Inc.
michael@0 4 *
michael@0 5 * This is part of HarfBuzz, a text shaping library.
michael@0 6 *
michael@0 7 * Permission is hereby granted, without written agreement and without
michael@0 8 * license or royalty fees, to use, copy, modify, and distribute this
michael@0 9 * software and its documentation for any purpose, provided that the
michael@0 10 * above copyright notice and the following two paragraphs appear in
michael@0 11 * all copies of this software.
michael@0 12 *
michael@0 13 * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
michael@0 14 * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
michael@0 15 * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
michael@0 16 * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
michael@0 17 * DAMAGE.
michael@0 18 *
michael@0 19 * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
michael@0 20 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
michael@0 21 * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
michael@0 22 * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
michael@0 23 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
michael@0 24 *
michael@0 25 * Red Hat Author(s): Behdad Esfahbod
michael@0 26 * Google Author(s): Behdad Esfahbod
michael@0 27 */
michael@0 28
michael@0 29 #ifndef HB_H_IN
michael@0 30 #error "Include <hb.h> instead."
michael@0 31 #endif
michael@0 32
michael@0 33 #ifndef HB_SHAPE_H
michael@0 34 #define HB_SHAPE_H
michael@0 35
michael@0 36 #include "hb-common.h"
michael@0 37 #include "hb-buffer.h"
michael@0 38 #include "hb-font.h"
michael@0 39
michael@0 40 HB_BEGIN_DECLS
michael@0 41
michael@0 42
michael@0 43 typedef struct hb_feature_t {
michael@0 44 hb_tag_t tag;
michael@0 45 uint32_t value;
michael@0 46 unsigned int start;
michael@0 47 unsigned int end;
michael@0 48 } hb_feature_t;
michael@0 49
michael@0 50 /* len=-1 means str is NUL-terminated */
michael@0 51 hb_bool_t
michael@0 52 hb_feature_from_string (const char *str, int len,
michael@0 53 hb_feature_t *feature);
michael@0 54
michael@0 55 /* Something like 128 bytes is more than enough.
michael@0 56 * nul-terminates. */
michael@0 57 void
michael@0 58 hb_feature_to_string (hb_feature_t *feature,
michael@0 59 char *buf, unsigned int size);
michael@0 60
michael@0 61
michael@0 62 void
michael@0 63 hb_shape (hb_font_t *font,
michael@0 64 hb_buffer_t *buffer,
michael@0 65 const hb_feature_t *features,
michael@0 66 unsigned int num_features);
michael@0 67
michael@0 68 hb_bool_t
michael@0 69 hb_shape_full (hb_font_t *font,
michael@0 70 hb_buffer_t *buffer,
michael@0 71 const hb_feature_t *features,
michael@0 72 unsigned int num_features,
michael@0 73 const char * const *shaper_list);
michael@0 74
michael@0 75 const char **
michael@0 76 hb_shape_list_shapers (void);
michael@0 77
michael@0 78
michael@0 79 HB_END_DECLS
michael@0 80
michael@0 81 #endif /* HB_SHAPE_H */

mercurial