From 9867be2f6c2f9a94aa4778d72b598717a0925d73 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Fri, 3 Nov 2023 15:20:04 +0800 Subject: [PATCH] Round underline position and thickness * src/sfntfont.c (sfntfont_open): Round underline thickness instead of truncating it, as is proper according to several inquiries. --- src/sfntfont.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sfntfont.c b/src/sfntfont.c index 80fbde9772c..39b250ac11e 100644 --- a/src/sfntfont.c +++ b/src/sfntfont.c @@ -3287,10 +3287,10 @@ sfntfont_open (struct frame *f, Lisp_Object font_entity, { font_info->font.underline_position = sfnt_coerce_fixed (-desc->underline_position - * font_info->scale); + * font_info->scale) + 0.5; font_info->font.underline_thickness = sfnt_coerce_fixed (desc->underline_thickness - * font_info->scale); + * font_info->scale) + 0.5; } /* Now try to set up grid fitting for this font. */ -- 2.39.2