ref: 2f0fdb9316120084c9b62647f9a730b11ab90202
parent: e5f98e68bb416fb9735b3c0c54ab83c113a585ba
author: David Turner <[email protected]>
date: Mon Jun 21 17:16:56 EDT 2004
fixing a scaling bug in the TrueType glyph loader that generated ugly artefacts when the TrueType bytecode interpreter was compiled in
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2004-06-21 David Turner <[email protected]>
+
+ * src/base/ftobjs.c: documentation fix
+
+ * src/truetype/ttgload.c: fixing a scaling bug that caused incorrect
+ rendering when the bytecode interpreter was enabled.
+
2004-06-14 Huw D M Davies <[email protected]>
* src/winfonts/winfnt.c (FNT_Face_Init): Set x_ppem and y_ppem
@@ -16,7 +23,7 @@
2004-06-10 David Turner <[email protected]>
* src/base/ftobject.c, src/base/fthash.c, src/base/ftexcept.c,
- src/base/ftsysio.c, src/base/ftsysmem.c, src/base/ftlist.c: Removed.
+ src/base/ftsysio.c, src/base/ftsysmem.c, src/base/ftlist.c: Removed.
Obsolete.
* src/raster/ftraster.c (Alignment, PAlignment): New union to fix
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -1999,7 +1999,7 @@
if ( char_height < 1 * 64 )
char_height = 1 * 64;
- /* Compute pixel sizes in 26.6 units with rounding */
+ /* Compute pixel sizes in 26.6 units */
dim_x = ( char_width * horz_resolution + 36 ) / 72;
dim_y = ( char_height * vert_resolution + 36 ) / 72;
@@ -2006,7 +2006,6 @@
{
FT_UShort x_ppem = (FT_UShort)( ( dim_x + 32 ) >> 6 );
FT_UShort y_ppem = (FT_UShort)( ( dim_y + 32 ) >> 6 );
-
if ( x_ppem == metrics->x_ppem && y_ppem == metrics->y_ppem )
return FT_Err_Ok;
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -206,7 +206,7 @@
*tsb = face->os2.sTypoAscender;
*ah = face->os2.sTypoAscender - face->os2.sTypoDescender;
}
- else
+ else
{
*tsb = face->horizontal.Ascender;
*ah = face->horizontal.Ascender - face->horizontal.Descender;
@@ -778,10 +778,9 @@
{
FT_Vector* vec = zone->cur;
FT_Vector* limit = vec + n_points;
- FT_Fixed x_scale = load->size->metrics.x_scale;
- FT_Fixed y_scale = load->size->metrics.y_scale;
+ FT_Fixed x_scale = ((TT_Size)load->size)->metrics.x_scale;
+ FT_Fixed y_scale = ((TT_Size)load->size)->metrics.y_scale;
-
/* first scale the glyph points */
for ( ; vec < limit; vec++ )
{
@@ -912,8 +911,8 @@
y_scale = 0x10000L;
if ( ( loader->load_flags & FT_LOAD_NO_SCALE ) == 0 )
{
- x_scale = loader->size->metrics.x_scale;
- y_scale = loader->size->metrics.y_scale;
+ x_scale = ((TT_Size)loader->size)->metrics.x_scale;
+ y_scale = ((TT_Size)loader->size)->metrics.y_scale;
}
/* get metrics, horizontal and vertical */