From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?B?4KS44KSu4KWA4KSwIOCkuOCkv+CkguCkuSBTYW1lZXIgU2luZ2g=?= Newsgroups: gmane.emacs.devel Subject: Re: Supporting stylistic sets Date: Sat, 24 Sep 2022 19:56:47 +0530 Message-ID: References: <83wn9up0es.fsf@gnu.org> <83illeou0j.fsf@gnu.org> <83r101ntwi.fsf@gnu.org> <83illdnpn3.fsf@gnu.org> <83h70xnp43.fsf@gnu.org> <83bkr5ne65.fsf@gnu.org> <83a66pnczg.fsf@gnu.org> <837d1sonyc.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000051686d05e96d1676" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23832"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Sep 24 16:28:08 2022 Return-path: Envelope-to: ged-emacs-devel@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 1oc68V-000660-KM for ged-emacs-devel@m.gmane-mx.org; Sat, 24 Sep 2022 16:28:07 +0200 Original-Received: from localhost ([::1]:36268 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oc68U-0005e4-20 for ged-emacs-devel@m.gmane-mx.org; Sat, 24 Sep 2022 10:28:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50606) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oc67R-0004cz-Tn for emacs-devel@gnu.org; Sat, 24 Sep 2022 10:27:01 -0400 Original-Received: from mail-yb1-xb2d.google.com ([2607:f8b0:4864:20::b2d]:37381) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oc67Q-0001ny-CO; Sat, 24 Sep 2022 10:27:01 -0400 Original-Received: by mail-yb1-xb2d.google.com with SMTP id 63so3281541ybq.4; Sat, 24 Sep 2022 07:26:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=WWQ8NO7JVdKKDMJImXDBnvM+KMzVkXM4B2JDuqpkE2s=; b=pyTBBpGv78oh3NgAujF7RmHCZK2iVw3QpL2f3PWGkwtqegf1vYsYn1bIp8PYFlA5oq hAsvqLIhX7ivsMo1Tvl/OHkTAUYkkPic0orJ2hVN9hgzyV6cXS4ygSH1pl7AMy/4KF4M bAATjfBbJCDGRcQ0Q3mBi6lHyFCtMNRKinJRQBLkTJFy8rxxw+4wJgBRpTQJ5KiIXAcT M1g+0uG9OP5cKbYDzMA4J4NoiambugLSnaoU7OGdoOzOxkf6EOj1slJx42IvpU/zPLgr 5GHnGpGVxcyjDExCW9aua5RZ6qJTQc++Y/JhSSJ4ZyTuoL3F5KvQQBhCldFAL6FSNl5P bHwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=WWQ8NO7JVdKKDMJImXDBnvM+KMzVkXM4B2JDuqpkE2s=; b=pcub/kZT4LwV1cDg3yyL4WB7WXdlGT8KAv1oud2AmZUhAN5gQD035I7eoO2hjRYO3P G98byV+KGkbj0VRoc+yjImGItTfFW0PnBQiBJl2elTTD/eip5Y1Vo+YxtpJjN8TRgDrD e1v4PZanctTzNbTcllpTxHcSOpSucoC3RfchtMxzPq2SDAD9wRWnXkkjN2/CZf9vnlii rrYF24//UoUFlNOA86e6Mf9+SLe+to3zILddifKFDvJCNYdvF2ylsbqAvppDn+DS+mh0 kUlV4aMOJ9ztN6+lIvr3If802NVCqC0xgqCeOf4yzdqvk8u0SxJCpx5mUH6JBCtaphAo GYSw== X-Gm-Message-State: ACrzQf0wH85BJd8b5tvFgjoIHyLBwadxDxMjQWLIwEY5Ai3hHZ2YEabg itZs53PZBACx7ZtOw21fHL3zrAOx2A0vqICpFzZEy990oMIXu8B5 X-Google-Smtp-Source: AMsMyM6Npavwq+9C18O8EjvYgL1v5TgQvC6f8mr2Wfc3+wG5x8XvDHA+If4vNnXvqIY976qOPfFgbrrFg8ctCwmkW3g= X-Received: by 2002:a05:6902:13c7:b0:695:84d9:c5da with SMTP id y7-20020a05690213c700b0069584d9c5damr14220334ybu.650.1664029618692; Sat, 24 Sep 2022 07:26:58 -0700 (PDT) In-Reply-To: <837d1sonyc.fsf@gnu.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::b2d; envelope-from=lumarzeli30@gmail.com; helo=mail-yb1-xb2d.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:296156 Archived-At: --00000000000051686d05e96d1676 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Simply pass both of their tags to hb_shape_full, which I think would be done something like this: hb_feature_t features[] =3D {{HB_TAG("c","v","0","6"), 1, start, end}, {HB_TAG("c","v","0","8"), 1, start, end}}; hb_shape_full(font, buffer, features, 2, NULL); On Sat, Sep 24, 2022 at 7:48 PM Eli Zaretskii wrote: > > From: =E0=A4=B8=E0=A4=AE=E0=A5=80=E0=A4=B0 =E0=A4=B8=E0=A4=BF=E0=A4=82= =E0=A4=B9 Sameer Singh > > Date: Sat, 24 Sep 2022 18:40:55 +0530 > > Cc: emacs-devel@gnu.org > > > > You are suggesting that we let the font and the shaping engine decide > > which alternative to use? That sounds un-Emacsy to me. For the use > > case where only specific characters should be affected, I think we > > should have a facility whereby users could specify, for each character > > that has alternatives, which one to use. > > > > No, I am not suggesting that every variation has its own tag and the > user can choose which tag they would > > like or not. > > For example look at the FiraCode variations attached > > So what do I do if I want variant 4 for 'i' and variant 2 for 'l'? > --00000000000051686d05e96d1676 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Simply pass both of their tags to hb_shape_full, whic= h I think would be done something like this:

hb_fe= ature_t features[] =3D {{HB_TAG("c","v","0",&= quot;6"), 1, start, end}, {HB_TAG("c","v","0&= quot;,"8"), 1, start, end}};
hb_shape_full(font, buffer= , features, 2, NULL);

On Sat, Sep 24, 2022 at 7:48 PM Eli Zaretski= i <eliz@gnu.org> wrote:
=
> From: =E0=A4=B8=E0= =A4=AE=E0=A5=80=E0=A4=B0 =E0=A4=B8=E0=A4=BF=E0=A4=82=E0=A4=B9 Sameer Singh = <lumarzeli30@= gmail.com>
> Date: Sat, 24 Sep 2022 18:40:55 +0530
> Cc: emacs-dev= el@gnu.org
>
>=C2=A0 You are suggesting that we let the font and the shaping engine d= ecide
>=C2=A0 which alternative to use?=C2=A0 That sounds un-Emacsy to me.=C2= =A0 For the use
>=C2=A0 case where only specific characters should be affected, I think = we
>=C2=A0 should have a facility whereby users could specify, for each cha= racter
>=C2=A0 that has alternatives, which one to use.
>
> No, I am not suggesting that every variation has its own tag and the u= ser can choose which tag they would
> like or not.
> For example look at the FiraCode variations attached

So what do I do if I want variant 4 for 'i' and variant 2 for '= l'?
--00000000000051686d05e96d1676--