From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alexis Newsgroups: gmane.emacs.devel Subject: Re: Ping! Re: `font-spec` unable to retrieve :name of font Date: Fri, 23 Oct 2015 20:55:06 +1100 Message-ID: <87h9lhucxx.fsf@gmail.com> References: <87bnc3plb9.fsf@gmail.com> <87r3kngugm.fsf@gmail.com> <83k2qft0ej.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-Trace: ger.gmane.org 1445594366 9031 80.91.229.3 (23 Oct 2015 09:59:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 23 Oct 2015 09:59:26 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 23 11:59:11 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 1ZpZ7l-0003SW-Mr for ged-emacs-devel@m.gmane.org; Fri, 23 Oct 2015 11:59:01 +0200 Original-Received: from localhost ([::1]:37388 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZpZ7g-0005a1-Do for ged-emacs-devel@m.gmane.org; Fri, 23 Oct 2015 05:58:56 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43760) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZpZ4B-0000lb-MB for emacs-devel@gnu.org; Fri, 23 Oct 2015 05:55:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZpZ4A-0004MF-Ib for emacs-devel@gnu.org; Fri, 23 Oct 2015 05:55:19 -0400 Original-Received: from mail-pa0-x22f.google.com ([2607:f8b0:400e:c03::22f]:36340) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZpZ45-0004KV-SR; Fri, 23 Oct 2015 05:55:13 -0400 Original-Received: by pacfv9 with SMTP id fv9so119697829pac.3; Fri, 23 Oct 2015 02:55:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:from:to:cc:subject:in-reply-to:date:message-id :mime-version:content-type; bh=H+K01T3sT5FdVpAm3hL9qGrS0rdM/PVQPmufeebJviQ=; b=lxCK0fySoV3jIwycio+oTQYNOKa3+1/OHj+DxA38O+m/5O7jdkEZqWFa0lGliKqvfy 4OdrIG1ewAsuKFigZz+7SOn7yEnrIBRC6GaUTGkJu6o8QjhKRJ91en6H5tSEF2MaJcnn lgAuPXT+hVYkWdZQsGB7wgwj1dPyWgm2oSwGtjQ4Lkk/9Fj1iZEkacG3n3kKvyTC3YoD w7zaFhykoq4EAOMWHuuhBejMoIvbI5mg6YtyLXdh827z9+W0QL4ld9osYBRm1TDpEEj/ fnTJnLArkX/BToOWZTtc0olB+nMRRwWXSXZm/KtaeJzn8P0lYMzALmMKcu8hvFpqWQb4 K2bw== X-Received: by 10.68.217.102 with SMTP id ox6mr4206314pbc.146.1445594111574; Fri, 23 Oct 2015 02:55:11 -0700 (PDT) Original-Received: from localhost (CPE-58-161-15-29.cqqy2.win.bigpond.net.au. [58.161.15.29]) by smtp.gmail.com with ESMTPSA id w8sm18087257pbs.87.2015.10.23.02.55.09 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Oct 2015 02:55:10 -0700 (PDT) In-reply-to: <83k2qft0ej.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c03::22f 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:192469 Archived-At: Eli Zaretskii writes: > Sorry for not responding earlier. That's okay! > Emacs's font handling is deeply entrenched in the XLFD spec. > That is true even on platforms that don't support XLFD, such as > MS-Windows. So this is not a bug, it's the intended behavior, > the code is working as designed. *nod* Fair enough. > 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'). Thanks! Alexis.