GNU bug report logs - #70055
30.0.50; Column uniformity when using vtable with a variable-pitch font

Previous Next

Package: emacs;

Reported by: "John Hamelink" <me <at> johnhame.link>

Date: Thu, 28 Mar 2024 13:28:01 UTC

Severity: normal

Found in version 30.0.50

Full log


Message #8 received at 70055 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: "John Hamelink" <me <at> johnhame.link>, Adam Porter <adam <at> alphapapa.net>
Cc: 70055 <at> debbugs.gnu.org
Subject: Re: bug#70055: 30.0.50;
 Column uniformity when using vtable with a variable-pitch font
Date: Sat, 06 Apr 2024 12:24:33 +0300
> Date: Thu, 28 Mar 2024 13:26:46 +0000
> From: "John Hamelink" <me <at> johnhame.link>
> 
> Hi there, I'm having an issue where the uniformity of columns displayed
> in a vtable is disrupted when I use a variable-pitch font. I've produced
> a minimal example which can be run with emacs -Q:
> 
> (require 'vtable)
> 
> (defun build-sample-vtable ()
>   "Build an example VTable."
> 
>   (make-vtable
>    :objects '(("" "Ruby" "2024-03-27 13:04:46" "2024-03-27 13:04:46")
>               ("" "Emacs" "2024-03-27 13:04:46" "2024-03-27 13:04:46")
>               ("" "Exercism [Elisp]" "2024-03-27 13:04:46" "2024-03-27 13:04:46")
>               ("" "Nix" "2024-03-27 13:04:46" "2024-03-27 13:04:46"))
>    :columns
>    `((:name "Active" :primary descend)
>      (:name "Name")
>      (:name "Last saved")
>      (:name "Default saved"))
>    :sort-by '((2 . descend) (0 . descend))))
> 
> (set-face-attribute 'fixed-pitch nil
>                         :font "Iosevka Comfy Wide Motion Fixed"
>                         :height 160)
> 
> (set-face-attribute 'default nil
>                         :font "Iosevka"
>                         :weight 'regular
>                         :height 160)
> 
> (switch-to-buffer (generate-new-buffer "without-variable-font"))
> (build-sample-vtable)
> 
> (with-selected-frame (make-frame)
>   (switch-to-buffer (generate-new-buffer "with-variable-font"))
>   (face-remap-add-relative
>    'variable-pitch  nil
>    '(:font "ETBembo" :weight 'thin :height 120))
>   (build-sample-vtable))
> 
> When I run this, it produces output as shown in the attached screenshot.

You use face-remap-add-relative, but you also use absolute height
values for the fonts.  I don't think face-remapping will work in these
situations, because for it to work the font heights must be defined in
relative terms, not absolute terms.

Adam, am I missing something here?  Is this specific to vtable?




This bug report was last modified 1 year and 73 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.