[HarfBuzz] harfbuzz-ng: Branch 'master' - 2 commits
Behdad Esfahbod
behdad at kemper.freedesktop.org
Fri Jun 8 08:03:29 PDT 2012
src/hb-fallback-shape.cc | 16 ++++++++++++----
src/hb-ot-layout-gpos-table.hh | 6 +++---
src/hb-ot-layout-gsubgpos-private.hh | 2 +-
3 files changed, 16 insertions(+), 8 deletions(-)
New commits:
commit 6da9dbff21b47fb10794b8d6cb747393c9eab7dd
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Fri Jun 8 10:53:35 2012 -0400
Remove zero-width chars in the fallback shaper too
diff --git a/src/hb-fallback-shape.cc b/src/hb-fallback-shape.cc
index 5939887..b9480e6 100644
--- a/src/hb-fallback-shape.cc
+++ b/src/hb-fallback-shape.cc
@@ -34,16 +34,24 @@ _hb_fallback_shape (hb_font_t *font,
const hb_feature_t *features HB_UNUSED,
unsigned int num_features HB_UNUSED)
{
+ /* TODO Save the space character in the font? */
+ hb_codepoint_t space;
+ hb_font_get_glyph (font, ' ', 0, &space);
+
buffer->guess_properties ();
+ buffer->clear_positions ();
unsigned int count = buffer->len;
for (unsigned int i = 0; i < count; i++)
+ {
+ if (_hb_unicode_is_zero_width (buffer->info[i].codepoint)) {
+ buffer->info[i].codepoint = space;
+ buffer->pos[i].x_advance = 0;
+ buffer->pos[i].y_advance = 0;
+ continue;
+ }
hb_font_get_glyph (font, buffer->info[i].codepoint, 0, &buffer->info[i].codepoint);
-
- buffer->clear_positions ();
-
- for (unsigned int i = 0; i < count; i++) {
hb_font_get_glyph_advance_for_direction (font, buffer->info[i].codepoint,
buffer->props.direction,
&buffer->pos[i].x_advance,
commit 68b76121f83fc9b87dc84f03e8bef38d4332734d
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Fri Jun 8 10:43:49 2012 -0400
Fix regressions introduced by sed. Ouch!
Introduced in 99c2695759a6af855d565f4994bbdf220570bb48.
Broken mark-mark and mark-ligature stuff.
diff --git a/src/hb-ot-layout-gpos-table.hh b/src/hb-ot-layout-gpos-table.hh
index 71c13a2..49986ea 100644
--- a/src/hb-ot-layout-gpos-table.hh
+++ b/src/hb-ot-layout-gpos-table.hh
@@ -1068,7 +1068,7 @@ struct MarkLigPosFormat1
* can directly use the component index. If not, we attach the mark
* glyph to the last component of the ligature. */
if (get_lig_id (c->buffer->info[j]) &&
- get_lig_id (c->buffer->cur()) &&
+ get_lig_id (c->buffer->info[j]) == get_lig_id (c->buffer->cur()) &&
get_lig_comp (c->buffer->cur()) > 0)
{
comp_index = get_lig_comp (c->buffer->cur()) - 1;
@@ -1166,9 +1166,9 @@ struct MarkMarkPosFormat1
/* Two marks match only if they belong to the same base, or same component
* of the same ligature. That is, the component numbers must match, and
* if those are non-zero, the ligid number should also match. */
- if ((get_lig_comp (c->buffer->cur())) ||
+ if ((get_lig_comp (c->buffer->info[j]) != get_lig_comp (c->buffer->cur())) ||
(get_lig_comp (c->buffer->info[j]) > 0 &&
- get_lig_id (c->buffer->cur())))
+ get_lig_id (c->buffer->info[j]) != get_lig_id (c->buffer->cur())))
return TRACE_RETURN (false);
unsigned int mark2_index = (this+mark2Coverage) (c->buffer->info[j].codepoint);
diff --git a/src/hb-ot-layout-gsubgpos-private.hh b/src/hb-ot-layout-gsubgpos-private.hh
index e590e39..2554f42 100644
--- a/src/hb-ot-layout-gsubgpos-private.hh
+++ b/src/hb-ot-layout-gsubgpos-private.hh
@@ -95,7 +95,7 @@ struct hb_closure_context_t
#endif
#define TRACE_APPLY() \
- hb_auto_trace_t<HB_DEBUG_APPLY> trace (&c->debug_depth, "APPLY", this, HB_FUNC, "idx %d codepoint %u", c->buffer->cur().codepoint);
+ hb_auto_trace_t<HB_DEBUG_APPLY> trace (&c->debug_depth, "APPLY", this, HB_FUNC, "idx %d codepoint %u", c->buffer->idx, c->buffer->cur().codepoint);
More information about the HarfBuzz
mailing list