From: Po Lu Date: Fri, 3 Nov 2023 07:20:04 +0000 (+0800) Subject: Round underline position and thickness X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9867be2f6c2f9a94aa4778d72b598717a0925d73;p=emacs.git Round underline position and thickness * src/sfntfont.c (sfntfont_open): Round underline thickness instead of truncating it, as is proper according to several inquiries. --- 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. */