Rename get_kernings() arguments from first/second_glyph to left/right_glyph
authorBehdad Esfahbod <behdad@behdad.org>
Thu, 12 May 2011 16:39:40 +0000 (12:39 -0400)
committerBehdad Esfahbod <behdad@behdad.org>
Thu, 12 May 2011 16:39:40 +0000 (12:39 -0400)
Makes it clear that kerning is in visual order.

src/hb-font.cc
src/hb-font.h
src/hb-ft.cc

index 10f686e..6d974fe 100644 (file)
@@ -115,14 +115,14 @@ hb_font_get_glyph_nil (hb_font_t *font HB_UNUSED,
 static void
 hb_font_get_kerning_nil (hb_font_t *font HB_UNUSED,
                         void *font_data HB_UNUSED,
-                        hb_codepoint_t first_glyph,
-                        hb_codepoint_t second_glyph,
+                        hb_codepoint_t left_glyph,
+                        hb_codepoint_t right_glyph,
                         hb_position_t *x_kern,
                         hb_position_t *y_kern,
                         void *user_data HB_UNUSED)
 {
   if (font->parent) {
-    hb_font_get_kerning (font->parent, first_glyph, second_glyph, x_kern, y_kern);
+    hb_font_get_kerning (font->parent, left_glyph, right_glyph, x_kern, y_kern);
     font->parent_scale_distance (x_kern, y_kern);
     return;
   }
@@ -298,12 +298,12 @@ hb_font_get_glyph (hb_font_t *font,
 
 void
 hb_font_get_kerning (hb_font_t *font,
-                    hb_codepoint_t first_glyph, hb_codepoint_t second_glyph,
+                    hb_codepoint_t left_glyph, hb_codepoint_t right_glyph,
                     hb_position_t *x_kern, hb_position_t *y_kern)
 {
   *x_kern = *y_kern = 0;
   return font->klass->get.kerning (font, font->user_data,
-                                  first_glyph, second_glyph,
+                                  left_glyph, right_glyph,
                                   x_kern, y_kern,
                                   font->klass->user_data.kerning);
 }
index 97831ff..c6f80c3 100644 (file)
@@ -144,7 +144,7 @@ typedef hb_codepoint_t (*hb_font_get_glyph_func_t) (hb_font_t *font, void *font_
                                                    hb_codepoint_t unicode, hb_codepoint_t variation_selector,
                                                    void *user_data);
 typedef void (*hb_font_get_kerning_func_t) (hb_font_t *font, void *font_data,
-                                           hb_codepoint_t first_glyph, hb_codepoint_t second_glyph,
+                                           hb_codepoint_t left_glyph, hb_codepoint_t right_glyph,
                                            hb_position_t *x_kern, hb_position_t *y_kern,
                                            void *user_data);
 
@@ -196,7 +196,7 @@ hb_font_get_glyph (hb_font_t *font,
 
 void
 hb_font_get_kerning (hb_font_t *font,
-                    hb_codepoint_t first_glyph, hb_codepoint_t second_glyph,
+                    hb_codepoint_t left_glyph, hb_codepoint_t right_glyph,
                     hb_position_t *x_kern, hb_position_t *y_kern);
 
 
index 9535ba1..b3a5cd0 100644 (file)
@@ -131,8 +131,8 @@ hb_ft_get_glyph (hb_font_t *font HB_UNUSED,
 static void
 hb_ft_get_kerning (hb_font_t *font HB_UNUSED,
                   void *font_data,
-                  hb_codepoint_t first_glyph,
-                  hb_codepoint_t second_glyph,
+                  hb_codepoint_t left_glyph,
+                  hb_codepoint_t right_glyph,
                   hb_position_t *x_kern,
                   hb_position_t *y_kern,
                   void *user_data HB_UNUSED)
@@ -141,7 +141,7 @@ hb_ft_get_kerning (hb_font_t *font HB_UNUSED,
   FT_Vector kerning;
 
   /* TODO: Kern type? */
-  if (FT_Get_Kerning (ft_face, first_glyph, second_glyph, FT_KERNING_DEFAULT, &kerning))
+  if (FT_Get_Kerning (ft_face, left_glyph, right_glyph, FT_KERNING_DEFAULT, &kerning))
     return;
 
   *x_kern = kerning.x;