From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#22609: 24.5; Different Font display for windows32 implementation Date: Wed, 10 Feb 2016 19:43:37 +0200 Message-ID: <838u2sbgvq.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1455126324 4807 80.91.229.3 (10 Feb 2016 17:45:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 10 Feb 2016 17:45:24 +0000 (UTC) Cc: 22609@debbugs.gnu.org To: Matthew Fidler Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Feb 10 18:45:13 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1aTYpE-00070I-L5 for geb-bug-gnu-emacs@m.gmane.org; Wed, 10 Feb 2016 18:45:12 +0100 Original-Received: from localhost ([::1]:41485 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTYpE-0004SW-3I for geb-bug-gnu-emacs@m.gmane.org; Wed, 10 Feb 2016 12:45:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47036) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTYp9-0004PO-9g for bug-gnu-emacs@gnu.org; Wed, 10 Feb 2016 12:45:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aTYp4-0005ok-6r for bug-gnu-emacs@gnu.org; Wed, 10 Feb 2016 12:45:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:54320) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTYp4-0005oa-4W for bug-gnu-emacs@gnu.org; Wed, 10 Feb 2016 12:45:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aTYp4-0005d1-02 for bug-gnu-emacs@gnu.org; Wed, 10 Feb 2016 12:45:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 10 Feb 2016 17:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22609 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 22609-submit@debbugs.gnu.org id=B22609.145512624221548 (code B ref 22609); Wed, 10 Feb 2016 17:45:01 +0000 Original-Received: (at 22609) by debbugs.gnu.org; 10 Feb 2016 17:44:02 +0000 Original-Received: from localhost ([127.0.0.1]:35228 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aTYo5-0005bI-NE for submit@debbugs.gnu.org; Wed, 10 Feb 2016 12:44:02 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:55752) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aTYo3-0005as-Jf for 22609@debbugs.gnu.org; Wed, 10 Feb 2016 12:43:59 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aTYnt-0005ci-95 for 22609@debbugs.gnu.org; Wed, 10 Feb 2016 12:43:54 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:40112) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTYnt-0005ce-68; Wed, 10 Feb 2016 12:43:49 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2773 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aTYnr-0000L0-VD; Wed, 10 Feb 2016 12:43:48 -0500 In-reply-to: (message from Matthew Fidler on Tue, 09 Feb 2016 20:29:52 +0000) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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: 208.118.235.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:112863 Archived-At: > From: Matthew Fidler > Date: Tue, 09 Feb 2016 20:29:52 +0000 > > Download github-octicons (https://octicons.github.com/) > > Evaluate the following > > (defvar mode-icons-octicons-font > (find-font (font-spec :name "github-octicons"))) > > (setq test (propertize "test" 'display (make-string 1 #xf0c9) 'font 'mode-icons-octicons-font)) > > (setq header-line-format test > mode-name test) > (force-mode-line-update) > > The header-line and footer-line should have a markdown-symbol in it. On Cygwin and linux, these show the markdown symbol. On windows 32 emacs, it shows a missing glyph. This font uses codepoints in the Private Use Area (PUA) block of Unicode, but it doesn't declare coverage of that block (or any block, really) in its headers. Emacs on Windows requires that a font declares support for a block before it will consider it for displaying characters in that block. It also doesn't like fonts that don't support any Unicode block at all, which is what this font does. If the font declared coverage of PUA, it could have made sense to try introducing the notion of PUA pseudo-script into Emacs (something we don't have today), and then use such a font for characters in PUA blocks. But since the font doesn't declare any coverage, doing that won't help. > You're right it's a private code base. I'm assuming if I run that code, it remaps everywhere. If would like to use github fonts and font awesome fonts and they share the same character then I would have to choose one glyph. Is that correct? Yes, that's correct. Fonts that use PUA blocks are problematic because when they use the same codepoint for different glyphs, Emacs will select one of them at random, unless you tell it which one to select by customizing your fontset. And that only works well if you don't need both glyphs in some situation. So I think that, in general, when you want to use such a font, you must do what Andy suggested, because Emacs is clueless: these codepoints don't tell to which character set or script they belong, they don't tell anything about their properties, etc. Emacs needs help. You can make that setting part of your mode, and it will work on all systems. > However, on Linux/Cygwin such mapping is not necessary. All that is necessary is to declare the font. I think that's sheer luck, and will likely stop working once you have more than one font that covers the same codepoints. Btw, I don't really understand why you need this in Emacs. I'm guessing that you do it because you actually want to display some icon on the mode line. But Emacs can display images on the mode line without any PUA fonts: just create image files out of those glyphs, and use them directly. Emacs doesn't need such "poor man's images". That should fix your problems, I think. Thanks.