GNU bug report logs - #20628
25.0.50; Incorrect line height for some fonts

Previous Next

Package: emacs;

Reported by: Clément Pit--Claudel <clement.pitclaudel <at> live.com>

Date: Fri, 22 May 2015 03:03:02 UTC

Severity: normal

Found in version 25.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #83 received at 20628 <at> debbugs.gnu.org (full text, mbox):

From: Oleh Krehel <ohwoeowho <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: clement.pitclaudel <at> live.com, 20628 <at> debbugs.gnu.org
Subject: Re: bug#20628: 25.0.50; Incorrect line height for some fonts
Date: Fri, 22 May 2015 18:33:43 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Oleh Krehel <ohwoeowho <at> gmail.com>
>> Cc: clement.pitclaudel <at> live.com,  20628 <at> debbugs.gnu.org
>> Date: Fri, 22 May 2015 18:15:28 +0200
>> 
>> >> So far I've tracked the bug to xftfont_open, where instead of the
>> >> usual
>> >> 
>> >>     font ascent: 14, descent: 5
>> >> 
>> >> I get for the 120755 char:
>> >> 
>> >>     font ascent: 54, descent: 46
>
> According to what I see here 120755 (#x1d7b3) is the same kappa symbol
> as #x1d779, just in italic form.  Not sure why Emacs on your system
> displays the former when you request the latter, but at least it's the
> same letter.  Perhaps the font driver substitutes one for the other?

Could be. I don't mind that really, just the ascent/descent.

>> > How is this strange character displayed, eventually?  Is it displayed
>> > as a character or as a box with its hex code?
>> 
>> It's displayed just the way gedit displays it, only with a huge (3 line
>> height) ascent and a huge (3 line height) descent. So the line with the
>> char is effectively 7 times taller than a regular line.
>> 
>> Also, I've tracked the font family of the char to be "Latin Modern
>> Mathfont" in xftfont_open.
>
> Math fonts are notorious for requesting huge ascent and descent
> values.  I always disable them using fontsets.

Can you explain what are fontsets and how to use the to disable
ascent/descent in math? Is it possible for Emacs to do so by default?

In any case, here's more data for the bad font that gets created with
XftFontOpenPattern.

Family:
    $ p (FcChar8 *) SDATA (SYMBOL_NAME (val))
    "Latin Modern Math"

Foundry:
    $ p (FcChar8 *) SDATA (SYMBOL_NAME (val))
    "unknown"

Filename:

    $ p (FcChar8 *) SDATA (filename)
    "/usr/share/texmf/fonts/opentype/public/lm-math/latinmodernmath-regular.otf"

So it might be that I could just patch latinmodernmath-regular.otf to
fix the problem. Or maybe Emacs could fix the problem specifically for
this file / font family. That's what gedit does, I guess.




This bug report was last modified 9 years and 356 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.