From e1a52e49814cb1ab2efcdbd65dcb9a83976c2a54 Mon Sep 17 00:00:00 2001 From: Neil Date: Sun, 12 Sep 2021 17:15:34 +1000 Subject: Make negative settings for extra ascent and descent safer by ensuring calculated ascent and thus line height is at least 1 pixel. Allow 1 point font minimum instead of 2 as this may help with document maps. Document negative extra ascent and descent. Use XYPOSITION for ascent and descent for more coherent types and fewer casts but floor the values when retrieving from Surface so behaviour is unchanged. --- src/ViewStyle.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ViewStyle.h') diff --git a/src/ViewStyle.h b/src/ViewStyle.h index edebee7ce..f6d1bdbb4 100644 --- a/src/ViewStyle.h +++ b/src/ViewStyle.h @@ -122,8 +122,8 @@ public: Scintilla::Technology technology; int lineHeight; int lineOverlap; - unsigned int maxAscent; - unsigned int maxDescent; + XYPOSITION maxAscent; + XYPOSITION maxDescent; XYPOSITION aveCharWidth; XYPOSITION spaceWidth; XYPOSITION tabWidth; -- cgit v1.2.3