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 #281 received at 39799 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Robert Pluim <rpluim <at> gmail.com>
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: Tue, 21 Sep 2021 21:28:40 +0300
> 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).

Yes, with a minor comment below.

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

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

> @@ -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;

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

Thanks.




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.