[HarfBuzz] harfbuzz: Branch 'master'
Behdad Esfahbod
behdad at kemper.freedesktop.org
Fri Sep 13 17:17:54 PDT 2013
src/hb-ot-shape.cc | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
New commits:
commit 4b011094d5e90cf93df2891e47aeab1bffad5bbf
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Fri Sep 13 20:17:42 2013 -0400
Move code around
I believe I didn't break anything...
diff --git a/src/hb-ot-shape.cc b/src/hb-ot-shape.cc
index c23240c..15f4461 100644
--- a/src/hb-ot-shape.cc
+++ b/src/hb-ot-shape.cc
@@ -418,8 +418,6 @@ zero_mark_widths_by_gdef (hb_buffer_t *buffer)
static inline void
hb_ot_position_default (hb_ot_shape_context_t *c)
{
- hb_ot_layout_position_start (c->font, c->buffer);
-
unsigned int count = c->buffer->len;
for (unsigned int i = 0; i < count; i++)
{
@@ -433,6 +431,13 @@ hb_ot_position_default (hb_ot_shape_context_t *c)
&c->buffer->pos[i].y_offset);
}
+}
+
+static inline bool
+hb_ot_position_complex (hb_ot_shape_context_t *c)
+{
+ bool ret = false;
+ unsigned int count = c->buffer->len;
switch (c->plan->shaper->zero_width_marks)
{
@@ -452,13 +457,6 @@ hb_ot_position_default (hb_ot_shape_context_t *c)
case HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_GDEF_LATE:
break;
}
-}
-
-static inline bool
-hb_ot_position_complex (hb_ot_shape_context_t *c)
-{
- bool ret = false;
- unsigned int count = c->buffer->len;
if (hb_ot_layout_has_positioning (c->face))
{
@@ -500,18 +498,20 @@ hb_ot_position_complex (hb_ot_shape_context_t *c)
break;
}
- hb_ot_layout_position_finish (c->font, c->buffer);
-
return ret;
}
static inline void
hb_ot_position (hb_ot_shape_context_t *c)
{
+ hb_ot_layout_position_start (c->font, c->buffer);
+
hb_ot_position_default (c);
hb_bool_t fallback = !hb_ot_position_complex (c);
+ hb_ot_layout_position_finish (c->font, c->buffer);
+
if (fallback && c->plan->shaper->fallback_position)
_hb_ot_shape_fallback_position (c->plan, c->font, c->buffer);
More information about the HarfBuzz
mailing list