aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2011-08-07 14:18:37 +1000
committernyamatongwe <devnull@localhost>2011-08-07 14:18:37 +1000
commit113e4a09052842f129114abc7350f72401cd1198 (patch)
tree9e7306d69603198626e68aaddd6f6d37903e585f /src
parentb510d1fe619eff95c7e0d0a88421b8e3cad8f729 (diff)
downloadscintilla-mirror-113e4a09052842f129114abc7350f72401cd1198.tar.gz
Move scaling of font to pixels up into platform-independent code.
Diffstat (limited to 'src')
-rw-r--r--src/ViewStyle.cxx4
1 files changed, 2 insertions, 2 deletions
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);