Subject: Re: bug#39082: Inconsolata v3.000 has too wide spacing

From: Eli Zaretskii <[email-masked]>
Date: Sun, 12 Jan 2020 20:44:08 +0200

> From: Andrea Greselin <[email-masked]>
> Date: Sun, 12 Jan 2020 19:17:38 +0100
> Cc: [email-masked]
> 
> >   M-: (font-get-glyphs (font-at 1) 1 2) RET
> 
> Having launched Emacs with `emacs -Q -fn Inconsolata-12` I get
> 
>   [[0 0 59 541 29 2 7 9 4 nil]]
> 
> > It would be also interesting to compare this with a font that is
> > displayed "normally".
> 
> With `emacs -Q -fn "DejaVu Sans Mono-12"` (which displays correctly)
> the output is
> 
>   [[0 0 59 30 11 3 8 10 3 nil]]
> 
> I've run both test on a scratch buffer showing its message, so they
> should be referring to the character ";". `(font-get-glyphs (font-at
> 1) 100 101)` returns
> 
>   [[0 0 116 415 29 0 10 12 0 nil]]
> 
> with Inconsolata and
> 
>   [[0 0 116 87 11 0 11 14 0 nil]]
> 
> with DejaVu.
> 
> The fourth values look rather off, and the fifth too.

The 4th value is unimportant: it's the font's glyph index for that
character's glyph.  The 5th element is the problem: it's what we use
for the glyph.  29 is way too large, about 2.5 times too large.

So the question now becomes how come we get such a large value.  Looks
like we somehow use the space-width value instead of the character
glyph's width, not sure why.  I guess stepping through the code I've
shown from xdisp.c is still necessary to understand this.