unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "John Hamelink" <me@johnhame.link>, Adam Porter <adam@alphapapa.net>
Cc: 70055@debbugs.gnu.org
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	[thread overview]
Message-ID: <86v84u3ktq.fsf@gnu.org> (raw)
In-Reply-To: <03f54626-9407-47b5-b87d-5ef2dc2ec6db@app.fastmail.com> (me@johnhame.link)

> 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	other threads:[~2024-04-06  9:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-28 13:26 bug#70055: 30.0.50; Column uniformity when using vtable with a variable-pitch font John Hamelink
2024-04-06  9:24 ` Eli Zaretskii [this message]
2024-04-07  1:22   ` Adam Porter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86v84u3ktq.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=70055@debbugs.gnu.org \
    --cc=adam@alphapapa.net \
    --cc=me@johnhame.link \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).