emacs-devel
[Top][All Lists]
Advanced

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

Re: Increase default `line-spacing' to 0.05, 0.10 or 0.15 [proposal]


From: Yuri Khan
Subject: Re: Increase default `line-spacing' to 0.05, 0.10 or 0.15 [proposal]
Date: Fri, 7 May 2021 13:03:01 +0700

On Fri, 7 May 2021 at 06:18, Jim Porter <jporterbugs@gmail.com> wrote:

> Yeah, Emacs' reliance on using characters to draw lines would probably
> lead me to set `line-spacing' back to 0 if this were changed. It would
> be interesting if Emacs were able to handle these issues, e.g. by
> adding some special handling when it sees box-drawing characters, but
> that would probably be a lot of work.

The Kitty terminal emulator has a configuration option for increasing
the line spacing. To mitigate the box drawing characters issue, it
implements rendering them in code. (This also helps when a font does
not have glyphs for box drawing characters.)

https://github.com/kovidgoyal/kitty/blob/master/kitty/fonts/box_drawing.py

The high-level architecture is:

* Kitty keeps a texture that caches glyphs of fonts being used.
* For most characters, that texture is populated by rendering them
with the appropriate font (chosen by the user in configuration or by
font fallback).
* For box drawing characters, there is a mapping from character code
to a list of rendering functions, and they are called to render into
the texture.

Of course, Kitty has it easier because it only has to deal with a
single font size, and I’m not sure if it does complex script shaping
correctly.



reply via email to

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