mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-01 11:08:45 +00:00
gdiplus: If the font unit is not pixels scaling should not be applied.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru> Signed-off-by: Vincent Povirk <vincent@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
1802ca5e34
commit
b7ca0bc043
1 changed files with 6 additions and 0 deletions
|
@ -2276,6 +2276,12 @@ static void get_font_hfont(GpGraphics *graphics, GDIPCONST GpFont *font,
|
|||
(pt[1].X-pt[0].X)*(pt[1].X-pt[0].X));
|
||||
rel_height = sqrt((pt[2].Y-pt[0].Y)*(pt[2].Y-pt[0].Y)+
|
||||
(pt[2].X-pt[0].X)*(pt[2].X-pt[0].X));
|
||||
/* If the font unit is not pixels scaling should not be applied */
|
||||
if (font->unit != UnitPixel && font->unit != UnitWorld)
|
||||
{
|
||||
rel_width /= graphics->scale;
|
||||
rel_height /= graphics->scale;
|
||||
}
|
||||
|
||||
get_log_fontW(font, graphics, &lfw);
|
||||
lfw.lfHeight = -gdip_round(font_height * rel_height);
|
||||
|
|
Loading…
Reference in a new issue