[API] One last font-funcs API change
[apps/home/video-player.git] / src / hb-ft.cc
index feaf9aa..4a180ee 100644 (file)
@@ -78,38 +78,36 @@ hb_ft_get_glyph (hb_font_t *font HB_UNUSED,
   return *glyph != 0;
 }
 
-static void
+static hb_position_t
 hb_ft_get_glyph_h_advance (hb_font_t *font HB_UNUSED,
                           void *font_data,
                           hb_codepoint_t glyph,
-                          hb_position_t *advance,
                           void *user_data HB_UNUSED)
 {
   FT_Face ft_face = (FT_Face) font_data;
   int load_flags = FT_LOAD_DEFAULT;
 
   if (unlikely (FT_Load_Glyph (ft_face, glyph, load_flags)))
-    return;
+    return 0;
 
-  *advance = ft_face->glyph->metrics.horiAdvance;
+  return ft_face->glyph->metrics.horiAdvance;
 }
 
-static void
+static hb_position_t
 hb_ft_get_glyph_v_advance (hb_font_t *font HB_UNUSED,
                           void *font_data,
                           hb_codepoint_t glyph,
-                          hb_position_t *advance,
                           void *user_data HB_UNUSED)
 {
   FT_Face ft_face = (FT_Face) font_data;
   int load_flags = FT_LOAD_DEFAULT;
 
   if (unlikely (FT_Load_Glyph (ft_face, glyph, load_flags)))
-    return;
+    return 0;
 
   /* Note: FreeType's vertical metrics grows downward while other FreeType coordinates
    * have a Y growing upward.  Hence the extra negation. */
-  *advance = -ft_face->glyph->metrics.vertAdvance;
+  return -ft_face->glyph->metrics.vertAdvance;
 }
 
 static hb_bool_t
@@ -146,33 +144,31 @@ hb_ft_get_glyph_v_origin (hb_font_t *font HB_UNUSED,
   return TRUE;
 }
 
-static void
+static hb_position_t
 hb_ft_get_glyph_h_kerning (hb_font_t *font HB_UNUSED,
                           void *font_data,
                           hb_codepoint_t left_glyph,
                           hb_codepoint_t right_glyph,
-                          hb_position_t *kerning,
                           void *user_data HB_UNUSED)
 {
   FT_Face ft_face = (FT_Face) font_data;
   FT_Vector kerningv;
 
   if (FT_Get_Kerning (ft_face, left_glyph, right_glyph, FT_KERNING_DEFAULT, &kerningv))
-    return;
+    return 0;
 
-  *kerning = kerningv.x;
+  return kerningv.x;
 }
 
-static void
+static hb_position_t
 hb_ft_get_glyph_v_kerning (hb_font_t *font HB_UNUSED,
                           void *font_data HB_UNUSED,
                           hb_codepoint_t top_glyph HB_UNUSED,
                           hb_codepoint_t bottom_glyph HB_UNUSED,
-                          hb_position_t *kerning HB_UNUSED,
                           void *user_data HB_UNUSED)
 {
   /* FreeType API doesn't support vertical kerning */
-  return;
+  return 0;
 }
 
 static hb_bool_t