From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#35079: 26.1; Font rendering - problem with bdf fonts Date: Sun, 17 Nov 2019 10:01:16 +0100 Message-ID: <87bltaanc3.fsf@gnus.org> References: <87h8b2chv8.fsf@aist.go.jp> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="163122"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: xsrvmy@gmail.com, 35079@debbugs.gnu.org To: handa.kenichi@aist.go.jp (K.Handa) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Nov 17 10:02:12 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iWGRf-000gKk-NS for geb-bug-gnu-emacs@m.gmane.org; Sun, 17 Nov 2019 10:02:11 +0100 Original-Received: from localhost ([::1]:52734 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iWGRd-0003VX-Ty for geb-bug-gnu-emacs@m.gmane.org; Sun, 17 Nov 2019 04:02:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55212) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iWGRX-0003U5-JB for bug-gnu-emacs@gnu.org; Sun, 17 Nov 2019 04:02:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iWGRW-0000tQ-Da for bug-gnu-emacs@gnu.org; Sun, 17 Nov 2019 04:02:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59677) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iWGRW-0000tG-Ad for bug-gnu-emacs@gnu.org; Sun, 17 Nov 2019 04:02:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iWGRW-00025Y-5H for bug-gnu-emacs@gnu.org; Sun, 17 Nov 2019 04:02:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 17 Nov 2019 09:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35079 X-GNU-PR-Package: emacs Original-Received: via spool by 35079-submit@debbugs.gnu.org id=B35079.15739812926531 (code B ref 35079); Sun, 17 Nov 2019 09:02:02 +0000 Original-Received: (at 35079) by debbugs.gnu.org; 17 Nov 2019 09:01:32 +0000 Original-Received: from localhost ([127.0.0.1]:40262 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iWGR0-0001fk-G0 for submit@debbugs.gnu.org; Sun, 17 Nov 2019 04:01:32 -0500 Original-Received: from quimby.gnus.org ([95.216.78.240]:44966) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iWGQy-0001ZX-IL for 35079@debbugs.gnu.org; Sun, 17 Nov 2019 04:01:29 -0500 Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iWGQn-0005Aj-MT; Sun, 17 Nov 2019 10:01:20 +0100 In-Reply-To: <87h8b2chv8.fsf@aist.go.jp> (K. Handa's message of "Sat, 13 Apr 2019 19:35:55 +0900") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:171781 Archived-At: handa.kenichi@aist.go.jp (K.Handa) writes: > Or, please try to apply this patch to src/xftfont.c, and rebuild emacs. > > diff --git a/src/xftfont.c b/src/xftfont.c > index 8a4516f7f9..bb15a83685 100644 > --- a/src/xftfont.c > +++ b/src/xftfont.c > @@ -349,7 +349,7 @@ xftfont_open (struct frame *f, Lisp_Object entity, int pixel_size) > > if (spacing != FC_PROPORTIONAL > #ifdef FC_DUAL > - && spacing != FC_DUAL > + && spacing != FC_DUAL && spacing != FC_CHARCELL > #endif /* FC_DUAL */ > ) > { > > I don't know the exact meaning of FC_CHARCELL. I could't find it on the > Internet. Does anyone know what it means and why fontconfig uses it for > the gnu unifont? It seems like many people are wondering what it means, but https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/176#note_221223 says "FC_DUAL should be an alias to FC_CHARCELL and use FC_CHARCELL in this case too perhaps" So it seems like the solution here is possibly correct (although perhaps there should be an #ifdef FC_CHARCELL there, too). It seems like it shouldn't hurt, at least. Opinions? If nobody objects, then perhaps the following could be installed: diff --git a/src/xftfont.c b/src/xftfont.c index e003580817..fa06d96736 100644 --- a/src/xftfont.c +++ b/src/xftfont.c @@ -211,6 +211,9 @@ xftfont_open (struct frame *f, Lisp_Object entity, int pixel_size) #ifdef FC_DUAL && spacing != FC_DUAL #endif /* FC_DUAL */ +#ifdef FC_CHARCELL + && spacing != FC_CHARCELL +#endif /* FC_CHARCELL */ ) { font->min_width = font->max_width = font->average_width -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no