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

From: Vincent Lefevre <[email-masked]>
Date: Fri, 15 May 2020 18:17:47 +0200

On 2020-05-15 15:55:14 +0300, Eli Zaretskii wrote:
> > 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.

Well, at least for the box drawing characters and other alignment
related characters such as U+203E OVERLINE, it can, because the
purpose of such characters is to work by taking alignment into
account, assuming a monospaced font. So, as long as the user uses
a (single) monospaced font for text, such characters should work
as expected. I don't see why a user would want something different.

BTW, such characters can also be handled directly by the application
or library (e.g., this is the case with GNOME Terminal via the VTE
library), which might be one of the reasons why some fonts do not
provide them.

Emacs even takes different box drawing characters in different fonts!
(U+2500 from Tinos, U+256D from Noto Serif CJK TC).

Note that font substitution done by gucharmap seems correct: it
usually chooses DejaVu Sans Mono for box drawing characters (except
for Noto Mono, where it surprisingly chooses DejaVu Sans, but there
does not seem to be any difference anyway). This is actually done
by fontconfig itself. Since it does a better job than Emacs, why
doesn't Emacs let it do the substitution?

-- 
Vincent Lefèvre <[email-masked]> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)