From 2eb474afb4a09f4da8f14b444bd6066769010224 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sun, 7 Aug 2011 00:59:38 -0400 Subject: [PATCH] [uniscribe] Fix shaper It's kinda working finally! --- src/hb-uniscribe-shape.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/hb-uniscribe-shape.cc b/src/hb-uniscribe-shape.cc index d6d3d79..8527ec8 100644 --- a/src/hb-uniscribe-shape.cc +++ b/src/hb-uniscribe-shape.cc @@ -176,7 +176,7 @@ retry: script_tags, &item_count); if (unlikely (FAILED (hr))) - FAIL ("ScriptItemizeOpenType() failed: %d", hr); + FAIL ("ScriptItemizeOpenType() failed: 0x%08xL", hr); #undef MAX_ITEMS @@ -248,8 +248,10 @@ retry: FAIL ("Buffer resize failed"); goto retry; } + if (unlikely (hr == USP_E_SCRIPT_NOT_IN_FONT)) + FAIL ("ScriptShapeOpenType() failed: Font doesn't support script"); if (unlikely (FAILED (hr))) - FAIL ("ScriptShapeOpenType() failed: %d", hr); + FAIL ("ScriptShapeOpenType() failed: 0x%08xL", hr); hr = ScriptPlaceOpenType (hdc, &script_cache, @@ -271,7 +273,7 @@ retry: offsets + glyphs_offset, NULL); if (unlikely (FAILED (hr))) - FAIL ("ScriptPlaceOpenType() failed: %d", hr); + FAIL ("ScriptPlaceOpenType() failed: 0x%08xL", hr); glyphs_offset += glyphs_len; } @@ -312,6 +314,7 @@ retry: info->var1.u32 = offsets[i].du; info->var2.u32 = offsets[i].dv; } + buffer->len = glyphs_len; /* Set glyph positions */ buffer->clear_positions (); -- 2.7.4