1 // C99 port from c++ is protected by a GNU Lesser GPLv3
2 // Copyright © 2013 Sylvain BERTRAND <sylvain.bertrand@gmail.com>
3 // <sylware@legeek.net>
8 #include "hb-private.h"
9 #include "hb-atomic-private.h"
10 #include "hb-buffer-private.h"
11 #include "hb-shaper-private.h"
12 #include "hb-shape-plan-private.h"
13 #include "hb-font-private.h"
16 hb_shape_full(hb_font_t
*font
,
18 const hb_feature_t
*features
,
19 unsigned num_features
,
20 const char * const *shaper_list
)
25 assert(buffer
->content_type
== HB_BUFFER_CONTENT_TYPE_UNICODE
);
27 hb_shape_plan_t
*shape_plan
= hb_shape_plan_create_cached(font
->face
,
28 &buffer
->props
, features
, num_features
, shaper_list
);
30 hb_bool_t res
= hb_shape_plan_execute(shape_plan
, font
, buffer
, features
,
32 hb_shape_plan_destroy(shape_plan
);
35 buffer
->content_type
= HB_BUFFER_CONTENT_TYPE_GLYPHS
;
40 hb_shape(hb_font_t
*font
,
42 const hb_feature_t
*features
,
43 unsigned num_features
)
45 hb_shape_full(font
, buffer
, features
, num_features
, NULL
);