Evas font-engine: Conform to the API changes in Harfbuzz 0.6.0.
authortasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sun, 29 May 2011 11:09:47 +0000 (11:09 +0000)
committertasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sun, 29 May 2011 11:09:47 +0000 (11:09 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/evas@59779 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

ChangeLog
configure.ac
src/lib/engines/common/evas_font_ot.c

index 99cf108..a306666 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
        * Font-engine: Fixed a bug in glyph search causing inconsistent return
          values. The found fi should always be NULL if there was no fi found.
 
+2011-05-29  Tom Hacohen (TAsn)
+
+       * Font-engine: Conform to the API changes in Harfbuzz 0.6.0
+
index ce90b98..720e874 100644 (file)
@@ -351,7 +351,7 @@ AC_ARG_ENABLE([harfbuzz],
 
 if test "x${want_harfbuzz}" = "xyes" -o "x${want_harfbuzz}" = "xauto" ; then
    PKG_CHECK_MODULES([HARFBUZZ],
-      [harfbuzz >= 0.5.0],
+      [harfbuzz >= 0.6.0],
       [
        have_harfbuzz="yes"
        requirement_evas="harfbuzz ${requirement_evas}"
index fe704a3..7fb9d08 100644 (file)
@@ -180,10 +180,9 @@ evas_common_font_ot_cluster_size_get(const Evas_Text_Props *props, size_t char_i
 
 /* Harfbuzz font functions */
 
-static void
+static hb_position_t
 _evas_common_font_ot_hb_get_glyph_advance(hb_font_t *font,
       void *font_data, hb_codepoint_t glyph,
-      hb_position_t *x_advance, hb_position_t *y_advance,
       void *user_data)
 {
    /* Use our cache*/
@@ -194,25 +193,23 @@ _evas_common_font_ot_hb_get_glyph_advance(hb_font_t *font,
    fg = evas_common_font_int_cache_glyph_get(fi, glyph);
    if (fg)
      {
-        *x_advance = fg->glyph->advance.x >> 10;
-        *y_advance = fg->glyph->advance.y >> 10;
+        return fg->glyph->advance.x >> 10;
      }
+   return 0;
 }
 
-static void
+static hb_position_t
 _evas_common_font_ot_hb_get_kerning(hb_font_t *font, void *font_data,
-   hb_codepoint_t first_glyph, hb_codepoint_t second_glyph,
-   hb_position_t *x_kern, hb_position_t *y_kern, void *user_data)
+   hb_codepoint_t first_glyph, hb_codepoint_t second_glyph, void *user_data)
 {
    RGBA_Font_Int *fi = (RGBA_Font_Int *) font_data;
    int kern;
    (void) font;
    (void) user_data;
    if (evas_common_font_query_kerning(fi, first_glyph, second_glyph, &kern))
-        *x_kern = kern;
-   else
-      return;
-   *y_kern = 0;
+      return kern;
+
+   return 0;
 }
 
 /* End of harfbuzz font funcs */
@@ -224,9 +221,9 @@ _evas_common_font_ot_font_funcs_get(void)
    if (!font_funcs)
      {
         font_funcs = hb_font_funcs_create();
-        hb_font_funcs_set_glyph_advance_func(font_funcs,
+        hb_font_funcs_set_glyph_h_advance_func(font_funcs,
             _evas_common_font_ot_hb_get_glyph_advance, NULL, NULL);
-        hb_font_funcs_set_kerning_func(font_funcs,
+        hb_font_funcs_set_glyph_h_kerning_func(font_funcs,
             _evas_common_font_ot_hb_get_kerning, NULL, NULL);
      }