From 505a8527964a09b139ed3ef13923b7c8c3b42228 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sun, 7 Aug 2011 14:18:37 +1000 Subject: Move scaling of font to pixels up into platform-independent code. --- src/ViewStyle.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/ViewStyle.cxx b/src/ViewStyle.cxx index b46cd9eb4..b722f8d02 100644 --- a/src/ViewStyle.cxx +++ b/src/ViewStyle.cxx @@ -92,8 +92,8 @@ void FontRealised::Realise(Surface &surface, int zoomLevel) { if (sizeZoomed <= 2 * SC_FONT_SIZE_MULTIPLIER) // Hangs if sizeZoomed <= 1 sizeZoomed = 2 * SC_FONT_SIZE_MULTIPLIER; - int deviceHeight = surface.DeviceHeightFont(sizeZoomed); - font.Create(fontName, characterSet, deviceHeight, weight, italic, extraFontFlag); + float deviceHeight = surface.DeviceHeightFont(sizeZoomed); + font.Create(fontName, characterSet, deviceHeight / SC_FONT_SIZE_MULTIPLIER, weight, italic, extraFontFlag); ascent = surface.Ascent(font); descent = surface.Descent(font); -- cgit v1.2.3