Subject: Re: bug#65191: 29.1; -ms and -cr CL options don't work

From: Eli Zaretskii <[email-masked]>
Date: Fri, 11 Aug 2023 14:05:32 +0300

> From: Po Lu <[email-masked]>
> Cc: [email-masked],  [email-masked]
> Date: Fri, 11 Aug 2023 15:36:17 +0800
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> > I don't think I understand this well enough to discuss this
> > intelligently, so please elaborate on what happens, and include
> > pointers to more of the code so I and others could complement the
> > descriptions with what's actually in the code, and maybe suggest
> > alternative ways of dealing with this.
> >
> > Not responding to Cairo setting changes sounds like a loss: what
> > features are currently based on that, and would be lost if we revert
> > this support?  Also, can't you think about an alternative way of
> > handling dynamic settings that will let us eat the cake, but also have
> > it?
> 
> The problem boils down to apply_xft_settings, within xsettings.c.  Under
> Cairo, that function calls:
> 
>   FcConfigSubstitute (NULL, pat, FcMatchPattern);
>   options = cairo_font_options_create ();
>   ftcrfont_get_default_font_options (dpyinfo, options); <------
>   cairo_ft_font_options_substitute (options, pat);
>   cairo_font_options_destroy (options);
>   FcDefaultSubstitute (pat);
> 
> to retrieve the settings currently in effect, and compare them against
> the updated settings within the XSettings event.  If a divergence is
> located, a config-changed event is sent.  Under Xft, the following code
> is ultimately run:
> 
>       XftDefaultSet (dpyinfo->display, pat);
> 
> but Cairo provides no analog, so these settings are never saved back to
> Cairo (nor can I find any means by which to do so.)

Why do we need to "save these settings back to Cairo"?

Also, in your original message you mentioned face-spec-recalc and
face-set-after-frame-default; how do those fit into this picture?

IOW, it sounds like the above is another fragment of the whole
picture, and the whole picture is still missing and unclear to me.
Can you please fill in the blanks?