all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Matthew Fidler <matthew.fidler@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 22609@debbugs.gnu.org
Subject: bug#22609: 24.5; Different Font display for windows32 implementation
Date: Thu, 11 Feb 2016 14:27:12 +0000	[thread overview]
Message-ID: <CAOmN8O4TTqBFGVq=mHRqER+ThsYc2g1TaUT1bn8GVVkRQkVgQw@mail.gmail.com> (raw)
In-Reply-To: <838u2sbgvq.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 3414 bytes --]

I thought that I declared what font to use by declaring the 'font property,
so it would not be ambiguous to emacs what font to display the glyph with.

As a test, I decided to try webdings as a font.  As you said, emacs doesn't
allow display of the "a" character in both webdings (a checkbox) and
whatever font I'm using.

I guess that cygwin may have done the display by luck.

Matt

On Wed, Feb 10, 2016 at 11:44 AM Eli Zaretskii <eliz@gnu.org> wrote:

> > From: Matthew Fidler <matthew.fidler@gmail.com>
> > 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.
>

[-- Attachment #2: Type: text/html, Size: 4289 bytes --]

  reply	other threads:[~2016-02-11 14:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-09 20:29 bug#22609: 24.5; Different Font display for windows32 implementation Matthew Fidler
2016-02-10  0:00 ` Andy Moreton
2016-02-10 17:47   ` Eli Zaretskii
2016-02-10  3:32 ` bug#22609: Code points Matthew Fidler
2016-02-10 17:43 ` bug#22609: 24.5; Different Font display for windows32 implementation Eli Zaretskii
2016-02-11 14:27   ` Matthew Fidler [this message]
2016-02-11 20:54     ` Eli Zaretskii
2019-11-17  6:49   ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAOmN8O4TTqBFGVq=mHRqER+ThsYc2g1TaUT1bn8GVVkRQkVgQw@mail.gmail.com' \
    --to=matthew.fidler@gmail.com \
    --cc=22609@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.