unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: rpluim@gmail.com
Cc: emacs-devel@gnu.org
Subject: Re: When and how to register various font backends
Date: Sat, 15 Jun 2019 12:50:23 +0300	[thread overview]
Message-ID: <83d0jfw528.fsf@gnu.org> (raw)
In-Reply-To: <835zp8xlzo.fsf@gnu.org> (message from Eli Zaretskii on Fri, 14 Jun 2019 17:47:07 +0300)

> Date: Fri, 14 Jun 2019 17:47:07 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: emacs-devel@gnu.org
> 
> > (add-to-list 'default-frame-alist '(font-backend xft x)) works already, no? And
> > presumably continues to work with your solution.
> 
> No, it doesn't work with my solution, at least not reliably, because I
> didn't intend it to work.

Maybe we should approach this from the requirements aspect.  Namely,
what do we want to be possible regarding control of font backends of a
frame, and in what situations.

I assume that we want to be able to set the font backend(s) from the X
resources and via the -xrm command-line option.  AFAIU, both proposed
methods allow that.

I assume we also want to be able to specify the backend(s) at frame
creation time, via the frame parameters passed to make-frame.  Again,
both methods allow that.

But what about being able to specify the backend(s) via
default-frame-alist in the init file, and expecting that to affect all
the frames including the initial one?  Mitsuharu's proposal allows
that, whereas mine doesn't.  That's because in my implementation the
font backend is registered at frame creation time, and only the
backends known to be requested at that time are registered.  So when
we call modify-frame-parameters later, after processing the init file,
to make default-frame-alist parameters take effect, you cannot request
a backend that wasn't registered.

By contrast, Mitsuharu's method registers all the backends, but only
activates some of them.  So modify-frame-parameters can work, because
it just needs to activate an already registered backend.

I hope the difference is clearer now, and people can voice their
opinions.



  reply	other threads:[~2019-06-15  9:50 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-07 19:40 When and how to register various font backends Eli Zaretskii
2019-06-14  9:14 ` Robert Pluim
2019-06-14 12:19   ` Eli Zaretskii
2019-06-14 13:16     ` Robert Pluim
2019-06-14 14:47       ` Eli Zaretskii
2019-06-15  9:50         ` Eli Zaretskii [this message]
2019-06-17  3:03           ` Michael Welsh Duggan
2019-06-17  9:41           ` Robert Pluim
2019-06-17 16:01             ` Eli Zaretskii
2019-06-18  1:29               ` YAMAMOTO Mitsuharu
2019-06-18 17:26                 ` Eli Zaretskii
2019-06-18 23:21                   ` YAMAMOTO Mitsuharu
2019-06-19 16:42                     ` Eli Zaretskii
2019-06-14 16:54     ` Andy Moreton
2019-06-14 10:52 ` YAMAMOTO Mitsuharu
2019-06-14 11:52   ` Robert Pluim
2019-06-14 12:26     ` Eli Zaretskii
2019-06-14 13:24       ` Robert Pluim

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=83d0jfw528.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=rpluim@gmail.com \
    /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).