aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ViewStyle.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2017-04-12 17:37:25 +1000
committerNeil <nyamatongwe@gmail.com>2017-04-12 17:37:25 +1000
commitc3c62cbb60d7f8b98a6b5752efad37f9ba70aad9 (patch)
tree8a0e38e0f120758914e4cdd2f1ec31428427d6af /src/ViewStyle.cxx
parentdb5e774317693f915567714d6bc393dddef1b004 (diff)
downloadscintilla-mirror-c3c62cbb60d7f8b98a6b5752efad37f9ba70aad9.tar.gz
For speed, store height of capital letters in FontMeasurements so not
recalculated for every character blob.
Diffstat (limited to 'src/ViewStyle.cxx')
-rw-r--r--src/ViewStyle.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/ViewStyle.cxx b/src/ViewStyle.cxx
index 354124cd1..39661ddc2 100644
--- a/src/ViewStyle.cxx
+++ b/src/ViewStyle.cxx
@@ -86,6 +86,7 @@ void FontRealised::Realise(Surface &surface, int zoomLevel, int technology, cons
ascent = static_cast<unsigned int>(surface.Ascent(font));
descent = static_cast<unsigned int>(surface.Descent(font));
+ capitalHeight = surface.Ascent(font) - surface.InternalLeading(font);
aveCharWidth = surface.AverageCharWidth(font);
spaceWidth = surface.WidthChar(font, ' ');
}