aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Style.h
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2021-09-12 17:15:34 +1000
committerNeil <nyamatongwe@gmail.com>2021-09-12 17:15:34 +1000
commite1a52e49814cb1ab2efcdbd65dcb9a83976c2a54 (patch)
treec811e2fdd4f46e0dc955d71fba87a4f46e65be40 /src/Style.h
parent3d017cb655c23d9dfb39cbecbcaddaf14bb25117 (diff)
downloadscintilla-mirror-e1a52e49814cb1ab2efcdbd65dcb9a83976c2a54.tar.gz
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.
Diffstat (limited to 'src/Style.h')
-rw-r--r--src/Style.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Style.h b/src/Style.h
index a3ce336ed..14112e092 100644
--- a/src/Style.h
+++ b/src/Style.h
@@ -27,8 +27,8 @@ struct FontSpecification {
};
struct FontMeasurements {
- unsigned int ascent = 1;
- unsigned int descent = 1;
+ XYPOSITION ascent = 1;
+ XYPOSITION descent = 1;
XYPOSITION capitalHeight = 1; // Top of capital letter to baseline: ascent - internal leading
XYPOSITION aveCharWidth = 1;
XYPOSITION spaceWidth = 1;