From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] emacs-25 1c58fa1: Fix variable-pitch font on MS-Windows Date: Sat, 30 Apr 2016 17:03:19 +0300 Message-ID: <834majp520.fsf@gnu.org> References: <20160430095647.11601.56460@vcs.savannah.gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1462025039 6728 80.91.229.3 (30 Apr 2016 14:03:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 30 Apr 2016 14:03:59 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Apr 30 16:03:57 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1awVUy-00061w-72 for ged-emacs-devel@m.gmane.org; Sat, 30 Apr 2016 16:03:56 +0200 Original-Received: from localhost ([::1]:58526 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1awVUr-00039i-4K for ged-emacs-devel@m.gmane.org; Sat, 30 Apr 2016 10:03:49 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40481) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1awVUh-0002tw-Tk for emacs-devel@gnu.org; Sat, 30 Apr 2016 10:03:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1awVUV-0005gM-C9 for emacs-devel@gnu.org; Sat, 30 Apr 2016 10:03:33 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:57588) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1awVUV-0005fL-98; Sat, 30 Apr 2016 10:03:27 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1642 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1awVUP-0002WB-94; Sat, 30 Apr 2016 10:03:21 -0400 In-reply-to: (message from Stefan Monnier on Sat, 30 Apr 2016 09:48:32 -0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:203448 Archived-At: > From: Stefan Monnier > Cc: Eli Zaretskii > Date: Sat, 30 Apr 2016 09:48:32 -0400 > > > - '((t :family "Sans Serif")) > > + '((((type w32)) > > + ;; This is a kludgey workaround for an issue discussed in > > + ;; http://lists.gnu.org/archive/html/emacs-devel/2016-04/msg00746.html. > > + :font "-outline-Arial-normal-normal-normal-sans-*-*-*-*-p-*-iso8859-1") > > + (t :family "Sans Serif")) > > This is really curious. Why does Emacs pick a bold-italic face when we > don't specify bold (nor italic)? I have no idea. My best guess is that bold-italic font variant is the first one that Emacs finds, but I have no evidence to support that guess. One thing is clear: Emacs doesn't know that the resulting face is bold-italic, because manually forcing the corresponding attributes to be "normal"/"roman" doesn't fix this. (Specifying those attributes explicitly was a solution I tried first, because it seems like less ugly.) > I understand that the above defface doesn't explicitly specify ":slanted > nil", but it's still very puzzling. I very much agree. Unfortunately, font selection logic is something I have only a very vague idea about. The change which apparently caused this as side effect was for a similar (and more serious) problem, and the solution I found was just a heuristic, by watching the fonts that were examined and rejected.