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

Behdad Esfahbod behdad at kemper.freedesktop.org
Sun Dec 20 14:05:16 PST 2009


 configure.ac                     |    7 +++++++
 src/hb-ft.c                      |    2 ++
 src/hb-ot-layout-gpos-private.hh |    4 ++--
 3 files changed, 11 insertions(+), 2 deletions(-)

New commits:
commit cd11a98fa1426e9dbc4b61e702913b23a4794ae2
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Sun Dec 20 23:05:02 2009 +0100

    Fix compile with older FreeType

diff --git a/configure.ac b/configure.ac
index 12045cf..f9ca23b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -38,6 +38,13 @@ AM_CONDITIONAL(HAVE_ICU, $have_icu)
 PKG_CHECK_MODULES(FREETYPE, freetype2, have_freetype=true, have_freetype=false)
 if $have_freetype; then
 	AC_DEFINE(HAVE_FREETYPE, 1, [Have FreeType 2 library])
+	_save_libs="$LIBS"
+	_save_cflags="$CFLAGS"
+	LIBS="$LIBS $FREETYPE_LIBS"
+	CFLAGS="$CFLAGS $FREETYPE_CFLAGS"
+	AC_CHECK_FUNCS(FT_Face_GetCharVariantIndex)
+	LIBS="$_save_libs"
+	CFLAGS="$_save_cflags"
 fi
 AM_CONDITIONAL(HAVE_FREETYPE, $have_freetype)
 
diff --git a/src/hb-ft.c b/src/hb-ft.c
index e8295cf..4c508a2 100644
--- a/src/hb-ft.c
+++ b/src/hb-ft.c
@@ -39,11 +39,13 @@ hb_ft_get_glyph (hb_font_t *font, hb_face_t *face, const void *user_data,
 {
   FT_Face ft_face = (FT_Face) user_data;
 
+#ifdef HAVE_FT_FACE_GETCHARVARIANTINDEX
   if (HB_UNLIKELY (variation_selector)) {
     hb_codepoint_t glyph = FT_Face_GetCharVariantIndex (ft_face, unicode, variation_selector);
     if (glyph)
       return glyph;
   }
+#endif
 
   return FT_Get_Char_Index (ft_face, unicode);
 }
commit 7f7448a354c43650348b4e91b4e40ecf18718d66
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Sun Dec 20 21:42:14 2009 +0100

    Indent

diff --git a/src/hb-ot-layout-gpos-private.hh b/src/hb-ot-layout-gpos-private.hh
index ad8f241..e0d8cb7 100644
--- a/src/hb-ot-layout-gpos-private.hh
+++ b/src/hb-ot-layout-gpos-private.hh
@@ -60,8 +60,8 @@ struct ValueFormat : USHORT
   { return get_len () * sizeof (Value); }
 
   void apply_value (hb_ot_layout_context_t *context,
-		    const char          *base,
-		    const Value         *values,
+		    const char             *base,
+		    const Value            *values,
 		    hb_internal_glyph_position_t *glyph_pos) const
   {
     unsigned int x_ppem, y_ppem;



More information about the HarfBuzz mailing list