GNU bug report logs - #39799
28.0.50; Most emoji sequences don’t render correctly

Previous Next

Package: emacs;

Reported by: Mike FABIAN <mfabian <at> redhat.com>

Date: Wed, 26 Feb 2020 14:30:03 UTC

Severity: normal

Found in version 28.0.50

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #287 received at 39799 <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: rgm <at> gnu.org, 39799 <at> debbugs.gnu.org, mfabian <at> redhat.com
Subject: Re: bug#39799: 28.0.50; Most emoji sequences don’t render correctly
Date: Wed, 22 Sep 2021 11:02:04 +0200
>>>>> On Tue, 21 Sep 2021 21:28:40 +0300, Eli Zaretskii <eliz <at> gnu.org> said:

    >> From: Robert Pluim <rpluim <at> gmail.com>
    >> Cc: rgm <at> gnu.org,  39799 <at> debbugs.gnu.org,  mfabian <at> redhat.com
    >> Date: Tue, 21 Sep 2021 19:43:05 +0200
    >> 
    >> Eli, is this the kind of thing you were thinking of? Seems to work so
    >> far (with a small addition to blocks.awk).

    Eli> Yes, with a minor comment below.

    >> We'll need to find a better name for the new arg than 'trigger'
    >> though.

    Eli> How about just 'ch'?  We use such names all over the place, so
    Eli> describing what it is in the comment should be enough.

OK

    >> @@ -3912,6 +3916,23 @@ font_range (ptrdiff_t pos, ptrdiff_t pos_byte, ptrdiff_t *limit,
    >> continue;
    >> if (NILP (font_object))
    >> {
    >> +	  if (EQ (CHAR_TABLE_REF (Vchar_script_table, trigger),
    >> +		  Qemoji))
    >> +	    {
    >> +	      Lisp_Object val = assq_no_quit (Qemoji, Vscript_representative_chars);
    >> +	      if (CONSP (val))
    >> +		{
    >> +		  int face_id;
    >> +		  val = XCDR (val);
    >> +		  if (CONSP (val))
    >> +		    val = XCAR (val);
    >> +		  else if (VECTORP (val))
    >> +		    val = AREF (val, 0);
    >> +		  c = XFIXNAT (val);
    >> +		  face_id = FACE_FOR_CHAR (f, face, c, pos - 1, string);
    >> +		  face = FACE_FROM_ID (f, face_id);
    >> +		}
    >> +	    }
    >> font_object = font_for_char (face, c, pos - 1, string);
    >> if (NILP (font_object))
    >> return Qnil;

    Eli> For backward compatibility, I'd prefer here, if font_for_char returns
    Eli> nil for the representative Emoji character, to call font_for_char
    Eli> again with the face and codepoint for the original character.

OK. I spoke a little too soon, itʼs not working 100% reliably,
sometimes the composition happens but the glyph for the preceding
codepoint is not from the emoji font.

Robert
-- 




This bug report was last modified 3 years and 256 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.