emacs-devel
[Top][All Lists]
Advanced

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

Re: [ELPA] Add new 'show-font' package?


From: Protesilaos Stavrou
Subject: Re: [ELPA] Add new 'show-font' package?
Date: Fri, 06 Sep 2024 09:45:39 +0300

> From: Philip Kaludercic <philipk@posteo.net>
> Date: Fri,  6 Sep 2024 06:33:26 +0000

> [... 20 lines elided]

>>> Some general comments:  It would be nice to have a command to select a
>>> font.
>>
>> You mean to select a font to preview? This can be done, for sure, though
>> I will need to decouple the preview/presentation from the file-visiting
>> part. In other words, the user selects a font and then we do
>> 'set-face-attribute' of its family across the buffer that we generate.
>> This way, we do not need to know where the font is installed and to
>> visit that file (though that is fine as well).
>
> Is it not possible to look up file name of the font one selects using
> e.g. `completing-read' and opening that with show-font?

I was thinking of the scenario where you have something like this:

    (completing-read "Preview font: " '("Hack" "Source Code Pro" "Iosevka 
Comfy"))

Here we would not have file paths to visit them and enable the major
mode there. But we could still produce a bespoke "*show-font*" buffer
and then fontify it using the selected font family.

[ The names of fonts would come from 'x-family-fonts'. ]

-- 
Protesilaos Stavrou
https://protesilaos.com



reply via email to

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