Commit 8768f605 authored by Alexandre Julliard's avatar Alexandre Julliard

gdi32: Store scale as an integer.

parent fe6bb5f7
......@@ -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 ))
{
......
......@@ -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;
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment