From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.bugs Subject: bug#39799: 28.0.50; Most emoji sequences =?UTF-8?Q?don=E2=80=99t?= render correctly Date: Wed, 22 Sep 2021 11:02:04 +0200 Message-ID: <87o88lf0fn.fsf@gmail.com> References: <83lfongp4p.fsf@gnu.org> <835zfrglu5.fsf@gnu.org> <83wo86g8pg.fsf@gnu.org> <83h7zafzwh.fsf@gnu.org> <838skmfox6.fsf@gnu.org> <87h7efhtiz.fsf@gmail.com> <83o88mz3t5.fsf@gnu.org> <87y27qgqt6.fsf@gmail.com> <837dfayzat.fsf@gnu.org> <8335pyyxkx.fsf@gnu.org> <87wnn9g6za.fsf@gmail.com> <837df9ye93.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16401"; mail-complaints-to="usenet@ciao.gmane.io" Cc: rgm@gnu.org, 39799@debbugs.gnu.org, mfabian@redhat.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Sep 22 11:03:26 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mSyA2-00042p-JQ for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 22 Sep 2021 11:03:26 +0200 Original-Received: from localhost ([::1]:50610 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mSyA1-0006OY-9n for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 22 Sep 2021 05:03:25 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59152) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mSy9e-0006O4-7Q for bug-gnu-emacs@gnu.org; Wed, 22 Sep 2021 05:03:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37306) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mSy9e-00039N-01 for bug-gnu-emacs@gnu.org; Wed, 22 Sep 2021 05:03:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mSy9d-0005Iv-Qz for bug-gnu-emacs@gnu.org; Wed, 22 Sep 2021 05:03:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 22 Sep 2021 09:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39799 X-GNU-PR-Package: emacs Original-Received: via spool by 39799-submit@debbugs.gnu.org id=B39799.163230134720326 (code B ref 39799); Wed, 22 Sep 2021 09:03:01 +0000 Original-Received: (at 39799) by debbugs.gnu.org; 22 Sep 2021 09:02:27 +0000 Original-Received: from localhost ([127.0.0.1]:48852 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mSy91-0005Hh-90 for submit@debbugs.gnu.org; Wed, 22 Sep 2021 05:02:27 -0400 Original-Received: from mail-wr1-f48.google.com ([209.85.221.48]:44991) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mSy8q-0005HB-EE for 39799@debbugs.gnu.org; Wed, 22 Sep 2021 05:02:22 -0400 Original-Received: by mail-wr1-f48.google.com with SMTP id d6so4514157wrc.11 for <39799@debbugs.gnu.org>; Wed, 22 Sep 2021 02:02:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-transfer-encoding; bh=0bVQwzwsNTCOFa6Y5EbXi2++x9EBlIv4YY4jgKe6D2Q=; b=N7qkAqbOKm5LAXcJHZl4K0SxQAOQhm8Mr56LBrJzkrtekQXnlHO6seAXPQUGAnJ2Hi o66+Qebo/MfIRDAPMxObMiF3yF/kj4xXO7hBglOb11kw8S3CY5K6yAV3uaKafPqCRb0a 91hs/BEFDyDzUzY2QcYe6WtL0xe82DruW87eX9074+eIdnsrUifyzIAd1U3a6gee4qgP DNxDQ6OA3Z8po0GD3eBQmWtydbhFEIMrdsJ/m+uHrXYaUsZrKeSqW8cN94W+QBEH0Yu+ L0sVDjvm9lPR8EkcwS5YUB0STrJWZqdw+ZypOYq9LoeEscdYv1tqr9tax6LCn8grFg8k C4YQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:mime-version:content-transfer-encoding; bh=0bVQwzwsNTCOFa6Y5EbXi2++x9EBlIv4YY4jgKe6D2Q=; b=2gVSQFgI2yAapBZjY2t+sIml0OebKR0NZLaoMjQPYCkSD7VqGI3aLDP+Ey5pHwNcbq Mn2VWJ9E817w9uwqhjuHDZn8mh7lETLJT6DFyfMC3lHjLKicZzTO0ZiIvWt9Q7k7J6C8 ScGnyv4lVJfS/qRAGDUfRWTuEsm4hNLjpNZ3y5YN2zkdIl1ZITPk7bhtewhHJofOGPfS Y0d83S8oAU/Q8Ug9m0sAN5U8yRdymZ3NLrf6EfO9MxffUGUqUd5ONyFbpgwdCE8oDfNW Pv1mVWiXPhvxTTdI4JkNGGsUDBmPMmR7f0s7dEYH5wedEi2DYEQgz7Bk0nYOSuNrWKnV 4adw== X-Gm-Message-State: AOAM531g4A6zsV+o+yPPufg6X4O0UpXIjb4ObBdj04MdYWZdXQNkJyfj /LNFdo0V9l3ZYD57ai/YWHA= X-Google-Smtp-Source: ABdhPJwZYFKWmXH7uz2kClTGpJo7Qv7Rgo8Akoomr4nm3iJWuGlYRU7lDJXaxnMFJmve7mH5iBV1cA== X-Received: by 2002:a05:600c:b42:: with SMTP id k2mr9378226wmr.134.1632301325972; Wed, 22 Sep 2021 02:02:05 -0700 (PDT) Original-Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id z7sm1277480wmi.43.2021.09.22.02.02.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Sep 2021 02:02:05 -0700 (PDT) In-Reply-To: <837df9ye93.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 21 Sep 2021 21:28:40 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:215079 Archived-At: >>>>> On Tue, 21 Sep 2021 21:28:40 +0300, Eli Zaretskii said: >> From: Robert Pluim >> Cc: rgm@gnu.org, 39799@debbugs.gnu.org, mfabian@redhat.com >> Date: Tue, 21 Sep 2021 19:43:05 +0200 >>=20 >> 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 =3D assq_no_quit (Qemoji, Vscript_representa= tive_chars); >> + if (CONSP (val)) >> + { >> + int face_id; >> + val =3D XCDR (val); >> + if (CONSP (val)) >> + val =3D XCAR (val); >> + else if (VECTORP (val)) >> + val =3D AREF (val, 0); >> + c =3D XFIXNAT (val); >> + face_id =3D FACE_FOR_CHAR (f, face, c, pos - 1, string); >> + face =3D FACE_FROM_ID (f, face_id); >> + } >> + } >> font_object =3D 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 retu= rns 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=CA=BCs not working 100% reliably, sometimes the composition happens but the glyph for the preceding codepoint is not from the emoji font. Robert --=20