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

From: Steve Purcell <[email-masked]>
Date: Sun, 13 May 2012 11:25:16 +0100

On 11 May 2012, at 21:43, Alp Aker wrote:
> I can't reproduce the problem building that rev, either, so I'm not
> sure I can be of further help.  That said, try the following:
> 
> (1) If you haven't already, do "make extraclean" and rebuild from a clean slate.
> (2) If that doesn't work, go to src/nsfont.m:47 and change it to
> define NSFONT_TRACE as 1.  Then rebuild, follow your original recipe,
> and report back with the results of stderr.  (This probably won't tell
> us more than we already know, but it's worth a shot.)
> 
> PS:  Please keep the bug tracker cc'ed on follow ups.

Thanks for the extraclean tip, though that ultimately didn't make any difference.

The font trace info is below, from startup with the default "Monaco", through setting the default face to "Menlo", and then on to displaying the EMPTY SET char:

nsfont: list for fontspec:
    #<font-spec ns nil Monaco nil iso8859-1 nil nil nil nil nil nil nil ((:name . "Monaco"))>
2012-05-13 11:21:47.852 Emacs[94679:e03] Request covering families for script: 'latin'
(0 . 127)
(160 . 591)
(688 . 879)
(7616 . 7935)
(11360 . 11391)
(42752 . 43007)
2012-05-13 11:21:49.399 Emacs[94679:e03]     returning 1 families
2012-05-13 11:21:49.400 Emacs[94679:e03] Got desc NSCTFontDescriptor <0x102e1ae90> = {
    NSFontFamilyAttribute = Monaco;
} and found 1 matching fonts from it: 
    Returning 0 entities.
nsfont: list for fontspec:
    #<font-spec ns nil Monaco nil ascii-0 nil nil nil nil nil nil nil ((:name . "Monaco"))>
2012-05-13 11:21:49.401 Emacs[94679:e03] Request covering families for script: ''
2012-05-13 11:21:49.402 Emacs[94679:e03]     returning 691 families
2012-05-13 11:21:49.403 Emacs[94679:e03] Got desc NSCTFontDescriptor <0x102e1b510> = {
    NSFontFamilyAttribute = Monaco;
} and found 1 matching fonts from it: 
created font_entity:
    #<font-entity ns apple Monaco nil iso10646-1 medium normal normal 0 nil 100 0 ((:name . "Monaco"))>
created font_entity:
    #<font-entity ns apple Monaco synthItal iso10646-1 medium italic normal 0 nil 0 0 ((:name . "Monaco"))>
    Returning 2 entities.
nsfont: open size 0 of fontentity:
    #<font-entity ns apple Monaco nil iso10646-1 medium normal normal 0 nil 100 0 ((:name . "Monaco"))>
2012-05-13 11:21:49.436 Emacs[94679:e03] "Monaco 12.00 pt. P [] (0x102e1cd30) fobj=0x102b96da0, spc=7.20"
nsfont: list for fontspec:
    #<font-spec ns apple Monaco nil iso10646-1 nil nil nil nil nil 100 nil ((:name . "Monaco") (user-spec . "Monaco"))>
2012-05-13 11:21:49.615 Emacs[94679:e03] Request covering families for script: ''
2012-05-13 11:21:49.615 Emacs[94679:e03]     returning 691 families
2012-05-13 11:21:49.616 Emacs[94679:e03] Got desc NSCTFontDescriptor <0x102e2cd40> = {
    NSFontFamilyAttribute = Monaco;
} and found 1 matching fonts from it: 
created font_entity:
    #<font-entity ns apple Monaco nil iso10646-1 medium normal normal 0 nil 100 0 ((:name . "Monaco") (user-spec . "Monaco"))>
created font_entity:
    #<font-entity ns apple Monaco synthItal iso10646-1 medium italic normal 0 nil 0 0 ((:name . "Monaco") (user-spec . "Monaco"))>
    Returning 2 entities.
nsfont: open size 12 of fontentity:
    #<font-entity ns apple Monaco nil iso10646-1 medium normal normal 0 nil 100 0 ((:name . "Monaco") (user-spec . "Monaco"))>
2012-05-13 11:21:49.617 Emacs[94679:e03] "Monaco 12.00 pt. P [] (0x102e1cd30) fobj=0x102b96da0, spc=7.20"
*** nsfont_open CACHE HIT!
nsfont: list for fontspec:
    #<font-spec ns apple Monaco nil iso10646-1 nil nil nil nil nil 100 nil ((user-spec . "Monaco"))>
2012-05-13 11:21:49.618 Emacs[94679:e03] Request covering families for script: ''
2012-05-13 11:21:49.619 Emacs[94679:e03]     returning 691 families
2012-05-13 11:21:49.620 Emacs[94679:e03] Got desc NSCTFontDescriptor <0x102e2e4e0> = {
    NSFontFamilyAttribute = Monaco;
} and found 1 matching fonts from it: 
created font_entity:
    #<font-entity ns apple Monaco nil iso10646-1 medium normal normal 0 nil 100 0 ((user-spec . "Monaco"))>
created font_entity:
    #<font-entity ns apple Monaco synthItal iso10646-1 medium italic normal 0 nil 0 0 ((user-spec . "Monaco"))>
    Returning 2 entities.
nsfont: open size 12 of fontentity:
    #<font-entity ns apple Monaco synthItal iso10646-1 medium italic normal 0 nil 0 0 ((user-spec . "Monaco"))>
2012-05-13 11:21:49.621 Emacs[94679:e03] "Monaco 12.00 pt. P [] (0x102e1cd30) fobj=0x102b96da0, spc=7.20"
nsfont: open size 12 of fontentity:
    #<font-entity ns apple Monaco nil iso10646-1 medium normal normal 0 nil 100 0 ((user-spec . "Monaco"))>
2012-05-13 11:21:49.785 Emacs[94679:e03] "Monaco 12.00 pt. P [] (0x102e1cd30) fobj=0x102b96da0, spc=7.20"
*** nsfont_open CACHE HIT!
nsfont: open size 12 of fontentity:
    #<font-entity ns apple Monaco nil iso10646-1 medium normal normal 0 nil 100 0 ((user-spec . "Monaco"))>
2012-05-13 11:21:50.055 Emacs[94679:e03] "Monaco 12.00 pt. P [] (0x102e1cd30) fobj=0x102b96da0, spc=7.20"
*** nsfont_open CACHE HIT!
0x102e1d4d0	Finding glyphs for glyphs in block 0
0x102e1d4d0	Computing metrics for glyphs in block 0
nsfont: open size 12 of fontentity:
    #<font-entity ns apple Monaco nil iso10646-1 medium normal normal 0 nil 100 0 ((user-spec . "Monaco"))>
2012-05-13 11:21:50.070 Emacs[94679:e03] "Monaco 12.00 pt. P [] (0x102e1cd30) fobj=0x102b96da0, spc=7.20"
*** nsfont_open CACHE HIT!
nsfont: list for fontspec:
    #<font-spec ns apple Menlo nil iso8859-1 nil nil nil nil nil nil nil ((user-spec . "Monaco"))>
2012-05-13 11:21:55.722 Emacs[94679:e03] Request covering families for script: 'latin'
2012-05-13 11:21:55.723 Emacs[94679:e03]     returning 1 families
2012-05-13 11:21:55.724 Emacs[94679:e03] Got desc NSCTFontDescriptor <0x102e71f30> = {
    NSFontFamilyAttribute = Menlo;
} and found 4 matching fonts from it: 
    Returning 0 entities.
nsfont: list for fontspec:
    #<font-spec ns apple Menlo nil ascii-0 nil nil nil nil nil nil nil ((user-spec . "Monaco"))>
2012-05-13 11:21:55.726 Emacs[94679:e03] Request covering families for script: ''
2012-05-13 11:21:55.726 Emacs[94679:e03]     returning 691 families
2012-05-13 11:21:55.727 Emacs[94679:e03] Got desc NSCTFontDescriptor <0x102e72dd0> = {
    NSFontFamilyAttribute = Menlo;
} and found 4 matching fonts from it: 
created font_entity:
    #<font-entity ns apple Menlo nil iso10646-1 medium normal normal 0 nil 100 0 ((user-spec . "Monaco"))>
created font_entity:
    #<font-entity ns apple Menlo nil iso10646-1 medium italic normal 0 nil 100 0 ((user-spec . "Monaco"))>
created font_entity:
    #<font-entity ns apple Menlo nil iso10646-1 bold normal normal 0 nil 100 0 ((user-spec . "Monaco"))>
created font_entity:
    #<font-entity ns apple Menlo nil iso10646-1 bold italic normal 0 nil 100 0 ((user-spec . "Monaco"))>
    Returning 4 entities.
nsfont: open size 12 of fontentity:
    #<font-entity ns apple Menlo nil iso10646-1 medium normal normal 0 nil 100 0 ((user-spec . "Monaco"))>
2012-05-13 11:21:55.763 Emacs[94679:e03] "Menlo-Regular 12.00 pt. P [] (0x102e17460) fobj=0x102c622e0, spc=7.22"
nsfont: list for fontspec:
    #<font-spec ns apple Menlo nil iso10646-1 nil nil nil nil nil 100 nil ((user-spec . "Monaco"))>
2012-05-13 11:21:55.788 Emacs[94679:e03] Request covering families for script: ''
2012-05-13 11:21:55.788 Emacs[94679:e03]     returning 691 families
2012-05-13 11:21:55.789 Emacs[94679:e03] Got desc NSCTFontDescriptor <0x102e59c90> = {
    NSFontFamilyAttribute = Menlo;
} and found 4 matching fonts from it: 
created font_entity:
    #<font-entity ns apple Menlo nil iso10646-1 medium normal normal 0 nil 100 0 ((user-spec . "Monaco"))>
created font_entity:
    #<font-entity ns apple Menlo nil iso10646-1 medium italic normal 0 nil 100 0 ((user-spec . "Monaco"))>
created font_entity:
    #<font-entity ns apple Menlo nil iso10646-1 bold normal normal 0 nil 100 0 ((user-spec . "Monaco"))>
created font_entity:
    #<font-entity ns apple Menlo nil iso10646-1 bold italic normal 0 nil 100 0 ((user-spec . "Monaco"))>
    Returning 4 entities.
nsfont: open size 12 of fontentity:
    #<font-entity ns apple Menlo nil iso10646-1 medium normal normal 0 nil 100 0 ((user-spec . "Monaco"))>
2012-05-13 11:21:55.790 Emacs[94679:e03] "Menlo-Regular 12.00 pt. P [] (0x102e17460) fobj=0x102c622e0, spc=7.22"
*** nsfont_open CACHE HIT!
0x102e737e0	Finding glyphs for glyphs in block 0
0x102e737e0	Computing metrics for glyphs in block 0
nsfont: open size 12 of fontentity:
    #<font-entity ns apple Menlo nil iso10646-1 medium normal normal 0 nil 100 0 ((user-spec . "Monaco"))>
2012-05-13 11:21:55.807 Emacs[94679:e03] "Menlo-Regular 12.00 pt. P [] (0x102e17460) fobj=0x102c622e0, spc=7.22"
*** nsfont_open CACHE HIT!
nsfont: open size 12 of fontentity:
    #<font-entity ns apple Menlo nil iso10646-1 bold normal normal 0 nil 100 0 ((user-spec . "Monaco"))>
2012-05-13 11:21:55.812 Emacs[94679:e03] "Menlo-Bold 12.00 pt. P [] (0x102dbd490) fobj=0x102dbc060, spc=7.22"
0x102e7bcb0	Finding glyphs for glyphs in block 0
0x102e7bcb0	Computing metrics for glyphs in block 0
nsfont: list for fontspec:
    #<font-spec ns apple Menlo nil iso10646-1 nil nil nil nil nil nil nil ((:script . symbol))>
2012-05-13 11:22:11.194 Emacs[94679:e03] Request covering families for script: 'symbol'
(8192 . 10239)
(10496 . 11263)
(11776 . 11903)
(127232 . 127487)
(127744 . 128591)
(128640 . 128895)
2012-05-13 11:22:11.254 Emacs[94679:e03]     returning 1 families
2012-05-13 11:22:11.254 Emacs[94679:e03] Got desc NSCTFontDescriptor <0x102586c70> = {
    NSFontFamilyAttribute = Menlo;
} and found 4 matching fonts from it: 
    Returning 0 entities.
nsfont: list for fontspec:
    #<font-spec ns nil Menlo nil iso10646-1 nil nil nil nil nil nil nil ((:script . symbol))>
2012-05-13 11:22:11.255 Emacs[94679:e03] Request covering families for script: 'symbol'
2012-05-13 11:22:11.255 Emacs[94679:e03]     returning 1 families
2012-05-13 11:22:11.256 Emacs[94679:e03] Got desc NSCTFontDescriptor <0x102deaf30> = {
    NSFontFamilyAttribute = Menlo;
} and found 4 matching fonts from it: 
    Returning 0 entities.
nsfont: list for fontspec:
    #<font-spec ns apple nil nil iso10646-1 nil nil nil nil nil nil nil ((:script . symbol))>
2012-05-13 11:22:11.256 Emacs[94679:e03] Request covering families for script: 'symbol'
2012-05-13 11:22:11.257 Emacs[94679:e03]     returning 1 families
2012-05-13 11:22:11.601 Emacs[94679:e03] Got desc NSCTFontDescriptor <0x102ddcd80> = {
} and found 1171 matching fonts from it: 
created font_entity:
    #<font-entity ns apple STIXGeneral nil iso10646-1 medium normal normal 0 nil 0 0 ((:script . symbol))>
created font_entity:
    #<font-entity ns apple STIXGeneral nil iso10646-1 medium italic normal 0 nil 0 0 ((:script . symbol))>
created font_entity:
    #<font-entity ns apple STIXGeneral nil iso10646-1 bold normal normal 0 nil 0 0 ((:script . symbol))>
created font_entity:
    #<font-entity ns apple STIXGeneral nil iso10646-1 bold italic normal 0 nil 0 0 ((:script . symbol))>
    Returning 4 entities.
nsfont: open size 12 of fontentity:
    #<font-entity ns apple STIXGeneral nil iso10646-1 medium normal normal 0 nil 0 0 ((:script . symbol))>
2012-05-13 11:22:11.668 Emacs[94679:e03] "STIXGeneral-Regular 12.00 pt. P [] (0x102dbd490) fobj=0x102cc6c20, spc=3.00"
0x102e96420	Finding glyphs for glyphs in block 34
0x102e96420	Computing metrics for glyphs in block 4