gdi32: Store scale as an integer.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2020-11-05 09:59:32 +01:00
parent fe6bb5f723
commit 8768f60527
3 changed files with 5 additions and 5 deletions

View File

@ -1698,7 +1698,7 @@ static struct gdi_font *alloc_gdi_font( const WCHAR *file, void *data_ptr, SIZE_
font->refcount = 1;
font->matrix.eM11 = font->matrix.eM22 = 1.0;
font->scale_y = 1.0;
font->scale_y = 1;
font->kern_count = -1;
list_init( &font->child_fonts );
@ -3686,8 +3686,8 @@ static struct gdi_font *select_font( LOGFONTW *lf, FMAT2 dcmat, BOOL can_use_bit
/* The jump between unscaled and doubled is delayed by 1 */
else if (scale == 2 && scaled_height - height > (face->size.height / 4 - 1)) scale--;
font->scale_y = scale;
TRACE("font scale y: %d\n", font->scale_y);
}
TRACE("font scale y: %f\n", font->scale_y);
if (!font_funcs->load_font( font ))
{

View File

@ -2308,13 +2308,13 @@ static BOOL get_transform_matrices( struct gdi_font *font, BOOL vertical, const
width_ratio = font->scale_y;
/* Scaling transform */
if (width_ratio != 1.0 || font->scale_y != 1.0)
if (width_ratio != 1.0 || font->scale_y != 1)
{
FT_Matrix scale_mat;
scale_mat.xx = FT_FixedFromFloat( width_ratio );
scale_mat.xy = 0;
scale_mat.yx = 0;
scale_mat.yy = FT_FixedFromFloat( font->scale_y );
scale_mat.yy = font->scale_y << 16;
pFT_Matrix_Multiply( &scale_mat, &matrices[matrix_unrotated] );
needs_transform = TRUE;

View File

@ -335,7 +335,7 @@ struct gdi_font
LOGFONTW lf;
FMAT2 matrix;
UINT face_index;
double scale_y;
INT scale_y;
INT aveWidth;
INT ppem;
SHORT yMax;