From 7609fbba472a767849a34ca68b21ceaeccee9565 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sat, 20 Mar 2021 15:32:31 +0100 Subject: term: increase/decrease custom line-height with font size changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When the user has set a custom line-height, we now adjust it when increasing/decreasing (“zooming”) the font size at run-time. Previously, the line-height was fixed at the size specified in foot.ini. --- terminal.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'terminal.h') diff --git a/terminal.h b/terminal.h index 044fc581..6cf52522 100644 --- a/terminal.h +++ b/terminal.h @@ -261,6 +261,12 @@ struct url { }; typedef tll(struct url) url_list_t; +/* If px != 0 then px is valid, otherwise pt is valid */ +struct pt_or_px { + int16_t px; + float pt; +}; + struct terminal { struct fdm *fdm; struct reaper *reaper; @@ -312,6 +318,7 @@ struct terminal { struct fcft_font *fonts[4]; struct config_font *font_sizes[4]; + struct pt_or_px font_line_height; float font_dpi; int font_scale; int16_t font_x_ofs; -- cgit v1.3