[HarfBuzz] harfbuzz-ng: Branch 'master' - 2 commits

Behdad Esfahbod behdad at kemper.freedesktop.org
Fri Jun 8 06:26:45 PDT 2012


 src/hb-uniscribe.cc |   17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

New commits:
commit 29eac8f591fdb86f1c4fdc0a6ab63910ff286b84
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Fri Jun 8 09:26:17 2012 -0400

    Override direction in Uniscribe backend
    
    Matches OT backend now.

diff --git a/src/hb-uniscribe.cc b/src/hb-uniscribe.cc
index 18648a8..2edc178 100644
--- a/src/hb-uniscribe.cc
+++ b/src/hb-uniscribe.cc
@@ -309,7 +309,7 @@ retry:
   *(uint32_t*)&bidi_control |= 1<<24;
 
   bidi_state.uBidiLevel = HB_DIRECTION_IS_FORWARD (buffer->props.direction) ? 0 : 1;
-//  bidi_state.fOverrideDirection = 1;
+  bidi_state.fOverrideDirection = 1;
 
   hr = ScriptItemizeOpenType (wchars,
 			      chars_len,
commit 1c1233e57686d77d89fe3ac1dc53de9ee60798c1
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Fri Jun 8 09:20:53 2012 -0400

    Make Uniscribe backend respect selected script

diff --git a/src/hb-uniscribe.cc b/src/hb-uniscribe.cc
index 9f84a3c..18648a8 100644
--- a/src/hb-uniscribe.cc
+++ b/src/hb-uniscribe.cc
@@ -1,5 +1,5 @@
 /*
- * Copyright © 2011  Google, Inc.
+ * Copyright © 2011,2012  Google, Inc.
  *
  *  This is part of HarfBuzz, a text shaping library.
  *
@@ -332,6 +332,10 @@ retry:
   }
 
   OPENTYPE_TAG language_tag = hb_ot_tag_from_language (buffer->props.language);
+  hb_tag_t buffer_script_tags[2];
+  hb_ot_tags_from_script (buffer->props.script,
+			  &buffer_script_tags[0],
+			  &buffer_script_tags[1]);
 
   unsigned int glyphs_offset = 0;
   unsigned int glyphs_len;
@@ -339,7 +343,14 @@ retry:
   {
       unsigned int chars_offset = items[i].iCharPos;
       unsigned int item_chars_len = items[i + 1].iCharPos - chars_offset;
-      OPENTYPE_TAG script_tag = script_tags[i]; /* XXX buffer->props.script */
+
+      OPENTYPE_TAG script_tag;
+      /* We ignore what script tag Uniscribe chose, except to differentiate
+       * between old/new tags.  Not sure if this picks DFLT up correctly... */
+      if (script_tags[i] == buffer_script_tags[1])
+        script_tag = buffer_script_tags[1];
+      else
+        script_tag = buffer_script_tags[0];
 
       hr = ScriptShapeOpenType (font_data->hdc,
 				&font_data->script_cache,



More information about the HarfBuzz mailing list