[Top][All Lists]

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

Re: When and how to register various font backends

From: Eli Zaretskii
Subject: Re: When and how to register various font backends
Date: Sat, 15 Jun 2019 12:50:23 +0300

> Date: Fri, 14 Jun 2019 17:47:07 +0300
> From: Eli Zaretskii <address@hidden>
> Cc: address@hidden
> > (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

reply via email to

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