From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Supporting stylistic sets Date: Sat, 24 Sep 2022 09:55:25 +0300 Message-ID: <83r101ntwi.fsf@gnu.org> References: <83wn9up0es.fsf@gnu.org> <83illeou0j.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39852"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: =?utf-8?B?4KS44KSu4KWA4KSwIOCkuOCkv+CkguCkuSBTYW1lZXIgU2luZ2g=?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Sep 24 08:57:54 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 1obz6o-000AEx-AG for ged-emacs-devel@m.gmane-mx.org; Sat, 24 Sep 2022 08:57:54 +0200 Original-Received: from localhost ([::1]:43996 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1obz6m-0002Zv-VH for ged-emacs-devel@m.gmane-mx.org; Sat, 24 Sep 2022 02:57:53 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45418) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obz4f-0001DZ-7M for emacs-devel@gnu.org; Sat, 24 Sep 2022 02:55:41 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:40762) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obz4e-0002SF-NG; Sat, 24 Sep 2022 02:55:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=Nqd8GKUQ+K/0JF5TSKs64GHkoJQ3AMeIGWep/MZIb5g=; b=HT1kBHTdrzw8fywJxBfD s4rj2HFp+xS2nFH2wsjLH3MeAxcGUNhC5zTwkBMJmIwHrHjfUZoJodGLhlKALnROI7niAo4UAI6L2 Gyy8CEx3KCH0AIOIniW+UVpLgTPi+V5aRt5tN5rh/36SVKYJG7DCq7NrVia8L2N45wyhABPzj1XZn 270257pUXXQkSUKoXfm6gnat3rzLGXOSAbffIAflpeYKEtKUOp8y3cSpHodwcHBRje7gSJBVglSoW sbZWffE42QUTq/Vlws8QKhZ1gDqqlB7+BjIvBvL35vD7ZcKUL6y24mUlXMY7kLS9iLYPLxqB4AQmy TH/pVQd+zLtB6g==; Original-Received: from [87.69.77.57] (port=1145 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obz4d-0002Zh-Ub; Sat, 24 Sep 2022 02:55:40 -0400 In-Reply-To: (message from =?utf-8?B?4KS44KSu4KWA4KSwIOCkuOCkv+CkguCkuQ==?= Sameer Singh on Sat, 24 Sep 2022 10:13:47 +0530) 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:296119 Archived-At: > From: समीर सिंह Sameer Singh > Date: Sat, 24 Sep 2022 10:13:47 +0530 > Cc: emacs-devel@gnu.org > > That means all text that uses the font will use that stylistic-set. > Is that good enough? What if you want to have the same font with and > without a specific stylistic-set in the same document?. > > Isn't the point of stylistic-set is that if you don't like a particular glyph of a font you can interchange it for > another, therefore I don't > see why someone would have the same font with and without the stylistic-set in the same document. You are thinking about one particular use case. There might be others. > For example: Tiro Bangla had set the stylistic set because the users could not agree how the হ্+ন and হ্+ণ > conjuncts should look[1]. > It is the case for FiraCode too, simple variations of glyphs which the user can switch out according to their > preference. If we want to support the use case of "just change the appearance of a particular character", then a much simpler implementation would be to use the existing character-composition machinery. Specifically: . add a suitable entry to composition-function-table, with a regexp that matches the characters you want to affect . provide a new variable that can be used to specify which, if any, stylistic feature to use for each character (this could be a char-table, for example) . modify hbfont_shape to consult the above variable and apply the requested features to the affected character(s) Btw, is it always the case that, when using a particular font, users will want to apply the same stylistic-set feature to all of the characters from the font that have alternative glyphs? If not, then font-level feature sets are not going to solve that, and we will need to be able to specify this for each character individually. > And if the font is not the default face's font, it means you need to > setup a special face for using it anyway. > > You mean for scripts like Bangla, Devanagari etc? > For them defining their font-spec wouldn't work? I meant that the way to use a special font in Emacs, for ASCII characters, is to define a special face that uses that font.