summaryrefslogtreecommitdiff
path: root/src/truetype
diff options
context:
space:
mode:
authorWerner Lemberg <wl@gnu.org>2013-12-10 08:38:57 +0100
committerWerner Lemberg <wl@gnu.org>2013-12-10 08:38:57 +0100
commit05c786d990390a7ca18e62962641dac740bacb06 (patch)
tree54ccca223ddccbc57299325b067fb9d99ab35fa9 /src/truetype
parentdd8050aa79ac8936f880ccedb66f58f99a9a3573 (diff)
downloadfreetype2-05c786d990390a7ca18e62962641dac740bacb06.tar.gz
[truetype] Fix positioning of composite glyphs.
Problem reported by Nigel Tao <nigeltao@golang.org>. * src/truetype/ttgload.c (TT_Hint_Glyph): Remove code that shifts the glyph (component) by a fractional value computed from the LSB phantom point. This is wrong, since the horizontal phantom points get rounded horizontally later on.
Diffstat (limited to 'src/truetype')
-rw-r--r--src/truetype/ttgload.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c
index 0d74248b8..f4081a021 100644
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -738,7 +738,6 @@
#endif
TT_GlyphZone zone = &loader->zone;
- FT_Pos origin;
#ifdef TT_USE_BYTECODE_INTERPRETER
FT_UInt n_ins;
@@ -755,14 +754,7 @@
loader->glyph->control_len ));
}
n_ins = (FT_UInt)( loader->glyph->control_len );
-#endif
-
- origin = zone->cur[zone->n_points - 4].x;
- origin = FT_PIX_ROUND( origin ) - origin;
- if ( origin )
- translate_array( zone->n_points, zone->cur, origin, 0 );
-#ifdef TT_USE_BYTECODE_INTERPRETER
/* save original point position in org */
if ( n_ins > 0 )
FT_ARRAY_COPY( zone->org, zone->cur, zone->n_points );
@@ -1286,8 +1278,8 @@
* pp1 = (round(xmin - lsb), 0) ,
* pp2 = (round(pp1 + aw), 0) .
*
- * Note that the rounding to the grid is not documented currently in the
- * specification.
+ * Note that the rounding to the grid (in the device space) is not
+ * documented currently in the specification.
*
* However, the specification lacks the precise definition of vertical
* phantom points. Greg Hitchcock provided the following explanation.