+ fix: space-width, avgchar-width and tab-width calculation

This commit is contained in:
Rainer Kottenhoff 2021-05-11 14:25:55 +02:00
parent cbb622465e
commit dc9291dd6b

View File

@ -338,9 +338,8 @@ void ViewStyle::Refresh(Surface &surface, int tabInChars) {
someStylesForceCase = std::any_of(styles.cbegin(), styles.cend(),
[](const Style &style) noexcept { return style.caseForce != Style::CaseForce::mixed; });
// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
spaceWidth = surface.WidthText(styles[STYLE_DEFAULT].font.get(), " ");
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
aveCharWidth = styles[STYLE_DEFAULT].aveCharWidth;
spaceWidth = styles[STYLE_DEFAULT].spaceWidth;
tabWidth = spaceWidth * tabInChars;
controlCharWidth = 0.0;