[sfnt] Return proper scaling values for SBIX bitmaps.

Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>.

* src/sfnt/ttsbit.c (tt_face_load_strike_metrics): Implement it.
This commit is contained in:
Werner Lemberg 2017-05-15 21:26:01 +02:00
parent 6e5445a232
commit 5efda13f60
2 changed files with 17 additions and 0 deletions

View File

@ -1,3 +1,11 @@
2017-05-15 Werner Lemberg <wl@gnu.org>
[sfnt] Return proper scaling values for SBIX bitmaps.
Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>.
* src/sfnt/ttsbit.c (tt_face_load_strike_metrics): Implement it.
2017-05-15 Werner Lemberg <wl@gnu.org>
[truetype] Fix error handling for embedded bitmaps.

View File

@ -448,6 +448,15 @@
metrics->max_advance =
FT_MulDiv( hori->advance_Width_Max, ppem_ * 64, upem );
/* set the scale values (in 16.16 units) so advances */
/* from the hmtx and vmtx table are scaled correctly */
metrics->x_scale = FT_MulDiv( metrics->x_ppem,
64 * 0x10000,
face->header.Units_Per_EM );
metrics->y_scale = FT_MulDiv( metrics->y_ppem,
64 * 0x10000,
face->header.Units_Per_EM );
return error;
}