CMakeLists.txt                  |    5 ++
 src/hb-aat-layout-morx-table.hh |   87 +++++++++++++++-------------------------
 src/hb-common.cc                |    2 
 3 files changed, 39 insertions(+), 55 deletions(-)

New commits:
commit 388ab91642734e1ba0d7a4a4f29a17b15f1b249d
Author: Behdad Esfahbod <[email protected]>
Date:   Mon Sep 17 19:29:34 2018 +0200

    [morx] Implement InsertionChain

diff --git a/src/hb-aat-layout-morx-table.hh b/src/hb-aat-layout-morx-table.hh
index 23c9ef2d..5d3b9b14 100644
--- a/src/hb-aat-layout-morx-table.hh
+++ b/src/hb-aat-layout-morx-table.hh
@@ -608,80 +608,59 @@ struct InsertionSubtable
       hb_buffer_t *buffer = driver->buffer;
       unsigned int flags = entry->flags;
 
-      if (0)
-       c->sanitizer.check_range (nullptr, 0);
-#if 0
-      if (flags & SetComponent)
+      if (entry->data.markedInsertIndex != 0xFFFF)
       {
-        if (unlikely (match_length >= ARRAY_LENGTH (match_positions)))
-         return false;
+       unsigned int count = (entry->flags & MarkedInsertCount);
+       unsigned int start = entry->data.markedInsertIndex;
+       const GlyphID *glyphs = &insertionAction[start];
+       if (unlikely (!c->sanitizer.check_array (glyphs, count))) return false;
 
-       /* Never mark same index twice, in case DontAdvance was used... */
-       if (match_length && match_positions[match_length - 1] == 
buffer->out_len)
-         match_length--;
+       bool before = entry->flags & MarkedInsertBefore;
 
-       match_positions[match_length++] = buffer->out_len;
-      }
+       if (unlikely (!mark_set)) return false;
 
-      if (flags & PerformAction)
-      {
        unsigned int end = buffer->out_len;
-       unsigned int action_idx = entry->data.ligActionIndex;
-       unsigned int action;
-       unsigned int ligature_idx = 0;
-        do
-       {
-         if (unlikely (!match_length))
-           return false;
+       buffer->move_to (mark);
 
-         buffer->move_to (match_positions[--match_length]);
+       if (!before)
+         buffer->copy_glyph ();
+       /* TODO We ignore KashidaLike setting. */
+       for (unsigned int i = 0; i < count; i++)
+         buffer->output_glyph (glyphs[i]);
+       if (!before)
+         buffer->skip_glyph ();
 
-         const HBUINT32 &actionData = ligAction[action_idx];
-         if (unlikely (!actionData.sanitize (&c->sanitizer))) return false;
-         action = actionData;
-
-         uint32_t uoffset = action & LigActionOffset;
-         if (uoffset & 0x20000000)
-           uoffset += 0xC0000000;
-         int32_t offset = (int32_t) uoffset;
-         unsigned int component_idx = buffer->cur().codepoint + offset;
+       buffer->move_to (end + count);
+      }
 
-         const HBUINT16 &componentData = component[component_idx];
-         if (unlikely (!componentData.sanitize (&c->sanitizer))) return false;
-         ligature_idx += componentData;
+      if (entry->data.currentInsertIndex != 0xFFFF)
+      {
+       unsigned int count = (entry->flags & CurrentInsertCount) >> 5;
+       unsigned int start = entry->data.currentInsertIndex;
+       const GlyphID *glyphs = &insertionAction[start];
+       if (unlikely (!c->sanitizer.check_array (glyphs, count))) return false;
 
-         if (action & (LigActionStore | LigActionLast))
-         {
-           const GlyphID &ligatureData = ligature[ligature_idx];
-           if (unlikely (!ligatureData.sanitize (&c->sanitizer))) return false;
-           hb_codepoint_t lig = ligatureData;
+       bool before = entry->flags & CurrentInsertBefore;
 
-           match_positions[match_length++] = buffer->out_len;
-           buffer->replace_glyph (lig);
+       unsigned int end = buffer->out_len;
 
-           //ligature_idx = 0; // XXX Yes or no?
-         }
-         else
-         {
-           buffer->skip_glyph ();
-           end--;
-         }
-         /* TODO merge_clusters / unsafe_to_break */
+       if (!before)
+         buffer->copy_glyph ();
+       /* TODO We ignore KashidaLike setting. */
+       for (unsigned int i = 0; i < count; i++)
+         buffer->output_glyph (glyphs[i]);
+       if (!before)
+         buffer->skip_glyph ();
 
-         action_idx++;
-       }
-       while (!(action & LigActionLast));
        buffer->move_to (end);
       }
-#endif
 
       if (flags & SetMark)
       {
        mark_set = true;
-       mark = buffer->idx;
+       mark = buffer->out_len;
       }
 
-
       return true;
     }
 
commit d8d1e7df0057c79f54d855b7bfec2d21f59b09e8
Author: David Corbett <[email protected]>
Date:   Mon Sep 17 11:09:51 2018 -0400

    Don't enforce a native direction for Old Hungarian

diff --git a/src/hb-common.cc b/src/hb-common.cc
index c1651232..a9c62e80 100644
--- a/src/hb-common.cc
+++ b/src/hb-common.cc
@@ -531,7 +531,6 @@ hb_script_get_horizontal_direction (hb_script_t script)
 
     /* Unicode-8.0 additions */
     case HB_SCRIPT_HATRAN:
-    case HB_SCRIPT_OLD_HUNGARIAN:
 
     /* Unicode-9.0 additions */
     case HB_SCRIPT_ADLAM:
@@ -545,6 +544,7 @@ hb_script_get_horizontal_direction (hb_script_t script)
 
 
     /* https://github.com/harfbuzz/harfbuzz/issues/1000 */
+    case HB_SCRIPT_OLD_HUNGARIAN:
     case HB_SCRIPT_OLD_ITALIC:
     case HB_SCRIPT_RUNIC:
 
commit 6a97d0f3d377a35ea691d15ac142ce043f953e71
Author: Simon Hausmann <[email protected]>
Date:   Mon Sep 17 10:33:34 2018 +0200

    Fix installation of cmake config when building with cmake (#1161)
    
    When building with the auto tools, the manually mantained
    harfbuzz-config.cmake is installed. When building with cmake, we can use
    cmake to generate the correct config files for us and install them.

diff --git a/CMakeLists.txt b/CMakeLists.txt
index e881dbd1..69496561 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -761,11 +761,16 @@ endif ()
 
 if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL)
   install(TARGETS harfbuzz
+    EXPORT harfbuzzConfig
     ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
     LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
     RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
     FRAMEWORK DESTINATION Library/Frameworks
   )
+  install(EXPORT harfbuzzConfig
+      NAMESPACE harfbuzz::
+      DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/harfbuzz
+  )
   if (HB_BUILD_UTILS)
     install(TARGETS hb-view
       RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
_______________________________________________
HarfBuzz mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/harfbuzz

Reply via email to