summaryrefslogtreecommitdiff
path: root/src/base/ftsynth.c
diff options
context:
space:
mode:
authorWu, Chia-I (吳佳一) <olvaffe@gmail.com>2005-06-20 09:04:50 +0000
committerWu, Chia-I (吳佳一) <olvaffe@gmail.com>2005-06-20 09:04:50 +0000
commit8cfb220eb976949396a4949320424e8c4e9fb19d (patch)
tree6cc5e5178a30029ce7d59b86443692b88f4b27cb /src/base/ftsynth.c
parent49f4d34ed3dc58b087b34de661cd2c536d810882 (diff)
downloadfreetype2-8cfb220eb976949396a4949320424e8c4e9fb19d.tar.gz
* include/freetype/internal/ftobjs.h, src/base/ftobjs.c: New function
ft_glyphslot_grid_fit_metrics. * src/truetype/ttgload.c (compute_glyph_metrics): Use ft_glyphslot_grid_fit_metrics. * src/cff/cffgload.c (cff_slot_load), src/cid/cidgload.c (cid_slot_load_glyph), src/type1/t1gload.c (T1_Load_Glyph): Use ft_glyphslot_grid_fit_metrics. FT_Outline_Get_CBox is called twice. * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Modify metrics to more reasonable values when emboldening outline glyphs. The theoretic ones are unrealistic.
Diffstat (limited to 'src/base/ftsynth.c')
-rw-r--r--src/base/ftsynth.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/base/ftsynth.c b/src/base/ftsynth.c
index ed809513a..c2d4d52fe 100644
--- a/src/base/ftsynth.c
+++ b/src/base/ftsynth.c
@@ -87,7 +87,10 @@
if ( slot->format == FT_GLYPH_FORMAT_OUTLINE )
{
error = FT_Outline_Embolden( &slot->outline, xstr );
- xstr = xstr * 4; /* according to the documentation */
+
+ /* this is more than enough for most glyphs */
+ /* if you need accurate values, you have to FT_Outline_Get_CBox */
+ xstr = xstr * 2;
ystr = xstr;
}
else if ( slot->format == FT_GLYPH_FORMAT_BITMAP )