unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Dmitry Antipov <dmantipov@yandex.ru>
To: "Jan Djärv" <jan.h.d@swipnet.se>
Cc: 17486@debbugs.gnu.org, Christian Lynbech <christian@defun.dk>
Subject: bug#17486: 24.4.50; set-face-font problem on OSX
Date: Mon, 19 May 2014 07:38:51 +0400	[thread overview]
Message-ID: <53797CCB.6000204@yandex.ru> (raw)
In-Reply-To: <BB82AF31-8F3A-451B-847D-85B698DBC86D@swipnet.se>

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

On 05/18/2014 10:33 PM, Jan Djärv wrote:

>> 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?

It may return something which doesn't match font cache data structures any more
because the latter was changed (mostly to avoid glitches in compact_font_caches).

There was a slight confusion between font_list_entities (which operates
on vectors of font entities) and font_matching_entity (which should operate
on font entities). Hopefully the fix is almost obvious.

Dmitry


[-- Attachment #2: bug17486_proposal.patch --]
[-- Type: text/x-patch, Size: 396 bytes --]

=== modified file 'src/font.c'
--- src/font.c	2014-04-05 19:30:36 +0000
+++ src/font.c	2014-05-19 03:23:51 +0000
@@ -2803,7 +2803,7 @@
 	ASET (work, FONT_TYPE_INDEX, driver_list->driver->type);
 	entity = assoc_no_quit (work, XCDR (cache));
 	if (CONSP (entity))
-	  entity = XCDR (entity);
+	  entity = AREF (XCDR (entity), 0);
 	else
 	  {
 	    entity = driver_list->driver->match (f, work);


  reply	other threads:[~2014-05-19  3:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-13 18:21 bug#17486: 24.4.50; set-face-font problem on OSX Christian Lynbech
2014-05-16  5:06 ` Jan Djärv
2014-05-16 13:33   ` Jan D.
2014-05-16 14:53     ` Dmitry Antipov
2014-05-16 15:13       ` Jan Djärv
2014-05-16 15:46         ` Dmitry Antipov
2014-05-17  6:46           ` Jan Djärv
2014-05-18  5:43             ` Dmitry Antipov
2014-05-18  7:19               ` Jan Djärv
2014-05-18 16:17                 ` Dmitry Antipov
2014-05-18 18:33                   ` Jan Djärv
2014-05-19  3:38                     ` Dmitry Antipov [this message]
2014-05-19  6:05                       ` Jan D.
2014-05-21 15:13 ` bug#17486: Done Jan Djärv

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=53797CCB.6000204@yandex.ru \
    --to=dmantipov@yandex.ru \
    --cc=17486@debbugs.gnu.org \
    --cc=christian@defun.dk \
    --cc=jan.h.d@swipnet.se \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).