summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWerner Lemberg <wl@gnu.org>2017-12-18 09:41:17 +0100
committerWerner Lemberg <wl@gnu.org>2017-12-18 09:41:17 +0100
commitd062c54ce7f2c2bb98906f866755d214c4a73735 (patch)
tree290b567d1507d7071152878162b49e643ae0fde5 /src
parente7935f29103596751ffda3ee7adea04a0c47050f (diff)
downloadfreetype2-d062c54ce7f2c2bb98906f866755d214c4a73735.tar.gz
[truetype] Fix previous commit.
* src/truetype/ttgload.c (TT_Process_Simple_Glyph): Correctly handle unhinted phantom points, which must be properly scaled.
Diffstat (limited to 'src')
-rw-r--r--src/truetype/ttgload.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c
index 4b5af854d..01f2f26fe 100644
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -801,7 +801,7 @@
{
FT_TRACE1(( "TT_Hint_Glyph: too long instructions" ));
FT_TRACE1(( " (0x%lx byte) is truncated\n",
- loader->glyph->control_len ));
+ loader->glyph->control_len ));
}
n_ins = loader->glyph->control_len;
@@ -1041,7 +1041,8 @@
#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
/* if we have a HVAR table, `pp1' and/or `pp2' are already adjusted */
- if ( !( loader->face->variation_support & TT_FACE_FLAG_VAR_HADVANCE ) )
+ if ( !( loader->face->variation_support & TT_FACE_FLAG_VAR_HADVANCE ) ||
+ !IS_HINTED( loader->load_flags ) )
#endif
{
loader->pp1 = outline->points[n_points - 4];
@@ -1050,7 +1051,8 @@
#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
/* if we have a VVAR table, `pp3' and/or `pp4' are already adjusted */
- if ( !( loader->face->variation_support & TT_FACE_FLAG_VAR_VADVANCE ) )
+ if ( !( loader->face->variation_support & TT_FACE_FLAG_VAR_VADVANCE ) ||
+ !IS_HINTED( loader->load_flags ) )
#endif
{
loader->pp3 = outline->points[n_points - 2];
@@ -1418,6 +1420,7 @@
TT_Driver driver = (TT_Driver)FT_FACE_DRIVER( loader->face );
#endif
+
#ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
if ( driver->interpreter_version == TT_INTERPRETER_VERSION_38 )
{