Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-21 10:04:02

0001 /*
0002  * Copyright © 2012  Google, Inc.
0003  *
0004  *  This is part of HarfBuzz, a text shaping library.
0005  *
0006  * Permission is hereby granted, without written agreement and without
0007  * license or royalty fees, to use, copy, modify, and distribute this
0008  * software and its documentation for any purpose, provided that the
0009  * above copyright notice and the following two paragraphs appear in
0010  * all copies of this software.
0011  *
0012  * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
0013  * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
0014  * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
0015  * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
0016  * DAMAGE.
0017  *
0018  * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
0019  * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
0020  * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
0021  * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
0022  * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
0023  *
0024  * Google Author(s): Behdad Esfahbod
0025  */
0026 
0027 #if !defined(HB_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR)
0028 #error "Include <hb.h> instead."
0029 #endif
0030 
0031 #ifndef HB_SHAPE_PLAN_H
0032 #define HB_SHAPE_PLAN_H
0033 
0034 #include "hb-common.h"
0035 #include "hb-font.h"
0036 
0037 HB_BEGIN_DECLS
0038 
0039 /**
0040  * hb_shape_plan_t:
0041  *
0042  * Data type for holding a shaping plan. 
0043  *
0044  * Shape plans contain information about how HarfBuzz will shape a
0045  * particular text segment, based on the segment's properties and the
0046  * capabilities in the font face in use.
0047  *
0048  * Shape plans can be queried about how shaping will perform, given a set
0049  * of specific input parameters (script, language, direction, features,
0050  * etc.).
0051  *
0052  **/
0053 typedef struct hb_shape_plan_t hb_shape_plan_t;
0054 
0055 HB_EXTERN hb_shape_plan_t *
0056 hb_shape_plan_create (hb_face_t                     *face,
0057               const hb_segment_properties_t *props,
0058               const hb_feature_t            *user_features,
0059               unsigned int                   num_user_features,
0060               const char * const            *shaper_list);
0061 
0062 HB_EXTERN hb_shape_plan_t *
0063 hb_shape_plan_create_cached (hb_face_t                     *face,
0064                  const hb_segment_properties_t *props,
0065                  const hb_feature_t            *user_features,
0066                  unsigned int                   num_user_features,
0067                  const char * const            *shaper_list);
0068 
0069 HB_EXTERN hb_shape_plan_t *
0070 hb_shape_plan_create2 (hb_face_t                     *face,
0071                const hb_segment_properties_t *props,
0072                const hb_feature_t            *user_features,
0073                unsigned int                   num_user_features,
0074                const int                     *coords,
0075                unsigned int                   num_coords,
0076                const char * const            *shaper_list);
0077 
0078 HB_EXTERN hb_shape_plan_t *
0079 hb_shape_plan_create_cached2 (hb_face_t                     *face,
0080                   const hb_segment_properties_t *props,
0081                   const hb_feature_t            *user_features,
0082                   unsigned int                   num_user_features,
0083                   const int                     *coords,
0084                   unsigned int                   num_coords,
0085                   const char * const            *shaper_list);
0086 
0087 
0088 HB_EXTERN hb_shape_plan_t *
0089 hb_shape_plan_get_empty (void);
0090 
0091 HB_EXTERN hb_shape_plan_t *
0092 hb_shape_plan_reference (hb_shape_plan_t *shape_plan);
0093 
0094 HB_EXTERN void
0095 hb_shape_plan_destroy (hb_shape_plan_t *shape_plan);
0096 
0097 HB_EXTERN hb_bool_t
0098 hb_shape_plan_set_user_data (hb_shape_plan_t    *shape_plan,
0099                  hb_user_data_key_t *key,
0100                  void *              data,
0101                  hb_destroy_func_t   destroy,
0102                  hb_bool_t           replace);
0103 
0104 HB_EXTERN void *
0105 hb_shape_plan_get_user_data (const hb_shape_plan_t *shape_plan,
0106                  hb_user_data_key_t    *key);
0107 
0108 
0109 HB_EXTERN hb_bool_t
0110 hb_shape_plan_execute (hb_shape_plan_t    *shape_plan,
0111                hb_font_t          *font,
0112                hb_buffer_t        *buffer,
0113                const hb_feature_t *features,
0114                unsigned int        num_features);
0115 
0116 HB_EXTERN const char *
0117 hb_shape_plan_get_shaper (hb_shape_plan_t *shape_plan);
0118 
0119 
0120 HB_END_DECLS
0121 
0122 #endif /* HB_SHAPE_PLAN_H */