* 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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164
diff --git a/ChangeLog b/ChangeLog
index 76236b1..931a533 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
2006-01-15 Chia-I Wu <b90201047@ntu.edu.tw>
+ * 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 <b90201047@ntu.edu.tw>
+
* include/freetype/internal/ftobjs.h (ft_fake_vertical_metrics),
src/base/ftobjs.c (ft_fake_vertical_metrics): New function to fake
vertical metrics.
diff --git a/docs/CHANGES b/docs/CHANGES
index 5bfdf7d..fb55d89 100644
--- a/docs/CHANGES
+++ b/docs/CHANGES
@@ -98,6 +98,11 @@ LATEST CHANGES BETWEEN 2.2.0 and 2.1.10
- 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.
diff --git a/include/freetype/internal/ftobjs.h b/include/freetype/internal/ftobjs.h
index a6c6aae..c780732 100644
--- a/include/freetype/internal/ftobjs.h
+++ b/include/freetype/internal/ftobjs.h
@@ -462,12 +462,12 @@ FT_BEGIN_HEADER
/*
- * 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 );
/*
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index 4001a48..5954257 100644
--- 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 )
diff --git a/src/bdf/bdfdrivr.c b/src/bdf/bdfdrivr.c
index a70f8a2..7611e9a 100644
--- a/src/bdf/bdfdrivr.c
+++ b/src/bdf/bdfdrivr.c
@@ -712,8 +712,8 @@ THE SOFTWARE.
* 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;
diff --git a/src/cff/cffgload.c b/src/cff/cffgload.c
index f66fe24..13cdfa7 100644
--- 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 );
}
}
diff --git a/src/cid/cidgload.c b/src/cid/cidgload.c
index dc3429a..ed706ad 100644
--- 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 );
}
}
diff --git a/src/pcf/pcfdrivr.c b/src/pcf/pcfdrivr.c
index f28854b..c0fe230 100644
--- a/src/pcf/pcfdrivr.c
+++ b/src/pcf/pcfdrivr.c
@@ -531,9 +531,9 @@ THE SOFTWARE.
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" ));
diff --git a/src/type1/t1gload.c b/src/type1/t1gload.c
index 32d760f..2819000 100644
--- 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 */
diff --git a/src/winfonts/winfnt.c b/src/winfonts/winfnt.c
index 376fde3..eabf946 100644
--- 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;