From c3c62cbb60d7f8b98a6b5752efad37f9ba70aad9 Mon Sep 17 00:00:00 2001 From: Neil Date: Wed, 12 Apr 2017 17:37:25 +1000 Subject: For speed, store height of capital letters in FontMeasurements so not recalculated for every character blob. --- src/ViewStyle.cxx | 1 + 1 file changed, 1 insertion(+) (limited to 'src/ViewStyle.cxx') 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(surface.Ascent(font)); descent = static_cast(surface.Descent(font)); + capitalHeight = surface.Ascent(font) - surface.InternalLeading(font); aveCharWidth = surface.AverageCharWidth(font); spaceWidth = surface.WidthChar(font, ' '); } -- cgit v1.2.3