GNU bug report logs - #34577
27.0.50; Identical face specification yields different line heights on different platforms

Previous Next

Package: emacs;

Reported by: Markus Triska <triska <at> metalevel.at>

Date: Tue, 19 Feb 2019 19:27:02 UTC

Severity: wishlist

Found in version 27.0.50

To reply to this bug, email your comments to 34577 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#34577; Package emacs. (Tue, 19 Feb 2019 19:27:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Markus Triska <triska <at> metalevel.at>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 19 Feb 2019 19:27:02 GMT) Full text and rfc822 format available.

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

From: Markus Triska <triska <at> metalevel.at>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.0.50; Identical face specification yields different line heights on
 different platforms
Date: Tue, 19 Feb 2019 20:25:29 +0100
Please start Emacs with "emacs -Q" and evaluate:

    (defface height-test
      '((((class color))
         (:family "DejaVu Sans Mono"
                  :height 180
                  :weight normal
                  :slant normal)))
      "Face for height test")

Using Debian on my machine, then evaluating the form:

    (aref (font-info (face-font 'height-test)) 3)

yields: 29

In contrast, using OSX and Emacs from Macports (please see below for the
exact configuration), evaluating the same form yields: 28.

For one of my applications, I would like to obtain identical results on
all platforms, and the different line heights currently cause different
Emacs behaviour regarding scrolling etc. on these platforms.

Is there a way to reliably obtain the same results on these platforms?

Thank you and all the best!
Markus



For comparison, the results of the following form are shown below:

    (mapc (lambda (e)
            (insert (format "\n%s" e)))
          (font-info (face-font 'height-test)))

Result on OSX:

    -PfEd-DejaVu Sans Mono-normal-normal-normal-*-24-*-*-*-m-0-iso10646-1
    DejaVu Sans Mono:pixelsize=24:foundry=PfEd:weight=normal:slant=normal:width=normal:spacing=100:scalable=true
    24
    29
    0
    0
    0
    14
    23
    6
    14
    14
    /opt/local/share/fonts/dejavu-fonts/DejaVuSansMono.ttf
    nil

Result on Debian:

    -unknown-DejaVu Sans Mono-normal-normal-normal-*-24-*-*-*-m-0-iso10646-1
    DejaVu Sans Mono:pixelsize=24:foundry=unknown:weight=normal:slant=normal:width=normal:spacing=100:scalable=true
    24
    28
    0
    0
    0
    14
    22
    6
    14
    14
    /usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf
    nil




In GNU Emacs 27.0.50 (build 1, x86_64-apple-darwin18.0.0, X toolkit, Xaw scroll bars)
 of 2018-11-15 built on OSX
Repository revision: b4eb908f858284a7962851fd99c94598f76afa6f
Windowing system distributor 'The X.Org Foundation', version 11.0.11804000
System Description:  Mac OS X 10.14.2

Configured using:
 'configure --prefix=/opt/local --without-ns --without-dbus
 --without-gconf --without-libotf --without-m17n-flt --without-gpm
 --with-gnutls --with-xml2 --with-modules --infodir
 /opt/local/share/info/emacs --with-json --with-x-toolkit=lucid
 --without-xaw3d --without-imagemagick --with-xpm --with-jpeg
 --with-tiff --with-gif --with-png --with-lcms2 --without-rsvg
 --with-xft 'CFLAGS=-pipe -Os
 -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk
 -arch x86_64' 'CPPFLAGS=-I/opt/local/include
 -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk'
 'LDFLAGS=-L/opt/local/lib -Wl,-headerpad_max_install_names -lfreetype
 -lfontconfig -Wl,-no_pie
 -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk
 -arch x86_64''

Configured features:
XPM JPEG TIFF GIF PNG NOTIFY KQUEUE ACL GNUTLS LIBXML2 FREETYPE XFT ZLIB
TOOLKIT_SCROLL_BARS LUCID X11 XDBE XIM MODULES THREADS JSON LCMS2 GMP

Important settings:
  value of $LC_CTYPE: UTF-8
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34577; Package emacs. (Tue, 19 Feb 2019 19:43:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Markus Triska <triska <at> metalevel.at>
Cc: 34577 <at> debbugs.gnu.org
Subject: Re: bug#34577: 27.0.50;
 Identical face specification yields different line heights on
 different platforms
Date: Tue, 19 Feb 2019 21:42:43 +0200
> From: Markus Triska <triska <at> metalevel.at>
> Date: Tue, 19 Feb 2019 20:25:29 +0100
> 
> For one of my applications, I would like to obtain identical results on
> all platforms, and the different line heights currently cause different
> Emacs behaviour regarding scrolling etc. on these platforms.
> 
> Is there a way to reliably obtain the same results on these platforms?

Not when each platform has its own font back-end, no.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34577; Package emacs. (Mon, 10 Jun 2019 15:08:01 GMT) Full text and rfc822 format available.

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

From: Markus Triska <triska <at> metalevel.at>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 34577 <at> debbugs.gnu.org
Subject: Re: bug#34577: 27.0.50;
 Identical face specification yields different line heights on
 different platforms
Date: Mon, 10 Jun 2019 17:07:46 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

>> Is there a way to reliably obtain the same results on these platforms?
>
> Not when each platform has its own font back-end, no.

As far as I can tell, xft is the font back-end that is used on both
platforms. For example, when I evaluate the following form:

    (frame-parameter nil 'font-backend)

then on Debian, this yields: (xft x)
and on OSX, this yields:     (xft)

Is this useful to obtain consistent behaviour? Can I do anything to
configure this identically? Is more information needed to do this?

Thank you and all the best!
Markus




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34577; Package emacs. (Mon, 10 Jun 2019 17:05:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Markus Triska <triska <at> metalevel.at>
Cc: Kenichi Handa <handa <at> gnu.org>, 34577 <at> debbugs.gnu.org
Subject: Re: bug#34577: 27.0.50;
 Identical face specification yields different line heights on
 different platforms
Date: Mon, 10 Jun 2019 20:03:58 +0300
> From: Markus Triska <triska <at> metalevel.at>
> Cc: 34577 <at> debbugs.gnu.org
> Date: Mon, 10 Jun 2019 17:07:46 +0200
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> >> Is there a way to reliably obtain the same results on these platforms?
> >
> > Not when each platform has its own font back-end, no.
> 
> As far as I can tell, xft is the font back-end that is used on both
> platforms. For example, when I evaluate the following form:
> 
>     (frame-parameter nil 'font-backend)
> 
> then on Debian, this yields: (xft x)
> and on OSX, this yields:     (xft)
> 
> Is this useful to obtain consistent behaviour? Can I do anything to
> configure this identically? Is more information needed to do this?

I'm afraid you've exceeded the limits of my expertise on these
matters.  I could mumble something about differences of rounding to
integral pixel values, but instead I will CC Handa-san, who might have
a better idea of what is involved here.




This bug report was last modified 6 years and 6 days ago.

Previous Next


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