On Sat, May 28, 2005 at 03:47:49PM +0200, Werner LEMBERG wrote:
>
> > This patch fixes some bugs in FT_Bitmap_Embolden.
>
> Applied, thanks. I think there is still a bug for graymap fonts.
> Have a look at the attached test glyph. Emboldening produces a
> strange result.
Oops, I forgot to adjust emboldening strength in the last ftsynth.c
patch. Please ignore that one.
These changes are suggested by some brave testers.
Changelog:
ft2-ftsynth-advance-fix2.patch:
* src/base/ftsynth.c (FT_GlyphSlot_Embolden): Modify slot->advance
accordingly.
More suited emboldening strength.
--
Regards,
olv
=== src/base/ftsynth.c
==================================================================
--- src/base/ftsynth.c (/freetype2/trunk) (revision 923)
+++ src/base/ftsynth.c (/freetype2/branches/embolden) (local)
@@ -81,7 +81,7 @@
/* some reasonable strength */
xstr = FT_MulFix( face->units_per_EM,
- face->size->metrics.y_scale ) / 32;
+ face->size->metrics.y_scale ) / 42;
ystr = xstr;
if ( slot->format == FT_GLYPH_FORMAT_OUTLINE )
@@ -122,6 +122,9 @@
/* modify the metrics accordingly */
if ( !error )
{
+ slot->advance.x += xstr;
+ slot->advance.y += ystr;
+
slot->metrics.width += xstr;
slot->metrics.height += ystr;
slot->metrics.horiBearingY += ystr;
Property changes on:
___________________________________________________________________
Name: svk:merge
+5f392c16-9bf0-0310-b16c-a65848a4e34f:/freetype2/trunk:921
_______________________________________________
Freetype-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/freetype-devel