summaryrefslogtreecommitdiff
path: root/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape.hh
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape.hh')
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape.hh56
1 files changed, 37 insertions, 19 deletions
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape.hh
index 1cb9e24d7f6..397634c25cc 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-shape.hh
@@ -31,9 +31,32 @@
#include "hb-ot-map.hh"
#include "hb-aat-map.hh"
-#include "hb-shape-plan.hh"
+struct hb_ot_shape_plan_key_t
+{
+ unsigned int variations_index[2];
+
+ inline void init (hb_face_t *face,
+ const int *coords,
+ unsigned int num_coords)
+ {
+ for (unsigned int table_index = 0; table_index < 2; table_index++)
+ hb_ot_layout_table_find_feature_variations (face,
+ table_tags[table_index],
+ coords,
+ num_coords,
+ &variations_index[table_index]);
+ }
+
+ inline bool equal (const hb_ot_shape_plan_key_t *other)
+ {
+ return 0 == memcmp (this, other, sizeof (*this));
+ }
+};
+
+
+struct hb_shape_plan_key_t;
struct hb_ot_shape_plan_t
{
@@ -51,8 +74,8 @@ struct hb_ot_shape_plan_t
bool requested_tracking : 1;
bool has_frac : 1;
bool has_gpos_mark : 1;
+ bool zero_marks : 1;
bool fallback_glyph_classes : 1;
- bool fallback_kerning : 1;
bool fallback_mark_positioning : 1;
bool apply_gpos : 1;
@@ -61,7 +84,6 @@ struct hb_ot_shape_plan_t
bool apply_morx : 1;
bool apply_trak : 1;
-
inline void collect_lookups (hb_tag_t table_tag, hb_set_t *lookups) const
{
unsigned int table_index;
@@ -72,21 +94,17 @@ struct hb_ot_shape_plan_t
}
map.collect_lookups (table_index, lookups);
}
- inline void substitute (hb_font_t *font, hb_buffer_t *buffer) const { map.substitute (this, font, buffer); }
- inline void position (hb_font_t *font, hb_buffer_t *buffer) const { map.position (this, font, buffer); }
- void init (void)
- {
- memset (this, 0, sizeof (*this));
- map.init ();
- aat_map.init ();
- }
- void fini (void) {
- map.fini ();
- aat_map.fini ();
- }
+ HB_INTERNAL bool init0 (hb_face_t *face,
+ const hb_shape_plan_key_t *key);
+ HB_INTERNAL void fini (void);
+
+ HB_INTERNAL void substitute (hb_font_t *font, hb_buffer_t *buffer) const;
+ HB_INTERNAL void position (hb_font_t *font, hb_buffer_t *buffer) const;
};
+struct hb_shape_plan_t;
+
struct hb_ot_shape_planner_t
{
/* In the order that they are filled in. */
@@ -97,11 +115,11 @@ struct hb_ot_shape_planner_t
bool apply_morx : 1;
const struct hb_ot_complex_shaper_t *shaper;
- HB_INTERNAL hb_ot_shape_planner_t (const hb_shape_plan_t *master_plan);
+ HB_INTERNAL hb_ot_shape_planner_t (hb_face_t *face,
+ const hb_segment_properties_t *props);
- HB_INTERNAL void compile (hb_ot_shape_plan_t &plan,
- const int *coords,
- unsigned int num_coords);
+ HB_INTERNAL void compile (hb_ot_shape_plan_t &plan,
+ const hb_ot_shape_plan_key_t &key);
};