From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pip Cet Newsgroups: gmane.emacs.devel Subject: Re: master bf0aeaa0d7a: Re-enable displaying `han' characters on Android Date: Wed, 07 Aug 2024 17:52:51 +0000 Message-ID: <878qx8te33.fsf@protonmail.com> References: <86h6c5y39e.fsf@gnu.org> <87cymqxepd.fsf@protonmail.com> <877ccyq984.fsf@yahoo.com> <871q36x8pi.fsf@protonmail.com> <87wmkyosr5.fsf@yahoo.com> <87wmkxwxzu.fsf@protonmail.com> <87plqppwan.fsf@yahoo.com> <87o769wue4.fsf@protonmail.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="1859"; 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 Thu Aug 08 06:38:57 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 1sbuvQ-0000It-Dw for ged-emacs-devel@m.gmane-mx.org; Thu, 08 Aug 2024 06:38:56 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sbuua-0006Vj-2y; Thu, 08 Aug 2024 00:38:04 -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 1sbkqJ-0005g0-RU for emacs-devel@gnu.org; Wed, 07 Aug 2024 13:52:59 -0400 Original-Received: from mail-4322.protonmail.ch ([185.70.43.22]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sbkqH-0000w9-P0 for emacs-devel@gnu.org; Wed, 07 Aug 2024 13:52:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1723053175; x=1723312375; bh=HVb38U0HFcsMl0LrDIx0VMlgwpd6RNG7+NOHQoI6ENI=; 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=lsIJWRS+HdNEZ5Ek+9DGgOV/BJSP9kqUkPYkQp48uQLd7AUVVIyKkZvbVEf0xGx2E mhu2RPl9uzd081FOrTUHtXsl/y6hsyvAdf4GlZ5pNDdG2am4Xez/VL9UAHDOi1dSU4 m8Wc472+d1WrBFNZok/g8gRXEB7xsRH6SvFlQIPbuGq2hvG1tZNal30pv+BuUUSVjy 0LV1w02APynH/BDOkcHm2GNQuvDcqqx78JF+w5fQbRr6RvCYlxJKFnlHe/MmVMtuzn G2uAmKn3uUn+oO5SbWldl/VA2fbxy+f0/m2uQYyOgipZs6IZm8a1YbUfgaHBS5ZXp6 w+m0471nHOFFw== In-Reply-To: Feedback-ID: 112775352:user:proton X-Pm-Message-ID: 782991e6834674e15b1a08807b0b092c2be22396 Received-SPF: pass client-ip=185.70.43.22; envelope-from=pipcet@protonmail.com; helo=mail-4322.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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Thu, 08 Aug 2024 00:38:00 -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:322530 Archived-At: "Po Lu" writes: > pipcet@protonmail.com writes: > >> Thanks! So supporting these fonts on Android using the sfnt driver is >> very hard, correct? > > Yes, it would amount to writing a new font driver. Just so that we have that option, I've done the minimal work necessary to build Emacs for Android with fontconfig and the ftcrhb and ftcr font drivers. As far as I can tell, it works now (including, regrettably, color emoji provided in font files). Harfbuzz shaping seems to work, too. I still have to look at what the DRAW_CURSOR stuff does... Of course there are good reasons not to want to do this: the sfntfont-android driver is very fast, this is not. It also requires an additional file to configure fontconfig and a cache directory for fontconfig's disk-based cache. Plus there are the extra dependencies... Obviously, this would be and remain an optional feature, with the other font drivers still available (that's not true for my test builds including these and quite a few other changes, which currently disable the android-specific drivers: https://codeberg.org/pipcet/emacs-android ) >> 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). > > Correct. Which devices in the androidfont.c driver currently used on? Very old ones with 15/16 bpp? >> 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? > > Till someone implements the aforesaid new font driver, why not? The > font is installed once, and that is the end of the matter, and > ultimately it is the same font that would ideally be loaded from > /system/fonts, with no degredation in quality. How do we know? I can't find this alleged source form for the Noto CJK font anywhere, just binaries produced by Google. Maybe they are editing one of the versions directly, and generating the other one from it, which would probably mean the secondary version is degraded in quality, but even then Google would have to make available instructions for how to build one from the other in order for the font to be considered free (or, if I understand the OSI definition correctly, "open source") > The source code must be the preferred form in which a programmer would > modify the program. Deliberately obfuscated source code is not > allowed. Intermediate forms such as the output of a preprocessor or > translator are not allowed. Anyway, here's the main part of the patch: Pip