diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2021-01-07 16:00:58 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-01-11 08:31:08 +0000 |
| commit | a6fc8b5da4a3bfc9b1d3994797826518103879ac (patch) | |
| tree | 7ee4333c53847900a895b566d5414ee375ba23fd /render.c | |
| parent | config: str_to_color(): use LOG_AND_NOTIFY(), not just LOG() (diff) | |
config: line-height, letter-spacing: values are in pt by default, but we allow px
If the value is specified without a unit, then the value is assumed to
be in points, subject to DPI scaling.
The value can optionally have a ‘px’ suffix, in which case the value
is treated as a raw pixel count.
Diffstat (limited to 'render.c')
| -rw-r--r-- | render.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -256,7 +256,7 @@ color_dim_for_search(pixman_color_t *color) static inline int font_baseline(const struct terminal *term) { - return term->conf->vertical_letter_offset + term->fonts[0]->ascent; + return term->font_y_ofs + term->fonts[0]->ascent; } static void @@ -541,7 +541,7 @@ render_cell(struct terminal *term, pixman_image_t *pix, pixman_image_t *clr_pix = pixman_image_create_solid_fill(&fg); if (glyph != NULL) { - const int letter_x_ofs = term->conf->horizontal_letter_offset; + const int letter_x_ofs = term->font_x_ofs; if (unlikely(pixman_image_get_format(glyph->pix) == PIXMAN_a8r8g8b8)) { /* Glyph surface is a pre-rendered image (typically a color emoji...) */ @@ -1693,7 +1693,7 @@ render_osd(struct terminal *term, struct fcft_font *font = term->fonts[0]; pixman_color_t fg = color_hex_to_pixman(_fg); - const int x_ofs = term->conf->horizontal_letter_offset; + const int x_ofs = term->font_x_ofs; for (size_t i = 0; i < wcslen(text); i++) { const struct fcft_glyph *glyph = fcft_glyph_rasterize( @@ -2272,7 +2272,7 @@ render_search_box(struct terminal *term) struct fcft_font *font = term->fonts[0]; const int x_left = width - visible_width + margin; - const int x_ofs = term->conf->horizontal_letter_offset; + const int x_ofs = term->font_x_ofs; int x = x_left; int y = margin; pixman_color_t fg = color_hex_to_pixman(term->colors.table[0]); |
