bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#70055: 30.0.50; Column uniformity when using vtable with a variable-


From: Eli Zaretskii
Subject: 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@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?





reply via email to

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