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

Behdad Esfahbod behdad at kemper.freedesktop.org
Wed Aug 3 17:38:39 PDT 2011


 TODO                      |    2 
 configure.ac              |   19 +-
 src/Makefile.am           |   11 +
 src/hb-buffer-private.hh  |    2 
 src/hb-buffer.cc          |   10 +
 src/hb-font.cc            |   10 +
 src/hb-font.h             |    3 
 src/hb-ot-shape.cc        |    8 -
 src/hb-private.hh         |    4 
 src/hb-uniscribe-shape.cc |  325 ++++++++++++++++++++++++++++++++++++++++++++++
 src/hb-uniscribe.h        |   46 ++++++
 test/Makefile.am          |    7 
 test/test-unicode.c       |    4 
 13 files changed, 437 insertions(+), 14 deletions(-)

New commits:
commit 0fbb2dc83132a89201ad8b56c6909610437d2da0
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Wed Aug 3 19:55:04 2011 -0400

    Add draft experimental Uniscribe backend
    
    Not complete yet, font selection doesn't work.  But hey it shapes!
    
    This is not supposed to be a production backend, more like a testing
    backend.

diff --git a/configure.ac b/configure.ac
index a365d7c..125349e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -137,6 +137,15 @@ AM_CONDITIONAL(HAVE_FREETYPE, $have_freetype)
 
 dnl ===========================================================================
 
+AC_CHECK_HEADERS(usp10.h windows.h, have_uniscribe=true, have_uniscribe=false)
+if $have_uniscribe; then
+	UNISCRIBE_CFLAGS=
+	UNISCRIBE_LIBS="-lusp10 -lgdi32"
+	AC_SUBST(UNISCRIBE_CFLAGS)
+	AC_SUBST(UNISCRIBE_LIBS)
+fi
+AM_CONDITIONAL(HAVE_UNISCRIBE, $have_uniscribe)
+
 AC_CONFIG_FILES([
 Makefile
 harfbuzz.pc
diff --git a/src/Makefile.am b/src/Makefile.am
index b812419..c4f35e9 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -108,6 +108,17 @@ HBHEADERS += \
 	$(NULL)
 endif
 
+if HAVE_UNISCRIBE
+HBCFLAGS += $(UNISCRIBE_CFLAGS)
+HBLIBS   += $(UNISCRIBE_LIBS)
+HBSOURCES += \
+	hb-uniscribe-shape.cc \
+	$(NULL)
+HBHEADERS += \
+	hb-uniscribe.h \
+	$(NULL)
+endif
+
 CXXLINK = $(LINK)
 libharfbuzz_la_SOURCES = $(HBSOURCES) $(HBHEADERS)
 libharfbuzz_la_CPPFLAGS = $(HBCFLAGS)
diff --git a/src/hb-private.hh b/src/hb-private.hh
index 8612789..752bd24 100644
--- a/src/hb-private.hh
+++ b/src/hb-private.hh
@@ -507,7 +507,9 @@ _hb_debug_msg (const char *what,
   va_start (ap, message);
 
   (void) (_hb_debug (level, max_level) &&
-	  fprintf (stderr, "%s(%p): ", what, obj) &&
+	  fprintf (stderr, "%s", what) &&
+	  (obj && fprintf (stderr, "(%p)", obj), TRUE) &&
+	  fprintf (stderr, ": ") &&
 	  (func && fprintf (stderr, "%s: ", func), TRUE) &&
 	  (indented && fprintf (stderr, "%-*d-> ", level + 1, level), TRUE) &&
 	  vfprintf (stderr, message, ap) &&
diff --git a/src/hb-uniscribe-shape.cc b/src/hb-uniscribe-shape.cc
new file mode 100644
index 0000000..ed50e14
--- /dev/null
+++ b/src/hb-uniscribe-shape.cc
@@ -0,0 +1,325 @@
+/*
+ * Copyright © 2011  Google, Inc.
+ *
+ *  This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#define _WIN32_WINNT 0x0500
+
+#include "hb-private.hh"
+
+#include "hb-uniscribe.h"
+
+#include "hb-ot-tag.h"
+
+#include "hb-font-private.hh"
+
+#include "hb-buffer-private.hh"
+
+#include <windows.h>
+#include <usp10.h>
+
+HB_BEGIN_DECLS
+
+
+#ifndef HB_DEBUG_UNISCRIBE
+#define HB_DEBUG_UNISCRIBE (HB_DEBUG+0)
+#endif
+
+
+/*
+DWORD GetFontData(
+  __in   HDC hdc,
+  __in   DWORD dwTable,
+  __in   DWORD dwOffset,
+  __out  LPVOID lpvBuffer,
+  __in   DWORD cbData
+);
+*/
+
+static void
+fallback_shape (hb_font_t   *font,
+		hb_buffer_t *buffer)
+{
+  DEBUG_MSG (UNISCRIBE, NULL, "Fallback shaper invoked");
+}
+
+static void
+populate_log_font (LOGFONTW  *lf,
+		   HDC        hdc,
+		   hb_font_t *font,
+		   hb_blob_t *blob)
+{
+  memset (lf, 0, sizeof (*lf));
+  int dpi = GetDeviceCaps (hdc, LOGPIXELSY);
+  lf->lfHeight = MulDiv (font->x_scale, dpi, 72);
+
+  WCHAR family_name[] = {'n','a','z','l','i'};
+  for (unsigned int i = 0; family_name[i] && i < LF_FACESIZE - 1; i++)
+    lf->lfFaceName[i] = family_name[i];
+}
+
+void
+hb_uniscribe_shape (hb_font_t          *font,
+		    hb_buffer_t        *buffer,
+		    const hb_feature_t *features,
+		    unsigned int        num_features)
+{
+  HRESULT hr;
+
+  if (unlikely (!buffer->len)) {
+  fallback:
+    fallback_shape (font, buffer);
+  }
+
+retry:
+
+  unsigned int scratch_size;
+  char *scratch = (char *) buffer->get_scratch_buffer (&scratch_size);
+
+  /* Allocate char buffers; they all fit */
+
+#define ALLOCATE_ARRAY(Type, name, len) \
+  Type *name = (Type *) scratch; \
+  scratch += len * sizeof (name[0]); \
+  scratch_size -= len * sizeof (name[0]);
+
+#define utf16_index() var1.u32
+
+  WCHAR *pchars = (WCHAR *) scratch;
+  unsigned int chars_len = 0;
+  for (unsigned int i = 0; i < buffer->len; i++) {
+    hb_codepoint_t c = buffer->info[i].codepoint;
+    buffer->info[i].utf16_index() = chars_len;
+    if (likely (c < 0x10000))
+      pchars[chars_len++] = c;
+    else if (unlikely (c >= 0x110000))
+      pchars[chars_len++] = 0xFFFD;
+    else {
+      pchars[chars_len++] = 0xD800 + ((c - 0x10000) >> 10);
+      pchars[chars_len++] = 0xDC00 + ((c - 0x10000) & ((1 << 10) - 1));
+    }
+  }
+
+  ALLOCATE_ARRAY (WCHAR, wchars, chars_len);
+  ALLOCATE_ARRAY (WORD, log_clusters, chars_len);
+  ALLOCATE_ARRAY (SCRIPT_CHARPROP, char_props, chars_len);
+
+  /* On Windows, we don't care about alignment...*/
+  unsigned int glyphs_size = scratch_size / (sizeof (WORD) +
+					     sizeof (SCRIPT_GLYPHPROP) +
+					     sizeof (int) +
+					     sizeof (GOFFSET) +
+					     sizeof (uint32_t));
+
+  ALLOCATE_ARRAY (WORD, glyphs, glyphs_size);
+  ALLOCATE_ARRAY (SCRIPT_GLYPHPROP, glyph_props, glyphs_size);
+  ALLOCATE_ARRAY (int, advances, glyphs_size);
+  ALLOCATE_ARRAY (GOFFSET, offsets, glyphs_size);
+  ALLOCATE_ARRAY (uint32_t, vis_clusters, glyphs_size);
+
+
+#define FALLBACK(...) \
+  HB_STMT_START { \
+    DEBUG_MSG (UNISCRIBE, NULL, __VA_ARGS__); \
+    goto fallback; \
+  } HB_STMT_END;
+
+
+#define MAX_ITEMS 10
+
+  SCRIPT_ITEM items[MAX_ITEMS + 1];
+  SCRIPT_STATE bidi_state = {0};
+  ULONG script_tags[MAX_ITEMS];
+  int item_count;
+
+  bidi_state.uBidiLevel = HB_DIRECTION_IS_FORWARD (buffer->props.direction) ? 0 : 1;
+  bidi_state.fOverrideDirection = 1;
+
+  hr = ScriptItemizeOpenType (wchars,
+			      chars_len,
+			      MAX_ITEMS,
+			      NULL,
+			      &bidi_state,
+			      items,
+			      script_tags,
+			      &item_count);
+  if (unlikely (FAILED (hr)))
+    FALLBACK ("ScriptItemizeOpenType() failed: %d", hr);
+
+#undef MAX_ITEMS
+
+  int *range_char_counts = NULL;
+  TEXTRANGE_PROPERTIES **range_properties = NULL;
+  int range_count = 0;
+  if (num_features) {
+    /* XXX setup ranges */
+  }
+
+  hb_blob_t *blob = hb_face_get_blob (font->face);
+  unsigned int blob_length;
+  const char *blob_data = hb_blob_get_data (blob, &blob_length);
+  if (unlikely (!blob_length)) {
+    hb_blob_destroy (blob);
+    FALLBACK ("Empty font blob");
+  }
+
+  DWORD num_fonts_installed;
+  HANDLE fh = AddFontMemResourceEx ((void *) blob_data, blob_length, 0, &num_fonts_installed);
+  if (unlikely (!fh)) {
+    hb_blob_destroy (blob);
+    FALLBACK ("AddFontMemResourceEx() failed");
+  }
+
+  /* FREE stuff, specially when taking fallback... */
+
+  HDC hdc = GetDC (NULL); /* XXX The DC should be cached on the face I guess? */
+
+  LOGFONTW log_font;
+  populate_log_font (&log_font, hdc, font, blob);
+
+  HFONT hfont = CreateFontIndirectW (&log_font);
+  SelectObject (hdc, hfont);
+
+  SCRIPT_CACHE script_cache = NULL;
+  OPENTYPE_TAG language_tag = hb_ot_tag_from_language (buffer->props.language);
+
+  unsigned int glyphs_offset = 0;
+  unsigned int glyphs_len;
+  for (unsigned int i = 0; i < item_count; i++)
+  {
+      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 */
+
+      hr = ScriptShapeOpenType (hdc,
+				&script_cache,
+				&items[i].a,
+				script_tag,
+				language_tag,
+				range_char_counts,
+				range_properties,
+				range_count,
+				wchars + chars_offset,
+				item_chars_len,
+				glyphs_size - glyphs_offset,
+				/* out */
+				log_clusters + chars_offset,
+				char_props + chars_offset,
+				glyphs + glyphs_offset,
+				glyph_props + glyphs_offset,
+				(int *) &glyphs_len);
+
+      if (unlikely (items[i].a.fNoGlyphIndex))
+	FALLBACK ("ScriptShapeOpenType() set fNoGlyphIndex");
+      if (unlikely (hr == E_OUTOFMEMORY))
+      {
+        buffer->ensure (buffer->allocated * 2);
+	if (buffer->in_error)
+	  FALLBACK ("Buffer resize failed");
+	goto retry;
+      }
+      if (unlikely (FAILED (hr)))
+	FALLBACK ("ScriptShapeOpenType() failed: %d", hr);
+
+      hr = ScriptPlaceOpenType (hdc,
+				&script_cache,
+				&items[i].a,
+				script_tag,
+				language_tag,
+				range_char_counts,
+				range_properties,
+				range_count,
+				wchars + chars_offset,
+				log_clusters + chars_offset,
+				char_props + chars_offset,
+				item_chars_len,
+				glyphs + glyphs_offset,
+				glyph_props + glyphs_offset,
+				glyphs_len,
+				/* out */
+				advances + glyphs_offset,
+				offsets + glyphs_offset,
+				NULL);
+      if (unlikely (FAILED (hr)))
+	FALLBACK ("ScriptPlaceOpenType() failed: %d", hr);
+
+      glyphs_offset += glyphs_len;
+  }
+  glyphs_len = glyphs_offset;
+
+  ReleaseDC (NULL, hdc);
+  DeleteObject (hfont);
+  RemoveFontMemResourceEx (fh);
+
+  /* Ok, we've got everything we need, now compose output buffer,
+   * very, *very*, carefully! */
+
+  /* Calculate visual-clusters.  That's what we ship. */
+  for (unsigned int i = 0; i < buffer->len; i++)
+    vis_clusters[log_clusters[buffer->info[i].utf16_index()]] = buffer->info[i].cluster;
+  for (unsigned int i = 1; i < glyphs_len; i++)
+    if (!glyph_props[i].sva.fClusterStart)
+    vis_clusters[i] = vis_clusters[i - 1];
+
+#undef utf16_index
+
+  buffer->ensure (glyphs_len);
+  if (buffer->in_error)
+    FALLBACK ("Buffer in error");
+
+#undef FALLBACK
+
+  /* Set glyph infos */
+  for (unsigned int i = 0; i < glyphs_len; i++)
+  {
+    hb_glyph_info_t *info = &buffer->info[i];
+
+    info->codepoint = glyphs[i];
+    info->cluster = vis_clusters[i];
+
+    /* The rest is crap.  Let's store position info there for now. */
+    info->mask = advances[i];
+    info->var1.u32 = offsets[i].du;
+    info->var2.u32 = offsets[i].dv;
+  }
+
+  /* Set glyph positions */
+  buffer->clear_positions ();
+  for (unsigned int i = 0; i < glyphs_len; i++)
+  {
+    hb_glyph_info_t *info = &buffer->info[i];
+    hb_glyph_position_t *pos = &buffer->pos[i];
+
+    /* TODO vertical */
+    pos->x_advance = info->mask;
+    pos->x_offset = info->var1.u32;
+    pos->y_offset = info->var2.u32;
+  }
+
+  /* Wow, done! */
+  return;
+}
+
+
+HB_END_DECLS
diff --git a/src/hb-uniscribe.h b/src/hb-uniscribe.h
new file mode 100644
index 0000000..2156af4
--- /dev/null
+++ b/src/hb-uniscribe.h
@@ -0,0 +1,46 @@
+/*
+ * Copyright © 2011  Google, Inc.
+ *
+ *  This is part of HarfBuzz, a text shaping library.
+ *
+ * Permission is hereby granted, without written agreement and without
+ * license or royalty fees, to use, copy, modify, and distribute this
+ * software and its documentation for any purpose, provided that the
+ * above copyright notice and the following two paragraphs appear in
+ * all copies of this software.
+ *
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+ * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
+ * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Google Author(s): Behdad Esfahbod
+ */
+
+#ifndef HB_USP_SHAPE_H
+#define HB_USP_SHAPE_H
+
+#include "hb-common.h"
+#include "hb-shape.h"
+
+
+HB_BEGIN_DECLS
+
+
+void
+hb_uniscribe_shape (hb_font_t          *font,
+		    hb_buffer_t        *buffer,
+		    const hb_feature_t *features,
+		    unsigned int        num_features);
+
+
+HB_END_DECLS
+
+#endif /* HB_USP_SHAPE_H */
commit 0d7d4824b2edc7aeeb995077655a9a89b5c360a9
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Wed Aug 3 17:39:24 2011 -0400

    Minor

diff --git a/configure.ac b/configure.ac
index dcc68d0..a365d7c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -107,11 +107,11 @@ PKG_CHECK_MODULES(ICU, icu, have_icu=true, [
 	if test $cross_compiling == no; then
 		AC_CHECK_PROG([have_icu], [icu-config], [true], [false])
 		if $have_icu; then
-			icu_cflags=`icu-config --cppflags`
-			icu_libs=`icu-config --ldflags-libsonly`
-			icu_cflags=`echo "$icu_cflags" | sed "s@ -I/usr/include @ @"`
-			AC_SUBST(ICU_CFLAGS, [$icu_cflags])
-			AC_SUBST(ICU_LIBS, [$icu_libs])
+			ICU_CFLAGS=`icu-config --cppflags`
+			ICU_LIBS=`icu-config --ldflags-libsonly`
+			ICU_CFLAGS=`echo "$ICU_CFLAGS" | sed "s@ -I/usr/include @ @"`
+			AC_SUBST(ICU_CFLAGS)
+			AC_SUBST(ICU_LIBS)
 		fi
 	fi
 ])
commit e62df43649e31b7815c272f01808b3f726c7d07d
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Wed Aug 3 17:38:54 2011 -0400

    Add internal hb_buffer_t::get_scratch_buffer()

diff --git a/src/hb-buffer-private.hh b/src/hb-buffer-private.hh
index 8f2095a..a4d7b8f 100644
--- a/src/hb-buffer-private.hh
+++ b/src/hb-buffer-private.hh
@@ -135,6 +135,8 @@ struct _hb_buffer_t {
   { return likely (size <= allocated) ? TRUE : enlarge (size); }
 
   HB_INTERNAL bool make_room_for (unsigned int num_in, unsigned int num_out);
+
+  HB_INTERNAL void *get_scratch_buffer (unsigned int *size);
 };
 
 
diff --git a/src/hb-buffer.cc b/src/hb-buffer.cc
index ea05307..968e673 100644
--- a/src/hb-buffer.cc
+++ b/src/hb-buffer.cc
@@ -135,6 +135,16 @@ hb_buffer_t::make_room_for (unsigned int num_in,
   return TRUE;
 }
 
+void *
+hb_buffer_t::get_scratch_buffer (unsigned int *size)
+{
+  have_output = FALSE;
+  have_positions = FALSE;
+  out_len = 0;
+  *size = allocated * sizeof (pos[0]);
+  return pos;
+}
+
 
 /* HarfBuzz-Internal API */
 
commit 71e7936fcadfd375a8bdc47987ef8b1b2b542df5
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Wed Aug 3 17:38:34 2011 -0400

    Minor

diff --git a/TODO b/TODO
index 04852c6..ef8f413 100644
--- a/TODO
+++ b/TODO
@@ -13,6 +13,8 @@ General fixes:
 API issues to fix before 1.0:
 ============================
 
+- Rename all internal symbols (static ones even) to have _hb prefix?
+
 - Add pkg-config files for glue codes (harfbuzz-glib, etc)
 
 - Figure out how many .so objects, how to link, etc
commit bf8c57ba745c02370c38198adfdcd8075ba38b13
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Wed Aug 3 17:38:04 2011 -0400

    [API] Add hb_face_get_blob()
    
    Need to think more about it.

diff --git a/src/hb-font.cc b/src/hb-font.cc
index 0406e10..d92f598 100644
--- a/src/hb-font.cc
+++ b/src/hb-font.cc
@@ -686,6 +686,16 @@ hb_face_is_immutable (hb_face_t *face)
 
 
 hb_blob_t *
+hb_face_get_blob (hb_face_t *face)
+{
+  if (face->destroy != (hb_destroy_func_t) _hb_face_for_data_closure_destroy)
+    return hb_blob_get_empty ();
+
+  hb_face_for_data_closure_t *data = (hb_face_for_data_closure_t *) face->user_data;
+  return data->blob;
+}
+
+hb_blob_t *
 hb_face_reference_table (hb_face_t *face,
 			 hb_tag_t   tag)
 {
diff --git a/src/hb-font.h b/src/hb-font.h
index 37d36b4..2675c6e 100644
--- a/src/hb-font.h
+++ b/src/hb-font.h
@@ -80,6 +80,9 @@ hb_face_is_immutable (hb_face_t *face);
 
 
 hb_blob_t *
+hb_face_get_blob (hb_face_t *face);
+
+hb_blob_t *
 hb_face_reference_table (hb_face_t *face,
 			 hb_tag_t   tag);
 
commit 2118fdb9f584e6735e904638e48bae48314372fa
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Tue Aug 2 14:06:51 2011 -0400

    Fix fallback shaping
    
    Broke it a few commits ago.

diff --git a/src/hb-ot-shape.cc b/src/hb-ot-shape.cc
index e40cf1e..9f41b29 100644
--- a/src/hb-ot-shape.cc
+++ b/src/hb-ot-shape.cc
@@ -235,12 +235,13 @@ hb_substitute_default (hb_ot_shape_context_t *c)
 static void
 hb_ot_substitute_complex (hb_ot_shape_context_t *c)
 {
-  if (hb_ot_layout_has_substitution (c->face))
+  if (hb_ot_layout_has_substitution (c->face)) {
     c->plan->map.substitute (c->face, c->buffer);
+    c->applied_substitute_complex = TRUE;
+  }
 
   hb_ot_layout_substitute_finish (c->buffer);
 
-  c->applied_substitute_complex = TRUE;
   return;
 }
 
@@ -295,11 +296,12 @@ hb_ot_position_complex (hb_ot_shape_context_t *c)
 						   &c->buffer->pos[i].x_offset,
 						   &c->buffer->pos[i].y_offset);
     }
+
+    c->applied_position_complex = TRUE;
   }
 
   hb_ot_layout_position_finish (c->buffer);
 
-  c->applied_position_complex = TRUE;
   return;
 }
 
commit 199abbd0f15bd295c3a56845c71b38dd20af1332
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Tue Aug 2 13:59:47 2011 -0400

    Minor

diff --git a/test/test-unicode.c b/test/test-unicode.c
index 9f526d7..3482a05 100644
--- a/test/test-unicode.c
+++ b/test/test-unicode.c
@@ -142,13 +142,15 @@ static const test_pair_t combining_class_tests[] =
   {   0x302C, 232 },
   {   0x0362, 233 },
   {   0x0360, 234 },
-  {   0x1DCD, 234 },
   {   0x0345, 240 },
 
   { 0x111111, 0 }
 };
 static const test_pair_t combining_class_tests_more[] =
 {
+  /* Unicode-5.1 character additions */
+  {   0x1DCD, 234 },
+
   /* Unicode-5.2 character additions */
   {   0xA8E0, 230 },
 
commit 4f052b93c0b17d92b9f0adddf64ef77518bf2ac4
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Tue Aug 2 13:44:24 2011 -0400

    Fix build with glib but not freetype

diff --git a/test/Makefile.am b/test/Makefile.am
index b1a9b87..a769688 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -20,7 +20,6 @@ TEST_PROGS = \
 	test-buffer \
 	test-common \
 	test-font \
-	test-object \
 	test-shape \
 	test-unicode \
 	test-version \
@@ -45,13 +44,13 @@ endif
 if HAVE_FREETYPE
 test_c_CPPFLAGS += $(FREETYPE_CFLAGS)
 test_cplusplus_CPPFLAGS += $(FREETYPE_CFLAGS)
+
 # TODO replace freetype with other stuff in the following test
+TEST_PROGS += test-object
 test_object_CPPFLAGS = $(AM_CPPFLAGS) $(FREETYPE_CFLAGS)
 test_object_LDADD = $(LDADD) $(FREETYPE_LIBS)
 
-TEST_PROGS += \
-	test-shape-complex \
-	$(NULL)
+TEST_PROGS += test-shape-complex
 test_shape_complex_CPPFLAGS = $(AM_CPPFLAGS) $(FREETYPE_CFLAGS)
 test_shape_complex_LDADD = $(LDADD) $(FREETYPE_LIBS)
 endif



More information about the HarfBuzz mailing list