From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nix Newsgroups: gmane.emacs.devel Subject: Re: Ping! Re: `font-spec` unable to retrieve :name of font Date: Sat, 24 Oct 2015 18:45:24 +0100 Message-ID: <87611wcg97.fsf@esperi.org.uk> References: <87bnc3plb9.fsf@gmail.com> <87r3kngugm.fsf@gmail.com> <83k2qft0ej.fsf@gnu.org> <87h9lhucxx.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1445708774 20135 80.91.229.3 (24 Oct 2015 17:46:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 24 Oct 2015 17:46:14 +0000 (UTC) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Alexis Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 24 19:46:07 2015 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 1Zq2tB-0005J9-TV for ged-emacs-devel@m.gmane.org; Sat, 24 Oct 2015 19:45:58 +0200 Original-Received: from localhost ([::1]:45157 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zq2tB-0004lS-0N for ged-emacs-devel@m.gmane.org; Sat, 24 Oct 2015 13:45:57 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56417) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zq2sr-0004lA-2W for emacs-devel@gnu.org; Sat, 24 Oct 2015 13:45:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zq2sp-0003uU-VR for emacs-devel@gnu.org; Sat, 24 Oct 2015 13:45:36 -0400 Original-Received: from icebox.esperi.org.uk ([81.187.191.129]:52174 helo=mail.esperi.org.uk) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zq2sl-0003u3-St; Sat, 24 Oct 2015 13:45:32 -0400 Original-Received: from spindle (nix@spindle.srvr.nix [192.168.14.15]) by mail.esperi.org.uk (8.15.2/8.15.2) with ESMTP id t9OHjSaq002171; Sat, 24 Oct 2015 18:45:28 +0100 Emacs: the Swiss Army of Editors. In-Reply-To: <87h9lhucxx.fsf@gmail.com> (Alexis's message of "Fri, 23 Oct 2015 20:55:06 +1100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-DCC-INFN-TO-Metrics: spindle 1233; Body=3 Fuz1=3 Fuz2=3 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 81.187.191.129 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:192566 Archived-At: On 23 Oct 2015, Alexis told this: > Eli Zaretskii writes: > >> That said, I had a similar problem with fonts named like Foobar-12, see commit 7d5a7a4 which solved that. (The original problem >> is described in the discussion that started in http://lists.gnu.org/archive/html/help-emacs-windows/2015-06/msg00001.html.) That >> problem could be solved because the part after the dash was a number, and a font's family cannot be a number. I don't know if we >> can do the same with this case. Which "family" names are we allowed to reject, exactly? Don't forget that the weight field of the >> XLFD spec, which follows the family, uses single-letter codes (although AFAIK "g" is not one of them); we ought not to trick >> ourselves into accidentally treating weight as part of the font name. > > Yes, i gave some thought to possible heuristics that could be used in instances such as this, but didn't come up with anything > practical .... i might see if i can use FontForge to change the name to something XLFD-friendly (e.g. 'InconsolataG'). This seems like a transformation Emacs should be doing itself. It doesn't need to be a *pretty* transformation: after all, the XLFD variant is never going to be displayed to the user, nor passed to Fontconfig: it's just an internal thing for parts of Emacs expecting XLFDs. -- NULL && (void)