Hi,

This patch fixes some bugs in emboldening.

The `strength' in FT_Outline_Embolden is halved so that, for example, a
vertical bar of width W will be, after emboldening, of width "W +
strength".  And now it works as the documentation says.

-- 
Regards,
olv
* src/base/ftoutln.c (FT_Outline_Embolden): Strength should be halved.

* src/base/ftsynth.c (FT_GlyphSlot_Embolden): Change the default strength.
Don't increase slot->advance.y.

=== src/base/ftoutln.c
==================================================================
--- src/base/ftoutln.c  (revision 976)
+++ src/base/ftoutln.c  (local)
@@ -683,6 +683,7 @@
     if ( !outline )
       return FT_Err_Invalid_Argument;
 
+    strength /= 2;
     if ( strength == 0 )
       return FT_Err_Ok;
 
=== src/base/ftsynth.c
==================================================================
--- src/base/ftsynth.c  (revision 976)
+++ src/base/ftsynth.c  (local)
@@ -81,7 +81,7 @@
 
     /* some reasonable strength */
     xstr = FT_MulFix( face->units_per_EM,
-                      face->size->metrics.y_scale ) / 42;
+                      face->size->metrics.y_scale ) / 24;
     ystr = xstr;
 
     if ( slot->format == FT_GLYPH_FORMAT_OUTLINE )
@@ -122,8 +122,8 @@
     /* modify the metrics accordingly */
     if ( !error )
     {
+      /* assume the layout is horizontal */
       slot->advance.x += xstr;
-      slot->advance.y += ystr;
 
       slot->metrics.width        += xstr;
       slot->metrics.height       += ystr;
_______________________________________________
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel

Reply via email to