1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/gfx/harfbuzz/src/hb-shape.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,81 @@ 1.4 +/* 1.5 + * Copyright © 2009 Red Hat, Inc. 1.6 + * Copyright © 2012 Google, Inc. 1.7 + * 1.8 + * This is part of HarfBuzz, a text shaping library. 1.9 + * 1.10 + * Permission is hereby granted, without written agreement and without 1.11 + * license or royalty fees, to use, copy, modify, and distribute this 1.12 + * software and its documentation for any purpose, provided that the 1.13 + * above copyright notice and the following two paragraphs appear in 1.14 + * all copies of this software. 1.15 + * 1.16 + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR 1.17 + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES 1.18 + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN 1.19 + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 1.20 + * DAMAGE. 1.21 + * 1.22 + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, 1.23 + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 1.24 + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS 1.25 + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO 1.26 + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 1.27 + * 1.28 + * Red Hat Author(s): Behdad Esfahbod 1.29 + * Google Author(s): Behdad Esfahbod 1.30 + */ 1.31 + 1.32 +#ifndef HB_H_IN 1.33 +#error "Include <hb.h> instead." 1.34 +#endif 1.35 + 1.36 +#ifndef HB_SHAPE_H 1.37 +#define HB_SHAPE_H 1.38 + 1.39 +#include "hb-common.h" 1.40 +#include "hb-buffer.h" 1.41 +#include "hb-font.h" 1.42 + 1.43 +HB_BEGIN_DECLS 1.44 + 1.45 + 1.46 +typedef struct hb_feature_t { 1.47 + hb_tag_t tag; 1.48 + uint32_t value; 1.49 + unsigned int start; 1.50 + unsigned int end; 1.51 +} hb_feature_t; 1.52 + 1.53 +/* len=-1 means str is NUL-terminated */ 1.54 +hb_bool_t 1.55 +hb_feature_from_string (const char *str, int len, 1.56 + hb_feature_t *feature); 1.57 + 1.58 +/* Something like 128 bytes is more than enough. 1.59 + * nul-terminates. */ 1.60 +void 1.61 +hb_feature_to_string (hb_feature_t *feature, 1.62 + char *buf, unsigned int size); 1.63 + 1.64 + 1.65 +void 1.66 +hb_shape (hb_font_t *font, 1.67 + hb_buffer_t *buffer, 1.68 + const hb_feature_t *features, 1.69 + unsigned int num_features); 1.70 + 1.71 +hb_bool_t 1.72 +hb_shape_full (hb_font_t *font, 1.73 + hb_buffer_t *buffer, 1.74 + const hb_feature_t *features, 1.75 + unsigned int num_features, 1.76 + const char * const *shaper_list); 1.77 + 1.78 +const char ** 1.79 +hb_shape_list_shapers (void); 1.80 + 1.81 + 1.82 +HB_END_DECLS 1.83 + 1.84 +#endif /* HB_SHAPE_H */