From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: pipcet@protonmail.com Newsgroups: gmane.emacs.devel Subject: Re: master bf0aeaa0d7a: Re-enable displaying `han' characters on Android Date: Sat, 03 Aug 2024 13:13:11 +0000 Message-ID: <87wmkxwxzu.fsf@protonmail.com> References: <86h6c5y39e.fsf@gnu.org> <87r0b7i4cn.fsf@turtle-trading.net> <86ttg3umzz.fsf@gnu.org> <87plqrm6dd.fsf@turtle-trading.net> <875xsj83ui.fsf@turtle-trading.net> <87cymqxepd.fsf@protonmail.com> <877ccyq984.fsf@yahoo.com> <871q36x8pi.fsf@protonmail.com> <87wmkyosr5.fsf@yahoo.com> 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="10306"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Benjamin Riefenstahl , Eli Zaretskii , emacs-devel@gnu.org To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Aug 03 17:19:22 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 1saGXS-0002Uz-Os for ged-emacs-devel@m.gmane-mx.org; Sat, 03 Aug 2024 17:19:22 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1saGWL-00037J-JV; Sat, 03 Aug 2024 11:18:13 -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 1saEZX-0004wP-L6 for emacs-devel@gnu.org; Sat, 03 Aug 2024 09:13:23 -0400 Original-Received: from mail-40134.protonmail.ch ([185.70.40.134]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1saEZV-0007iD-9S for emacs-devel@gnu.org; Sat, 03 Aug 2024 09:13:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1722690798; x=1722949998; bh=W79ev3s73Kmt5JiXlhAIRHuawbRiWd7u13kfm0Y1Hzk=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=b7MkGZwrfIGO4fE2coAWFYzopLGvqFB8mr2/mg3QP0qL0EjWjJsyMNZFtcjHmqZst edH9QoKHKhnUYSrYZXFH7SyQWTVRc/mE8pUfiYMn5TwqUMyNZS62tygjyGujOBjvzY odp0yIFd1ZsWipzexbJgLmAGeo2lxL22ytxkrAtwciSd4BFENKU7dBth27jcRowTim WnlMyBflA9qg10KmrllH9eVQ3p9pTaqQvSQq6vF3aOQeYv6NdkOEQf0LI2NU2Ql0PT S0y900GHPBd9Bg8r0onX/8PitV/5j0syt5lt+9aP8Q3daI+jmI9+tAbY7FOR/S0qxJ ego5wUvX0Nb8w== In-Reply-To: <87wmkyosr5.fsf@yahoo.com> Feedback-ID: 112775352:user:proton X-Pm-Message-ID: 1170b7018e9d04754936f5ea29ec53ff563f78ab Received-SPF: pass client-ip=185.70.40.134; envelope-from=pipcet@protonmail.com; helo=mail-40134.protonmail.ch 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sat, 03 Aug 2024 11:18:11 -0400 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:322310 Archived-At: "Po Lu" writes: > pipcet@protonmail.com writes: > >> Thank you! >> >> One more thing I'm noticing is that on Android, the foundry >> string/ach_vendor_id is interned as OG^A@ rather than GOOG. It seems to >> me that removing the second read() call in >> daefd6771a4879bb8e71ea67f69522700155df01 may have caused the >> problem. IIUC, panose[] is four-byte-aligned, but ul_unicode_range is >> not, and that messes up our offsets. Is that correct? > > Right, I misunderstood FreeType's implementation. Also fixed. Thanks again! I really appreciate that there's a second set of eyeballs going over these before pushing to master, let alone emacs-30 :-) The next issue on my LineageOS (an Android variant) phone is that the Noto CJK fonts have an "OTTO" header, not a "true"/00010000 one, so they're not enumerated at all. At first glance, this doesn't appear to be a LineageOS quirk; downloads available elsewhere also have the OTTO header. My understanding of the source code is we currently don't support OTTO fonts at all, and my experiment in forcing the header to be recognized seems to agree with me there: I get tofu even for ASCII characters, which FontForge indicates are present in the font. I have (lossily!) converted Noto Sans CJK SC to TTF format (with a "glyf" table), and installed that in /data/data/org.gnu.emacs/files/fonts, customized the "region" face to use that font, and now I can see some Han characters when I select them, but they turn into tofu when using the default face. (It's possible this is due to the experiment I've described above and goes away when I revert it...) Of course, Noto CJK doesn't provide U+20000 (it does provide U+2000B), so all this is a bit off-topic. Pip