Re: [hackers] [dwm][PATCH] drw: use cap height for optical text centering

From: Nicholas Bors-Sterian <nick_AT_nickbors.cc>
Date: Tue, 19 May 2026 16:41:39 +0300

On 19/5/26 3:41 pm, Storkman wrote:

> On Tue, May 19, 2026 at 01:56:39PM +0200, aartoni wrote:
>> The current formula centers the font em box (ascent + descent)
>> within the drawing area. This assumes visible ink is symmetric
>> inside that box. Fonts whose ascent includes significant internal
>> leading above the cap line (e.g. Fira Code: ascent 894, capHeight
>> 1377, upm 1950) cause text to ride above optical center.
> If Fira Code doesn't supply the right metrics,
> then wouldn't it make more sense to submit a patch to Fira Code?
This problem is similar to the same way processes are expected to be
cooperative and yield to the process scheduler but in practice some don't.
I think having a sane fallback for some options in the form of a simple
patch which
fixes the annoyances of misbehaving fonts would help users at large.
Received on Tue May 19 2026 - 15:41:39 CEST

This archive was generated by hypermail 2.3.0 : Tue May 19 2026 - 15:48:41 CEST