diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2019-11-30 13:53:22 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2019-11-30 13:53:22 +0000 |
| commit | 90bfcc1fbd8bb53508dc93405add1d8aacb4e7ed (patch) | |
| tree | 161bdcd4a371ff1e318d72068d418a2ced862601 /font.h | |
| parent | render: font_baseline(): simply use the primary font's ascent (diff) | |
render: fix underline/strikeout positioning
There were two errors:
* We subtracted half the line width instead of adding it to the
baseline
* We rounded the line positioning and thickness before the positioning
calculation. In particular, rounding the thickness before using it
to adjust the position was wrong. Now we round just before the
pixman call.
Diffstat (limited to 'font.h')
| -rw-r--r-- | font.h | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -53,13 +53,13 @@ struct font { int max_x_advance; struct { - int position; - int thickness; + double position; + double thickness; } underline; struct { - int position; - int thickness; + double position; + double thickness; } strikeout; bool is_fallback; |
