unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Protesilaos Stavrou <info@protesilaos.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: [ELPA] Add fontaine package?
Date: Thu, 28 Apr 2022 11:23:56 +0300	[thread overview]
Message-ID: <877d79d3ab.fsf@protesilaos.com> (raw)
In-Reply-To: <83o80lbpy8.fsf@gnu.org>

> From: Eli Zaretskii <eliz@gnu.org>
> Date: Thu, 28 Apr 2022 10:57:19 +0300
>
>> From: Protesilaos Stavrou <info@protesilaos.com>
>> Date: Wed, 27 Apr 2022 11:03:23 +0300
>> 
>> I have a new package called "fontaine" that I would like to offer to the
>> FSF for inclusion in GNU ELPA (see attached patch).  Conceptually, this
>> is similar to the 'cursory' package I submitted last week: the user
>> defines presets of font configurations and can switch between them on
>> demand.
>> 
>> This can be useful for someone who, for example, likes compact fonts
>> while typing and more spacious ones for reading or doing a presentation.
>> 
>> Do you think this can be added to the package archive?  Any further
>> comments?
>
> I have some comments on the package's code:

Thank you!

>  . It uses internal-set-lisp-face-attribute, which is an internal
>    primitive, something I'd suggest to avoid.  Why can't it use
>    set-lisp-face-attribute instead?

I do not have 'set-lisp-face-attribute' on my end (Emacs 29, GNU/Linux).
I ran a grep in the emacs.git repo and still did not find it.  It
returns this:

    lisp/ChangeLog.14:10815:	(internal-set-lisp-face-attribute-from-resource, x-bitmap-file-path)
    lisp/ChangeLog.15:13166:	internal-set-lisp-face-attribute with 'unspecified family and
    lisp/ChangeLog.9:12148:	internal-set-lisp-face-attribute with FRAME being 0.
    lisp/faces.el:384:(declare-function internal-set-lisp-face-attribute-from-resource "xfaces.c"
    lisp/faces.el:397:	  (internal-set-lisp-face-attribute-from-resource
    lisp/faces.el:860:	(internal-set-lisp-face-attribute face :family (purecopy family)
    lisp/faces.el:863:	(internal-set-lisp-face-attribute face :foundry (purecopy foundry)
    lisp/faces.el:867:	(internal-set-lisp-face-attribute face (car args)
    src/ChangeLog.11:6863:	internal-set-lisp-face-attribute.  Initialize screen colors from
    src/xfaces.c:3011:DEFUN ("internal-set-lisp-face-attribute", Finternal_set_lisp_face_attribute,
    src/xfaces.c:3780:DEFUN ("internal-set-lisp-face-attribute-from-resource",

Otherwise I am happy to follow your suggestion.

>  . For some reason, customization of the bold-italic face is not
>    supported, whereas that of bold and italic is supported.  Why is
>    that?

I will cover it as well.

>  . The documentation should IMO explain that the font settings are
>    only for the ASCII characters; for non-ASCII characters Emacs will
>    still use fonts from the fontset, which probably belong to
>    different families.

Indeed.  Perhaps a future version of the package could extend to
fontsets, but that needs to be considered.

>  . Specifying default weight that is other than 'normal'/'regular',
>    'bold', or 'italic' will not work on MS-Windows.  I think this
>    should be at least documented.

I did not know that.  Will cover it in the documentation.

>  . On MS-Windows, fontaine--family-list-variable-pitch returns nil,
>    whereas fontaine--family-list-fixed-pitch returns a list of font
>    families that include both fixed-pitch and variable-pitch fonts.
>    That was due to a bug (which is now fixed on master), but this will
>    not work reliably in older versions of Emacs.

Is there something we can do about this beside documenting it?

>  . IME, the list of fonts returned by x-family-fonts may include fonts
>    that aren't appropriate for use by Emacs, so caveat emptor.

I expected as much.  Is there some way to find only the appropriate
ones?  Otherwise I will clarify this point in the docs.

-- 
Protesilaos Stavrou
https://protesilaos.com



  reply	other threads:[~2022-04-28  8:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-27  8:03 [ELPA] Add fontaine package? Protesilaos Stavrou
2022-04-27 17:00 ` Stefan Monnier
2022-04-28  5:37   ` Protesilaos Stavrou
2022-04-28  3:18 ` Richard Stallman
2022-04-28  5:47   ` Protesilaos Stavrou
2022-04-28  7:57 ` Eli Zaretskii
2022-04-28  8:23   ` Protesilaos Stavrou [this message]
2022-04-28  9:41     ` Eli Zaretskii
2022-04-29  7:02       ` Protesilaos Stavrou
2022-04-29  7:15         ` Eli Zaretskii
2022-04-29  7:23           ` Protesilaos Stavrou
2022-04-29  7:40             ` Eli Zaretskii
2022-04-29  7:56               ` Protesilaos Stavrou

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=877d79d3ab.fsf@protesilaos.com \
    --to=info@protesilaos.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /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).