diff options
-rw-r--r-- | doc/ScintillaHistory.html | 5 | ||||
-rw-r--r-- | src/ViewStyle.cxx | 15 |
2 files changed, 15 insertions, 5 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index fb3a45cc8..5d30b807a 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -593,6 +593,11 @@ <a href="https://sourceforge.net/p/scintilla/bugs/2338/">Bug #2338</a>. </li> <li> + Stop including STYLE_CALLTIP when calculating line height. + Allows a large font to be used for calltips without affecting text display. + <a href="https://sourceforge.net/p/scintilla/bugs/2341/">Bug #2341</a>. + </li> + <li> Fix incorrect display of selection when printing in some modes. <a href="https://sourceforge.net/p/scintilla/bugs/2335/">Bug #2335</a>. </li> diff --git a/src/ViewStyle.cxx b/src/ViewStyle.cxx index 44ca8e59b..25a5f9cad 100644 --- a/src/ViewStyle.cxx +++ b/src/ViewStyle.cxx @@ -711,10 +711,15 @@ FontRealised *ViewStyle::Find(const FontSpecification &fs) { } void ViewStyle::FindMaxAscentDescent() noexcept { - for (const auto &font : fonts) { - if (maxAscent < font.second->measurements.ascent) - maxAscent = font.second->measurements.ascent; - if (maxDescent < font.second->measurements.descent) - maxDescent = font.second->measurements.descent; + for (size_t i = 0; i < styles.size(); i++) { + if (i == StyleCallTip) + continue; + + const auto &style = styles[i]; + + if (maxAscent < style.ascent) + maxAscent = style.ascent; + if (maxDescent < style.descent) + maxDescent = style.descent; } } |