From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.emacs.devel Subject: Re: master bf0aeaa0d7a: Re-enable displaying `han' characters on Android Date: Sat, 03 Aug 2024 16:52:27 +0800 Message-ID: <877ccyq984.fsf@yahoo.com> References: <86h6c5y39e.fsf@gnu.org> <87plqtf6m0.fsf@yahoo.com> <864j84yfjh.fsf@gnu.org> <8734noslmt.fsf@yahoo.com> <86sevowp2q.fsf@gnu.org> <87frror0vs.fsf@yahoo.com> <87r0b7i4cn.fsf@turtle-trading.net> <86ttg3umzz.fsf@gnu.org> <87plqrm6dd.fsf@turtle-trading.net> <875xsj83ui.fsf@turtle-trading.net> <87cymqxepd.fsf@protonmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21820"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Benjamin Riefenstahl , Eli Zaretskii , emacs-devel@gnu.org To: pipcet@protonmail.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Aug 03 10:53:38 2024 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 1saAWA-0005Wc-07 for ged-emacs-devel@m.gmane-mx.org; Sat, 03 Aug 2024 10:53:38 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1saAVP-0006nw-Fh; Sat, 03 Aug 2024 04:52:51 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1saAVO-0006nY-7O for emacs-devel@gnu.org; Sat, 03 Aug 2024 04:52:50 -0400 Original-Received: from sonic316-22.consmr.mail.ne1.yahoo.com ([66.163.187.148]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1saAVM-0003Rb-6W for emacs-devel@gnu.org; Sat, 03 Aug 2024 04:52:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1722675165; bh=z7c9ACEiOAcfmBA7mj3ssYawsLpA2KdmdJHYt2aDtYs=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=g1ZOvFs4WKCns8AVJUdjrQ3p99hrV0m/xorcy6y+lAC33sMhhThvMWzC6ojekuGgv6QZocvUNHkBBNNLiunijYbH6c5Ef/6Zc3mcrM6cNlX/t+mvtSNZPzk3lqQqh0jBOzft0wd0YSjBObd0HNoLFq78cdgc50iQlJyIa4AyX5kheLZpHK27ByX+rjziP4z+cOHV9eJWfrLVOuPG41B8iePc4ThoxC09ZYuk19ffnCkbBl2tbXWwGI+KGf5CDHmtSgBZX1tSgSQsLoP5LynhCWeJGzwVE29z+XM82ArQ5SQgbUq7jWhNdoEsEtSbm4BGmz5TQX+I1M5BdhsBuyK2DQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1722675166; bh=GrCvlJ+WBW0BYYB0c0DHhoYIqYl2bnP+2Wtz+22bgan=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=F8m5emAzuplBV9uvReFS8Vt+4yKo46WwrFOT7qTzD6WbI4663mQ3KVrClMhShBfVTRE98wRmltf4y5WmSTBuJG2WyNfI+3mSHS19+7ekFreb4BMTgkbKalOAVVkV14LWxqOTY4nAFaPqj+xpzgFR2BmzbPNFC1ktTFmpm9WRTGjRGoPgjw5CO98JNIMNzzOcEztFFhFDsNtTkwbtg+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Received: from sonic.gate.mail.ne1.yahoo.com by sonic316.consmr.mail.ne1.yahoo.com with HTTP; Sat, 3 Aug 2024 08:52:45 +0000 Original-Received: by hermes--production-sg3-fc85cddf6-tm2cm (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 1198dbd8566b3219e30974513b866b60; Sat, 03 Aug 2024 08:52:39 +0000 (UTC) In-Reply-To: <87cymqxepd.fsf@protonmail.com> (pipcet@protonmail.com's message of "Sat, 03 Aug 2024 07:12:18 +0000") X-Mailer: WebService/1.1.22544 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.187.148; envelope-from=luangruo@yahoo.com; helo=sonic316-22.consmr.mail.ne1.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:322296 Archived-At: pipcet@protonmail.com writes: > "Benjamin Riefenstahl" writes: > >> Benjamin Riefenstahl writes: >>> I don't know what is going on. Must have been something I did earlier >>> in that other session. >> >> It's the order. If I first evaluate the version with fewer characters, >> I get a font for that and for the longer list of characters after that, >> too. > > I've looked at that a little, and I don't think 'clear-font-cache', uh, > clears the font cache. > > ftfont.c also interns random binary strings as symbols here. This helps: > > diff --git a/src/ftfont.c b/src/ftfont.c > index c89feea1d46..882d3eec256 100644 > --- a/src/ftfont.c > +++ b/src/ftfont.c > @@ -174,11 +174,11 @@ get_adstyle_property (FcPattern *p) > USE_SAFE_ALLOCA; > tmp = SAFE_ALLOCA (end - str); > for (i = 0; i < end - str; ++i) > - tmp[i] = ((end[i] != '?' > - && end[i] != '*' > - && end[i] != '"' > - && end[i] != '-') > - ? end[i] : ' '); > + tmp[i] = ((str[i] != '?' > + && str[i] != '*' > + && str[i] != '"' > + && str[i] != '-') > + ? str[i] : ' '); > adstyle = font_intern_prop (tmp, end - str, 1); > SAFE_FREE (); > if (font_style_to_value (FONT_WIDTH_INDEX, adstyle, 0) >= 0) [...] > sfntfont.c only looks at the first fixnum in a vector specified in > Vscript_representative_chars, and fails if it isn't there, even though > it should continue looking. These have been fixed. > xfont.c is particularly weird: it's limited to 64k characters, of > course, but it also hardcodes 'han as a supported script for all > Japanese or Korean fonts; and xfont_has_char will return false for all > non-ASCII chars in iso10646-1 fonts that don't have "ja" or "ko" > adstyles. In addition, it has its own caching mechanism > (xfont_scripts_cache) which is never cleared, shrunk, or exposed to > Lisp. No, xfont_has_char will return a value that indicates that the presence of the character cannot be established without opening the font. > w32font.c seems to ignore Vscript_representative_chars entirely. This > also appears to apply to the harfbuzz backend. I wouldn't tamper with either of these backends. > GNU Unifont now supports #x20000 (since February), but is split into two > fonts, one for the BMP and one for the upper planes, so it won't be > detected here. > > So I'm not sure which font backends the additional required characters > are supposed to have a positive effect on. All except w32font, I guess.