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 14:31:02 +0000 Message-ID: <87o769wue4.fsf@protonmail.com> References: <86h6c5y39e.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> <87wmkxwxzu.fsf@protonmail.com> <87plqppwan.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="7740"; 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:18:42 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 1saGWo-0001rQ-13 for ged-emacs-devel@m.gmane-mx.org; Sat, 03 Aug 2024 17:18:42 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1saGWK-00034B-NT; Sat, 03 Aug 2024 11:18:12 -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 1saFmr-0006mj-Oi for emacs-devel@gnu.org; Sat, 03 Aug 2024 10:31:13 -0400 Original-Received: from mail-4316.protonmail.ch ([185.70.43.16]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1saFmp-0004SA-5g; Sat, 03 Aug 2024 10:31:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1722695467; x=1722954667; bh=WAxoK7oKaKVV6lP6szwlUDzO/OsTfxEdr+PiN1No5qI=; 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=WFUe9T2NFpQxIXPKAH7+lP2xBhsjDWN+QwxAWQdcp1v0LBKr6Xcn4KL/AL+z0Gz0t Pg5KM0/iUxx6QlJfCUOs61ONbY28vNPa2Q9QqdnKNapDON8zT40wiyLEeA3tqcNa7T qlnObF+xGDqMMejms8sQY40Ij71LAI5VIZdQtR4wGcUR2oCgVMvUMZRU94kM2mFjAa qxDFkkO8WIJJOucSIGKGtOLDcEQxf+chM5G9q9C4zVZuOn7pg/aNtgYn996b0zgWq/ ZllNHGiWTyqC7zYwL1zCRG/4XJKR82EnkVNjXNstbokJqjJIhZy2C5poaGkcWHCSk/ Xdz85G2GPVBzA== In-Reply-To: <87plqppwan.fsf@yahoo.com> Feedback-ID: 112775352:user:proton X-Pm-Message-ID: 4bf2f6dccd931ad987f5f8e2832548ae299f3610 Received-SPF: pass client-ip=185.70.43.16; envelope-from=pipcet@protonmail.com; helo=mail-4316.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=ham 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:322307 Archived-At: "Po Lu" writes: > pipcet@protonmail.com writes: > >> 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. > > Yes, because OTTO fonts are actually a completely distinct format from > TTF, with a unique bytecode language for constructing glyph outlines. > See: > > https://learn.microsoft.com/en-us/typography/opentype/spec/glyphformatc= omparison Thanks! So supporting these fonts on Android using the sfnt driver is very hard, correct? The androidfont.c fallback driver appears to support them, but I understand that's not a good option either. (I tried (set-frame-parameter nil 'font-backend "android") and the difference in a C-h h buffer was quite noticeable). >> 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. > > That's quite a circutous means of obtaining a TTF version of the Noto > CJK fonts. Agreed, but at least the size is manageable (probably due to loss of quality, though). > These fonts are compiled into both formats from a number of > common source files, and there is an index of the options available at: > > https://github.com/notofonts/noto-cjk/tree/main/Serif > > an amalgamation of all CJK variants is: > > https://github.com/googlefonts/noto-cjk/raw/main/Serif/Variable/OTC/Not= oSerifCJK-VF.ttf.ttc > > but since it is enormous, I suggest installing only those regional > variants which cover the scripts you require. In any case, asking users to install an extra font only to see basic CJK glyphs can't be a long-term solution, can it? Pip