Subject: bug#17486: 24.4.50; set-face-font problem on OSX

From: Jan Djärv <[email-masked]>
Date: Sun, 18 May 2014 20:33:33 +0200

Hi.

18 maj 2014 kl. 18:17 skrev Dmitry Antipov <[email-masked]>:

> On 05/18/2014 11:19 AM, Jan Djärv wrote:
> 
>>> Could you please check whether set-face-font hits one of the following extra easserts?
>>> 
>> 
>> ../../current/src/font.c:3311: Emacs fatal error: assertion failed: NILP (entity) || FONT_ENTITY_P (entity)
>> 
>> (gdb) pp entity
>> [#<font-entity ns apple Menlo nil iso10646-1 medium normal normal 0 nil 100 0 nil>]
> 
> Hm... so font_matching_entity sometimes returns [#<font-entity>] instead of #<font-entity>.
> Something may be wrong with font cache or with font driver-specific match routine.

How can code (driver-specific) that has not changed suddenly become wrong?

> An output of (frame-font-cache) looks correct, so let's check both cases with the following
> patch. My output looks like:
> 
> font_matching_entity: matched entity nil
> font_matching_entity: matched entity #<font-entity x Misc Fixed ## JISX0201\.1976-0 medium r normal 14 75 110 70 nil>
> font_matching_entity: matched entity nil
> font_matching_entity: matched entity #<font-entity x Misc Fixed ## JISX0201\.1976-0 medium r normal 14 75 110 70 nil>
> font_matching_entity: matched entity nil
> font_matching_entity: matched entity #<font-entity x Sony Fixed ## JISX0201\.1976-0 medium r normal 16 100 110 80 nil>
> font_matching_entity: matched entity nil
> font_matching_entity: matched entity #<font-entity x Sony Fixed ## JISX0201\.1976-0 medium r normal 24 100 110 120 nil>
> font_matching_entity: matched entity nil
> 
> and I do not see 1-item vectors here.
> 

font_matching_entity: matched entity nil
font_matching_entity: matched entity #<font-entity ns apple Menlo nil iso10646-1 medium normal normal 0 nil 100 0 nil>
font_matching_entity: matched entity nil
font_matching_entity: cached entity [#<font-entity ns apple Menlo nil iso10646-1 medium normal normal 0 nil 100 0 nil>]

../../current/src/font.c:3317: Emacs fatal error: assertion failed: NILP (entity) || FONT_ENTITY_P (entity)

	Jan D.