Subject: 24.1.50; NS regression: fallback font used even when glyph available in primary font

From: Steve Purcell <[email-masked]>
Date: Fri, 11 May 2012 13:45:28 +0100

Starting a few months ago, I've observed a regression in Emacs HEAD
relative to Emacs 23.3.1.

Steps to reproduce:
===============

* Open Emacs HEAD on OS X
* In *scratch*, evaluate:
  (set-face-attribute 'default nil :foundry "apple" :family "Menlo" :height 120)
* Then use "M-x ucs-insert" to insert the "EMPTY SET" char (∅)
* Use "M-x describe-char" to inspect the properties of the displayed character

Expected results:
==============

This char is available in the Menlo font, so the expected results are as
for Emacs 23.3:

        character: ∅ (8709, #o21005, #x2205)
preferred charset: unicode (Unicode (ISO10646))
       code point: 0x2205
           syntax: . 	which means: punctuation
         category: .:Base, j:Japanese
      buffer code: #xE2 #x88 #x85
        file code: #xE2 #x88 #x85 (encoded by coding system utf-8-unix)
          display: by this font (glyph code)
    nil:-apple-Menlo-medium-normal-normal-*-12-*-*-*-m-0-iso10646-1 (#x7B4)

Character code properties: customize what to show
  name: EMPTY SET
  general-category: Sm (Symbol, Math)

Actual results:
===========

Instead, Emacs HEAD now displays the character from a fallback font, STIXGeneral:

             position: 275 of 275 (100%), column: 0
            character: ∅ (displayed as ∅) (codepoint 8709, #o21005, #x2205)
    preferred charset: unicode (Unicode (ISO10646))
code point in charset: 0x2205
               syntax: . 	which means: punctuation
             category: .:Base, j:Japanese
          buffer code: #xE2 #x88 #x85
            file code: #xE2 #x88 #x85 (encoded by coding system utf-8-unix)
              display: by this font (glyph code)
    nil:-apple-STIXGeneral-medium-normal-normal-*-14-*-*-*-p-0-iso10646-1 (#x41C)

Character code properties: customize what to show
  name: EMPTY SET
  general-category: Sm (Symbol, Math)
  decomposition: (8709) ('∅')

In GNU Emacs 24.1.50.2 (i386-apple-darwin11.3.0, NS apple-appkit-1138.32)
of 2012-05-10 on mandala.home.gateway
Windowing system distributor `Apple', version 10.3.1138
Configured using:
`configure '--with-ns' '--without-dbus' '--without-x' 'CFLAGS=3D-g''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: en_US.UTF-8
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<up> <up> <right> <right> <right> M-x d e s c - c a=20
h <backspace> <backspace> h a r <tab> <return> <help-echo>=20
<help-echo> <down-mouse-1> <mouse-1> M-x u c s - i=20
n <tab> <return> e m p t y SPC s e t <tab> <return>=20
<left> M-x d e s c - c h a r <return> <up> <return>=20
<return> <up> C-y C-x C-e <down> <down> <right> <left>=20
M-x d e s c - c h a r <return> C-x 5 2 M-x e m a c=20
s - b <tab> <s-backspace> <M-backspace> <M-backspace>=20
<M-backspace> r e p <tab> <M-backspace> <M-backspace>=20
r e p o r <tab> <return>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Type C-x 1 to delete the help window, C-M-v to scroll help.
You can run the command `ucs-insert' with C-x 8 RET

Mark set
nil

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils pp wid-edit descr-text help-mode easymenu view
time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel ns-win
tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment
lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
minibuffer loaddefs button faces cus-face files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process ns multi-tty
emacs)