[pango] Hint advances correctly



commit 97c470ebebb34ce3e5720a3a1003cf1c07e49308
Author: Behdad Esfahbod <behdad behdad org>
Date:   Mon Dec 17 23:51:46 2012 -0500

    Hint advances correctly

 modules/basic/basic-fc.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/modules/basic/basic-fc.c b/modules/basic/basic-fc.c
index 991ad29..e93d471 100644
--- a/modules/basic/basic-fc.c
+++ b/modules/basic/basic-fc.c
@@ -387,11 +387,10 @@ basic_engine_shape (PangoEngineShape    *engine G_GNUC_UNUSED,
   if (context.vertical)
     for (i = 0; i < num_glyphs; i++)
       {
-	/* XXX
+        unsigned int advance = hb_position->y_advance;
 	if (is_hinted)
 	  advance = PANGO_UNITS_ROUND (advance);
-	  */
-	glyphs->glyphs[i].geometry.width    = hb_position->y_advance;
+	glyphs->glyphs[i].geometry.width    = advance;
 	/* XXX */
 	glyphs->glyphs[i].geometry.x_offset = hb_position->y_offset;
 	glyphs->glyphs[i].geometry.y_offset = -hb_position->x_offset;
@@ -400,11 +399,10 @@ basic_engine_shape (PangoEngineShape    *engine G_GNUC_UNUSED,
   else /* horizontal */
     for (i = 0; i < num_glyphs; i++)
       {
-	/* XXX
+        unsigned int advance = hb_position->x_advance;
 	if (is_hinted)
 	  advance = PANGO_UNITS_ROUND (advance);
-	  */
-	glyphs->glyphs[i].geometry.width    = hb_position->x_advance;
+	glyphs->glyphs[i].geometry.width    = advance;
 	glyphs->glyphs[i].geometry.x_offset = hb_position->x_offset;
 	glyphs->glyphs[i].geometry.y_offset = hb_position->y_offset;
 	hb_position++;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]