Fix modify_font not working for strikethrough position

Fixes #5946
This commit is contained in:
Kovid Goyal 2023-02-01 08:14:54 +05:30
parent 5a997a5f7a
commit 6ea812679f
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 6 additions and 1 deletions

View File

@ -35,6 +35,11 @@ mouse anywhere in the current command to move the cursor there. See
Detailed list of changes
-------------------------------------
0.27.1 [future]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Fix :opt:`modify_font` not working for strikethrough position (:iss:`5946`)
0.27.0 [2023-01-31]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@ -387,7 +387,7 @@ calc_cell_metrics(FontGroup *fg) {
int adjustment = baseline - baseline_before;
baseline = adjust_ypos(baseline_before, cell_height, adjustment);
underline_position = adjust_ypos(underline_position, cell_height, adjustment);
strikethrough_position = adjust_ypos(underline_position, cell_height, adjustment);
strikethrough_position = adjust_ypos(strikethrough_position, cell_height, adjustment);
}
underline_position = MIN(cell_height - 1, underline_position);