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 22:39:16 +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> <834jwwolyz.fsf@gnu.org> <8335cgol11.fsf@gnu.org> <83y1u8n414.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000006749a705e96f5bb6" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27670"; 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 19:10:49 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 1oc8fw-00074J-P3 for ged-emacs-devel@m.gmane-mx.org; Sat, 24 Sep 2022 19:10:48 +0200 Original-Received: from localhost ([::1]:39234 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oc8fv-0004hS-JM for ged-emacs-devel@m.gmane-mx.org; Sat, 24 Sep 2022 13:10:47 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52928) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oc8eh-0003gA-8e for emacs-devel@gnu.org; Sat, 24 Sep 2022 13:09:31 -0400 Original-Received: from mail-yw1-x1130.google.com ([2607:f8b0:4864:20::1130]:45746) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oc8ef-0000UM-Eg; Sat, 24 Sep 2022 13:09:31 -0400 Original-Received: by mail-yw1-x1130.google.com with SMTP id 00721157ae682-3450990b0aeso29065327b3.12; Sat, 24 Sep 2022 10:09:28 -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=yTZtexpTEPYrYVhnSxPd1P58Tc7AsH8wbBCowrl0xG4=; b=qMNsThA3EW9+Tb1NyQZBiKBKIqZIo99noS0YvL0bBnJ8eMH1KE6NzZI8nDL1awMXVd li6uwevJAxY/TbxacWsjC8xHl2xs6K8rp9pF1OPKmUrgbMOtUL/dffuECLlDZqIb9oMm h6mZDvnAsNQ2hcT9MlB67G6CAF8ggQvqDHc4HoBFnMqY9VdWFj3R9sjBPpA9lbmbvIBt UqW2jDe8KbYxAQk7A/ET6pfRs8tTdOlJ9HYT3HW6eJL3CW0zEFOf5lIgnmCTCTik9vkR 6FE5zRBEQ3sRZsPY/x6WdkcEIIwY07guxyUCgw3S8CD0P0bxlyyrapDkP6Q7Yt8SaUPH ieaw== 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=yTZtexpTEPYrYVhnSxPd1P58Tc7AsH8wbBCowrl0xG4=; b=rWNemOLic5JXpKiz9H5UOYD8S/WWik9s9GBNs7I+AyI1OifLBHjEi376Gyg/+54qB3 41s467X+EiRyY27ud5q7opeclbuMpll5bUWKIiUu3LKRUGCW6fGYpvOnTb1kPjEj1aoj H68mo2VVNjyWd4Ml6aa+EPisPeoQ4l2xnyZOU5T+rLqPNfYJ9/p4qD6zEL7BkBkZ4O73 OQBESnPJekcEmrA3CL2XnlkWI7bkhqxdJs83wZJ3D3RS8JonmvtmeeWV0MwjPJ7tYfzm g9HWNXZWougtArzcd6LAyu59t5l8PLaZnXAwKkoSp1osulomammlUD8n87U80UmB4Elr BhNQ== X-Gm-Message-State: ACrzQf3didUM/GBeWMPllnckQJPJoe4DGDIQTmw0vROBU9fdSIsh4Tto Vi230b9KtSVQbBGLleHIE6ZlPb7Tka8kkRs0hp/UPzM8eU8RIddH X-Google-Smtp-Source: AMsMyM4CyH0aYXCKEi2LLRlpXIC8Q0jpgSnzDygrM3IYD5SNbpF2X7taucU93Tf6Cxg+d3+6D28ofa1CKDet4d4W1es= X-Received: by 2002:a81:4e97:0:b0:348:e5b8:8671 with SMTP id c145-20020a814e97000000b00348e5b88671mr13612834ywb.96.1664039367689; Sat, 24 Sep 2022 10:09:27 -0700 (PDT) In-Reply-To: <83y1u8n414.fsf@gnu.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::1130; envelope-from=lumarzeli30@gmail.com; helo=mail-yw1-x1130.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:296173 Archived-At: --0000000000006749a705e96f5bb6 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, Sep 24, 2022 at 9:44 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 21:20:03 +0530 > > Cc: emacs-devel@gnu.org > > > > On Sat, Sep 24, 2022 at 8:52 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 20:32:26 +0530 > > > Cc: emacs-devel@gnu.org > > > > > > no, the same would work > > > > Then I don't understand how will HarfBuzz know to apply the first tag > > to 'i', but the second one to 'l'. > > > > The font file has a GSUB table for this purpose > > I'm sorry, I still don't understand. (I'm not an expert on fonts, so > I'd appreciate a slightly more detailed explanations.) Are you saying > that each tag can be used by a single character in a font? IOW, no > feature tag can ever be shared by two or more characters in a font? > IIUC, then yes. > The HarfBuzz docs says: > > The hb_feature_t is the structure that holds information about > requested feature application. The feature will be applied with the > given value to all glyphs which are in clusters between start > (inclusive) and end (exclusive). > > This seems to say that we need to set START and END of each feature to > buffer positions of the characters to which we want the feature to be > applied. That is why I said that START and END should be set > separately for each feature, according to the positions of the > corresponding characters in the buffer submitted to hb_shape_full. > I don't think that is the case, I have attached a slightly modified harfbuzz-tutorial[1], where I have defined four features for a,g,i and l respectively with the same start and end variables. It works as expected. You can provide it with the path to a firacode font file and the text which it has to display and it will produce a png. [1] https://github.com/harfbuzz/harfbuzz-tutorial --0000000000006749a705e96f5bb6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Sat, Sep 24, 2022 at 9:44 PM Eli Zaretskii <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 21:20:03 +0530
> Cc: emacs-dev= el@gnu.org
>
> On Sat, Sep 24, 2022 at 8:52 PM Eli Zaretskii <eliz@gnu.org> wrote:
>
>=C2=A0 > 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>
>=C2=A0 > Date: Sat, 24 Sep 2022 20:32:26 +0530
>=C2=A0 > Cc: emacs-devel@gnu.org
>=C2=A0 >
>=C2=A0 > no, the same would work
>
>=C2=A0 Then I don't understand how will HarfBuzz know to apply the = first tag
>=C2=A0 to 'i', but the second one to 'l'.
>
> The font file has a GSUB table for this purpose

I'm sorry, I still don't understand.=C2=A0 (I'm not an expert o= n fonts, so
I'd appreciate a slightly more detailed explanations.)=C2=A0 Are you sa= ying
that each tag can be used by a single character in a font?=C2=A0 IOW, no feature tag can ever be shared by two or more characters in a font?

IIUC, then yes.
=C2=A0
The HarfBuzz docs says:

=C2=A0 The hb_feature_t is the structure that holds information about
=C2=A0 requested feature application. The feature will be applied with the<= br> =C2=A0 given value to all glyphs which are in clusters between start
=C2=A0 (inclusive) and end (exclusive).

This seems to say that we need to set START and END of each feature to
buffer positions of the characters to which we want the feature to be
applied.=C2=A0 That is why I said that START and END should be set
separately for each feature, according to the positions of the
corresponding characters in the buffer submitted to hb_shape_full.

I don't think that is the case, I have atta= ched a slightly modified harfbuzz-tutorial[1],
where I have defin= ed four features for a,g,i and l respectively with the same start and end v= ariables.
It works as expected.

You can = provide it with the path to a firacode font file and the text which it has = to display and it will produce a png.

--0000000000006749a705e96f5bb6--