diff options
| author | Po Lu | 2023-11-03 15:20:04 +0800 |
|---|---|---|
| committer | Po Lu | 2023-11-03 15:20:04 +0800 |
| commit | 9867be2f6c2f9a94aa4778d72b598717a0925d73 (patch) | |
| tree | 3bf09643021f4fd674c67ea8c97c15efc8276ddf | |
| parent | e06e61f45615f66d5e32fa23ea7ede7c4da77fda (diff) | |
| download | emacs-9867be2f6c2f9a94aa4778d72b598717a0925d73.tar.gz emacs-9867be2f6c2f9a94aa4778d72b598717a0925d73.zip | |
Round underline position and thickness
* src/sfntfont.c (sfntfont_open): Round underline thickness
instead of truncating it, as is proper according to several
inquiries.
| -rw-r--r-- | src/sfntfont.c | 4 |
1 files 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, | |||
| 3287 | { | 3287 | { |
| 3288 | font_info->font.underline_position | 3288 | font_info->font.underline_position |
| 3289 | = sfnt_coerce_fixed (-desc->underline_position | 3289 | = sfnt_coerce_fixed (-desc->underline_position |
| 3290 | * font_info->scale); | 3290 | * font_info->scale) + 0.5; |
| 3291 | font_info->font.underline_thickness | 3291 | font_info->font.underline_thickness |
| 3292 | = sfnt_coerce_fixed (desc->underline_thickness | 3292 | = sfnt_coerce_fixed (desc->underline_thickness |
| 3293 | * font_info->scale); | 3293 | * font_info->scale) + 0.5; |
| 3294 | } | 3294 | } |
| 3295 | 3295 | ||
| 3296 | /* Now try to set up grid fitting for this font. */ | 3296 | /* Now try to set up grid fitting for this font. */ |