ref: ea1e8d3a53e29d5ba00fff0ca2c468bf4e16e9af
parent: 1723dcc26169d4fecd8a85476421b2d18c8f8748
author: Wu, Chia-I (吳佳一) <[email protected]>
date: Sun Jan 15 10:01:45 EST 2006
* include/freetype/internal/ftobjs.h, src/base/ftobjs.c, src/bdf/bdfdrivr.c, src/cff/cffgload.c, src/cid/cidgload.c, src/pcf/pcfdrivr.c, src/type1/t1gload.c, src/winfonts/winfnt.c: s/ft_fake_vertical_metrics/ft_synthesize_vertical_metrics/. * docs/CHANGES: Mention that vertical metrics are synthesized for fonts not having this info.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
2006-01-15 Chia-I Wu <[email protected]>
+ * include/freetype/internal/ftobjs.h, src/base/ftobjs.c,
+ src/bdf/bdfdrivr.c, src/cff/cffgload.c, src/cid/cidgload.c,
+ src/pcf/pcfdrivr.c, src/type1/t1gload.c, src/winfonts/winfnt.c:
+ s/ft_fake_vertical_metrics/ft_synthesize_vertical_metrics/.
+
+ * docs/CHANGES: Mention that vertical metrics are synthesized for
+ fonts not having this info.
+
+2006-01-15 Chia-I Wu <[email protected]>
+
* include/freetype/internal/ftobjs.h (ft_fake_vertical_metrics),
src/base/ftobjs.c (ft_fake_vertical_metrics): New function to fake
vertical metrics.
--- a/docs/CHANGES
+++ b/docs/CHANGES
@@ -98,6 +98,11 @@
- A new function `FT_Module_Get_Flags' (declared in `FT_MODULE_H')
can be used to get the module flags for a given module.
+ - Vertical metrics of glyphs are synthesized if the font does not
+ provide such information. You can tell whether the metrics are
+ synthesized or not by checking the FT_FACE_FLAG_VERTICAL flag of
+ the face.
+
- The demo programs `ftview' and `ftstring' have been rewritten
for better readability.
--- a/include/freetype/internal/ftobjs.h
+++ b/include/freetype/internal/ftobjs.h
@@ -462,12 +462,12 @@
/*
- * Use the horizontal metrics to fake the vertical metrics.
- * If `advance' is zero, it is also faked.
+ * Use the horizontal metrics to synthesize the vertical metrics.
+ * If `advance' is zero, it is also synthesized.
*/
FT_BASE( void )
- ft_fake_vertical_metrics( FT_Glyph_Metrics* metrics,
- FT_Pos advance );
+ ft_synthesize_vertical_metrics( FT_Glyph_Metrics* metrics,
+ FT_Pos advance );
/*
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -2042,8 +2042,8 @@
/* documentation is in ftobjs.h */
FT_BASE_DEF( void )
- ft_fake_vertical_metrics( FT_Glyph_Metrics* metrics,
- FT_Pos advance )
+ ft_synthesize_vertical_metrics( FT_Glyph_Metrics* metrics,
+ FT_Pos advance )
{
/* the factor 1.2 is a heuristical value */
if ( !advance )
--- a/src/bdf/bdfdrivr.c
+++ b/src/bdf/bdfdrivr.c
@@ -712,8 +712,8 @@
* XXX DWIDTH1 and VVECTOR should be parsed and
* used here, provided such fonts do exist.
*/
- ft_fake_vertical_metrics( &slot->metrics,
- face->bdffont->bbx.height << 6 );
+ ft_synthesize_vertical_metrics( &slot->metrics,
+ face->bdffont->bbx.height << 6 );
Exit:
return error;
--- a/src/cff/cffgload.c
+++ b/src/cff/cffgload.c
@@ -2699,8 +2699,8 @@
if ( has_vertical_info )
metrics->vertBearingX = -metrics->width / 2;
else
- ft_fake_vertical_metrics( metrics,
- metrics->vertAdvance );
+ ft_synthesize_vertical_metrics( metrics,
+ metrics->vertAdvance );
}
}
--- a/src/cid/cidgload.c
+++ b/src/cid/cidgload.c
@@ -401,8 +401,8 @@
metrics->horiBearingY = cbox.yMax;
/* make up vertical ones */
- ft_fake_vertical_metrics( metrics,
- metrics->vertAdvance );
+ ft_synthesize_vertical_metrics( metrics,
+ metrics->vertAdvance );
}
}
--- a/src/pcf/pcfdrivr.c
+++ b/src/pcf/pcfdrivr.c
@@ -531,9 +531,9 @@
metric->leftSideBearing ) << 6;
slot->metrics.height = bitmap->rows << 6;
- ft_fake_vertical_metrics( &slot->metrics,
- ( face->accel.fontAscent +
- face->accel.fontDescent ) << 6 );
+ ft_synthesize_vertical_metrics( &slot->metrics,
+ ( face->accel.fontAscent +
+ face->accel.fontDescent ) << 6 );
FT_TRACE4(( " --- ok\n" ));
--- a/src/type1/t1gload.c
+++ b/src/type1/t1gload.c
@@ -359,8 +359,8 @@
metrics->horiBearingY = cbox.yMax;
/* make up vertical ones */
- ft_fake_vertical_metrics( metrics,
- metrics->vertAdvance );
+ ft_synthesize_vertical_metrics( metrics,
+ metrics->vertAdvance );
}
/* Set control data to the glyph charstrings. Note that this is */
--- a/src/winfonts/winfnt.c
+++ b/src/winfonts/winfnt.c
@@ -724,8 +724,8 @@
slot->metrics.horiBearingX = 0;
slot->metrics.horiBearingY = slot->bitmap_top << 6;
- ft_fake_vertical_metrics( &slot->metrics,
- bitmap->rows << 6 );
+ ft_synthesize_vertical_metrics( &slot->metrics,
+ bitmap->rows << 6 );
Exit:
return error;