diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c index 0d8f271c6..796811b39 100644 --- a/src/truetype/ttgload.c +++ b/src/truetype/ttgload.c @@ -2736,9 +2736,7 @@ #endif !face->postscript.isFixedPitch ) { - loader->widthp = tt_face_get_device_metrics( face, - size->metrics->x_ppem, - 0 ); + loader->widthp = size->widthp; } else loader->widthp = NULL; diff --git a/src/truetype/ttobjs.c b/src/truetype/ttobjs.c index 93fc54844..5c07b7a2f 100644 --- a/src/truetype/ttobjs.c +++ b/src/truetype/ttobjs.c @@ -1435,6 +1435,8 @@ size->ttmetrics.y_ratio = 0x10000L; } + size->widthp = tt_face_get_device_metrics( face, size_metrics->x_ppem, 0 ); + size->metrics = size_metrics; #ifdef TT_USE_BYTECODE_INTERPRETER diff --git a/src/truetype/ttobjs.h b/src/truetype/ttobjs.h index fd7237872..1c4b5851f 100644 --- a/src/truetype/ttobjs.h +++ b/src/truetype/ttobjs.h @@ -282,6 +282,8 @@ FT_BEGIN_HEADER TT_Size_Metrics ttmetrics; + FT_Byte* widthp; /* glyph widths from the hdmx table */ + FT_ULong strike_index; /* 0xFFFFFFFF to indicate invalid */ #ifdef TT_USE_BYTECODE_INTERPRETER