emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 9867be2f6c2: Round underline position and thickness


From: Po Lu
Subject: master 9867be2f6c2: Round underline position and thickness
Date: Fri, 3 Nov 2023 03:20:17 -0400 (EDT)

branch: master
commit 9867be2f6c2f9a94aa4778d72b598717a0925d73
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    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.  */



reply via email to

[Prev in Thread] Current Thread [Next in Thread]