Subject: bug#41278: 27.0.91; incorrect U+203E OVERLINE alignment with Fantasque Sans Mono

From: Eli Zaretskii <[email-masked]>
Date: Fri, 15 May 2020 15:55:14 +0300

> Date: Fri, 15 May 2020 13:57:39 +0200
> From: Vincent Lefevre <[email-masked]>
> Cc: [email-masked], [email-masked]
> 
> On 2020-05-15 14:25:03 +0300, Eli Zaretskii wrote:
> > Does xterm support variable-pitch fonts?
> 
> Yes, but AFAIK, it systematically regards them as monospaced fonts,
> i.e. the cell dimensions are always the same (and double-width
> characters take 2 cells).

IOW, xterm doesn't support variable-pitch fonts.

> > If not, you will always see alignment in xterm, but not always in
> > Emacs.
> 
> I think that if the main font is a monospaced font, Emacs should
> honor this choice in font replacements, keeping the cell dimensions
> of the main font.

I don't see how Emacs can second-guess what the user wants in this
case.  Mixing different fonts is at the heart of the Emacs display
engine, and having different fonts have different dimensions is one of
the basic features of that.  Users will not appreciate if we will
override the font metrics based on such arbitrary considerations.  You
may want that (then again, this is just one use case, and you could
find out that in other situations even you will want something
different), but other users will not necessarily want the same.

The solution to your problem (assuming you really need this overline
character and cannot use another) is to either find a suitable font
that supports that character as use it as the default, or configure
your fontset so that some other font, which has the same width as the
default one, is used for symbols instead of Linux Libertine.

> Now, this would solve the alignment problem, but if Emacs just does
> that using the current font replacement, there will still be a space
> between the U+203E OVERLINE characters. This issue does not occur
> with xterm.

Maybe xterm uses a different font, in which case you can find what
that font is and configure Emacs to use it.