[config] Flesh out HB_NO_SHAPER a bit more

This commit is contained in:
Behdad Esfahbod 2022-12-04 15:20:51 -07:00
parent 2c0abf0258
commit 1a5c749581
4 changed files with 14 additions and 0 deletions

View File

@ -288,6 +288,7 @@ hb_face_destroy (hb_face_t *face)
{
if (!hb_object_destroy (face)) return;
#ifndef HB_NO_SHAPER
for (hb_face_t::plan_node_t *node = face->shape_plans; node; )
{
hb_face_t::plan_node_t *next = node->next;
@ -295,6 +296,7 @@ hb_face_destroy (hb_face_t *face)
hb_free (node);
node = next;
}
#endif
face->data.fini ();
face->table.fini ();

View File

@ -65,7 +65,9 @@ struct hb_face_t
hb_shape_plan_t *shape_plan;
plan_node_t *next;
};
#ifndef HB_NO_SHAPER
hb_atomic_ptr_t<plan_node_t> shape_plans;
#endif
hb_blob_t *reference_table (hb_tag_t tag) const
{

View File

@ -31,6 +31,8 @@
#include "hb-buffer.hh"
#ifndef HB_NO_SHAPER
/**
* SECTION:hb-shape-plan
* @title: hb-shape-plan
@ -574,3 +576,6 @@ retry:
return hb_shape_plan_reference (shape_plan);
}
#endif

View File

@ -35,6 +35,8 @@
#include "hb-machinery.hh"
#ifndef HB_NO_SHAPER
/**
* SECTION:hb-shape
* @title: hb-shape
@ -192,3 +194,6 @@ hb_shape (hb_font_t *font,
{
hb_shape_full (font, buffer, features, num_features, nullptr);
}
#endif