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:23:43 +0300

> From: Eli Zaretskii <eliz@gnu.org>
> Date: Fri,  6 Sep 2024 09:12:05 +0300

> [... 15 lines elided]

>> > Do we really need fc-list? can't we use the built-in x-family-fonts
>> > instead?
>> 
>> I thought that function was only for X. It also is defined in a file
>> which again has X in its name. If it works everywhere, then I am happy
>> to use it.
>
> x-family-fonts is defined in xfaces.c, which is not specific to X.
> That function is supported by every font back-end that Emacs can use,
> so it is platform-independent.

Very well! I am experimenting with it right now. It seems to do what I
want. All I need is to figure out how to get/guess the name of a font
based on the file name (ideally without depending on an external program
that may not be installed on the user's end).

> The only disadvantage in using it is that it will only know about font
> families that are installed.  If you intend to support fonts that are
> not installed, you will need something else.  But then fc-list doesn't
> know about uninstalled fonts, either.  Also, fc-list is unlikely to be
> installed on systems that do not run X Window System, anyway.

Yes, I know. It is why I had a TODO for how to make this work on all
systems. But with x-family-fonts we are good to go.

-- 
Protesilaos Stavrou
https://protesilaos.com



reply via email to

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