Not tested yet.
* Google Author(s): Behdad Esfahbod
*/
-#include "hb-ot-shape-private.hh"
+#include "hb-ot-shape-complex-private.hh"
HB_BEGIN_DECLS
}
void
-_hb_ot_analyze_complex_arabic (hb_ot_shape_context_t *c)
+_hb_ot_shape_complex_setup_masks_arabic (hb_ot_shape_context_t *c)
{
unsigned int count = c->buffer->len;
unsigned int prev = 0, state = 0;
hb_mask_t mask_array[TOTAL_NUM_FEATURES] = {0};
unsigned int num_masks = c->buffer->props.script == HB_SCRIPT_SYRIAC ? SYRIAC_NUM_FEATURES : COMMON_NUM_FEATURES;
for (unsigned int i = 0; i < num_masks; i++)
- mask_array[i] = 0 /* XXX find_mask */;
+ mask_array[i] = c->plan->map.get_mask (arabic_syriac_features[i]);
for (unsigned int i = 0; i < count; i++)
c->buffer->info[i].mask |= mask_array[c->buffer->info[i].gproperty];
#include "hb-private.h"
-#include "hb-ot-map-private.hh"
+#include "hb-ot-shape-private.hh"
HB_BEGIN_DECLS
-enum hb_ot_complex_shaper_t {
- hb_ot_complex_shaper_none,
- hb_ot_complex_shaper_arabic
-};
-
-
-struct hb_ot_shape_plan_t
-{
- hb_ot_map_t map;
- hb_ot_complex_shaper_t shaper;
-};
-
-
static inline hb_ot_complex_shaper_t
hb_ot_shape_complex_categorize (const hb_segment_properties_t *props)
{
/*
* collect_features()
*
- * Called during planning. Shapers should call plan->map.add_feature().
+ * Called during shape_plan().
+ *
+ * Shapers should use plan->map to add their features.
*/
HB_INTERNAL void _hb_ot_shape_complex_collect_features_arabic (hb_ot_shape_plan_t *plan, const hb_segment_properties_t *props);
}
+/* setup_masks()
+ *
+ * Called during shape_execute().
+ *
+ * Shapers should use c->plan.map to get feature masks and set on buffer.
+ */
+
+HB_INTERNAL void _hb_ot_shape_complex_setup_masks_arabic (hb_ot_shape_context_t *c);
+
+static inline void
+hb_ot_shape_complex_setup_masks (hb_ot_shape_context_t *c)
+{
+ switch (c->plan->shaper) {
+ case hb_ot_complex_shaper_arabic: _hb_ot_shape_complex_setup_masks_arabic (c); return;
+ case hb_ot_complex_shaper_none: default: return;
+ }
+}
+
HB_END_DECLS
#include "hb-ot-shape.h"
-#include "hb-ot-shape-complex-private.hh"
#include "hb-ot-map-private.hh"
HB_BEGIN_DECLS
+enum hb_ot_complex_shaper_t {
+ hb_ot_complex_shaper_none,
+ hb_ot_complex_shaper_arabic
+};
+
+
+struct hb_ot_shape_plan_t
+{
+ hb_ot_map_t map;
+ hb_ot_complex_shaper_t shaper;
+};
+
+
struct hb_ot_shape_context_t
{
/* Input to hb_ot_shape_execute() */
*/
#include "hb-ot-shape-private.hh"
+#include "hb-ot-shape-complex-private.hh"
HB_BEGIN_DECLS
}
}
- /* complex */
+ hb_ot_shape_complex_setup_masks (c);
}