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

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: wishlist; Reported by: Markus Triska <triska@HIDDEN>; dated Tue, 19 Feb 2019 19:27:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 34577 <at> debbugs.gnu.org:


Received: (at 34577) by debbugs.gnu.org; 10 Jun 2019 17:04:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jun 10 13:04:13 2019
Received: from localhost ([127.0.0.1]:57449 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1haNiO-0007TJ-NI
	for submit <at> debbugs.gnu.org; Mon, 10 Jun 2019 13:04:12 -0400
Received: from eggs.gnu.org ([209.51.188.92]:40652)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1haNiN-0007T7-Mc
 for 34577 <at> debbugs.gnu.org; Mon, 10 Jun 2019 13:04:12 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:54798)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1haNiD-00031U-IZ; Mon, 10 Jun 2019 13:04:01 -0400
Received: from [176.228.60.248] (port=4111 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1haNiD-0006kq-1I; Mon, 10 Jun 2019 13:04:01 -0400
Date: Mon, 10 Jun 2019 20:03:58 +0300
Message-Id: <83sgsh9xtt.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Markus Triska <triska@HIDDEN>
In-reply-to: <87muiptr5p.fsf@HIDDEN> (message from Markus Triska on Mon, 
 10 Jun 2019 17:07:46 +0200)
Subject: Re: bug#34577: 27.0.50;
 Identical face specification yields different line heights on
 different platforms
References: <m2h8czvavq.fsf@HIDDEN> <835ztfimz0.fsf@HIDDEN>
 <87muiptr5p.fsf@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 34577
Cc: Kenichi Handa <handa@HIDDEN>, 34577 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Markus Triska <triska@HIDDEN>
> Cc: 34577 <at> debbugs.gnu.org
> Date: Mon, 10 Jun 2019 17:07:46 +0200
> 
> Eli Zaretskii <eliz@HIDDEN> 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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#34577; Package emacs. Full text available.

Message received at 34577 <at> debbugs.gnu.org:


Received: (at 34577) by debbugs.gnu.org; 10 Jun 2019 15:07:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jun 10 11:07:51 2019
Received: from localhost ([127.0.0.1]:57314 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1haLtn-0004g6-9q
	for submit <at> debbugs.gnu.org; Mon, 10 Jun 2019 11:07:51 -0400
Received: from metalevel.at ([78.46.218.83]:54972)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <triska@HIDDEN>) id 1haLtk-0004fw-FV
 for 34577 <at> debbugs.gnu.org; Mon, 10 Jun 2019 11:07:50 -0400
Received: by metalevel.at (Postfix, from userid 1000)
 id BE2DDA042D; Mon, 10 Jun 2019 17:07:46 +0200 (CEST)
From: Markus Triska <triska@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#34577: 27.0.50;
 Identical face specification yields different line heights on
 different platforms
References: <m2h8czvavq.fsf@HIDDEN> <835ztfimz0.fsf@HIDDEN>
Date: Mon, 10 Jun 2019 17:07:46 +0200
In-Reply-To: <835ztfimz0.fsf@HIDDEN> (Eli Zaretskii's message of "Tue, 19 Feb
 2019 21:42:43 +0200")
Message-ID: <87muiptr5p.fsf@HIDDEN>
User-Agent: Emacs/24.5
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 34577
Cc: 34577 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Eli Zaretskii <eliz@HIDDEN> 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@HIDDEN:
bug#34577; Package emacs. Full text available.

Message received at 34577 <at> debbugs.gnu.org:


Received: (at 34577) by debbugs.gnu.org; 19 Feb 2019 19:42:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 19 14:42:53 2019
Received: from localhost ([127.0.0.1]:55584 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gwBI4-00006X-Mk
	for submit <at> debbugs.gnu.org; Tue, 19 Feb 2019 14:42:52 -0500
Received: from eggs.gnu.org ([209.51.188.92]:56420)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1gwBI2-00006L-8O
 for 34577 <at> debbugs.gnu.org; Tue, 19 Feb 2019 14:42:51 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:48000)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1gwBHw-0007xT-64; Tue, 19 Feb 2019 14:42:44 -0500
Received: from [176.228.60.248] (port=2111 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1gwBHp-0005EH-M6; Tue, 19 Feb 2019 14:42:40 -0500
Date: Tue, 19 Feb 2019 21:42:43 +0200
Message-Id: <835ztfimz0.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Markus Triska <triska@HIDDEN>
In-reply-to: <m2h8czvavq.fsf@HIDDEN> (message from Markus Triska on Tue, 
 19 Feb 2019 20:25:29 +0100)
Subject: Re: bug#34577: 27.0.50;
 Identical face specification yields different line heights on
 different platforms
References: <m2h8czvavq.fsf@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 34577
Cc: 34577 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> From: Markus Triska <triska@HIDDEN>
> 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@HIDDEN:
bug#34577; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 19 Feb 2019 19:26:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 19 14:26:09 2019
Received: from localhost ([127.0.0.1]:55578 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gwB1t-00087s-3O
	for submit <at> debbugs.gnu.org; Tue, 19 Feb 2019 14:26:09 -0500
Received: from eggs.gnu.org ([209.51.188.92]:51466)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <triska@HIDDEN>) id 1gwB1n-00087J-K4
 for submit <at> debbugs.gnu.org; Tue, 19 Feb 2019 14:26:06 -0500
Received: from lists.gnu.org ([209.51.188.17]:55366)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <triska@HIDDEN>) id 1gwB1Y-00058F-I7
 for submit <at> debbugs.gnu.org; Tue, 19 Feb 2019 14:25:51 -0500
Received: from eggs.gnu.org ([209.51.188.92]:37598)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <triska@HIDDEN>) id 1gwB1X-0002hf-Gc
 for bug-gnu-emacs@HIDDEN; Tue, 19 Feb 2019 14:25:48 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,URIBL_BLOCKED
 autolearn=disabled version=3.3.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <triska@HIDDEN>) id 1gwB1U-00055d-Ge
 for bug-gnu-emacs@HIDDEN; Tue, 19 Feb 2019 14:25:46 -0500
Received: from metalevel.at ([78.46.218.83]:34312)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <triska@HIDDEN>) id 1gwB1M-00051G-Lw
 for bug-gnu-emacs@HIDDEN; Tue, 19 Feb 2019 14:25:38 -0500
Received: from mts-Mac-mini.localdomain (localhost.localdomain [127.0.0.1])
 by metalevel.at (Postfix) with ESMTP id 8FC6FA01FB
 for <bug-gnu-emacs@HIDDEN>; Tue, 19 Feb 2019 20:25:32 +0100 (CET)
Received: by mts-Mac-mini.localdomain (Postfix, from userid 501)
 id 57D3C395636; Tue, 19 Feb 2019 20:25:29 +0100 (CET)
From: Markus Triska <triska@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 27.0.50; Identical face specification yields different line heights on
 different platforms
Date: Tue, 19 Feb 2019 20:25:29 +0100
Message-ID: <m2h8czvavq.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 78.46.218.83
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


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






Acknowledgement sent to Markus Triska <triska@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#34577; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

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