Re: [hackers] st: Fix off-by-one error when calculating character width.

From: Christoph Lohmann <20h_AT_r-36.net>
Date: Wed, 09 Mar 2016 22:01:47 +0100

Greetings.

On Wed, 09 Mar 2016 22:01:47 +0100 Tor Andersson <tor_AT_ccxvii.net> wrote:
> LEN(str) is one larger than strlen(str) because it also counts the zero
> terminator. The original code would include the .notdef glyph (since it'll
> try to encode character 0, which gets encoded to the .notdef glyph) when
> measuring the average dimensions of printable ascii characters.
>
> This causes problems with fonts like GNU Unifont where the .notdef glyph is
> not the same width as the usual half-width characters.

Thanks, it has been applied.


Sincerely,

Christoph Lohmann

💻 http://r-36.net
💻 gopher://r-36.net
http://r-36.net/about
🔐 1C3B 7E6F 9805 E5C8 C0BD 1F7F EA21 7AAC 09A9 CB55
🔐 http://r-36.net/about/20h.asc
📧 20h_AT_r-36.net
Received on Wed Mar 09 2016 - 22:01:47 CET

This archive was generated by hypermail 2.3.0 : Wed Mar 09 2016 - 22:12:15 CET