From: Pip Cet <pipcet@protonmail.com>
To: Po Lu <luangruo@yahoo.com>
Cc: Benjamin Riefenstahl <b.riefenstahl@turtle-trading.net>,
Eli Zaretskii <eliz@gnu.org>,
emacs-devel@gnu.org
Subject: Re: master bf0aeaa0d7a: Re-enable displaying `han' characters on Android
Date: Wed, 07 Aug 2024 17:52:51 +0000 [thread overview]
Message-ID: <878qx8te33.fsf@protonmail.com> (raw)
In-Reply-To: <s54ikwhvepr.fsf@yahoo.com>
"Po Lu" <luangruo@yahoo.com> 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
next prev parent reply other threads:[~2024-08-07 17:52 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-31 15:45 master bf0aeaa0d7a: Re-enable displaying `han' characters on Android Eli Zaretskii
2024-08-01 0:07 ` Po Lu
2024-08-01 0:33 ` Po Lu
2024-08-01 5:52 ` Eli Zaretskii
2024-08-01 7:55 ` Po Lu
2024-08-01 8:52 ` Eli Zaretskii
2024-08-01 9:47 ` Po Lu
2024-08-01 9:56 ` Eli Zaretskii
2024-08-01 10:13 ` Po Lu
2024-08-01 10:19 ` Eli Zaretskii
2024-08-01 21:17 ` Dmitry Gutov
2024-08-01 5:32 ` Eli Zaretskii
2024-08-01 8:16 ` Po Lu
2024-08-01 9:49 ` Eli Zaretskii
2024-08-01 10:30 ` Po Lu
2024-08-01 10:35 ` Eli Zaretskii
2024-08-02 10:52 ` Benjamin Riefenstahl
2024-08-02 12:29 ` Eli Zaretskii
2024-08-02 12:55 ` Benjamin Riefenstahl
2024-08-02 13:13 ` Benjamin Riefenstahl
2024-08-03 7:12 ` pipcet
2024-08-03 8:52 ` Po Lu
2024-08-03 9:21 ` pipcet
2024-08-03 9:33 ` Po Lu
2024-08-03 13:13 ` pipcet
2024-08-03 13:31 ` Po Lu
2024-08-03 14:31 ` pipcet
2024-08-03 14:54 ` Po Lu
2024-08-07 17:52 ` Pip Cet [this message]
2024-08-08 0:10 ` Po Lu
2024-08-09 12:33 ` Pip Cet
2024-08-09 13:10 ` Po Lu
2024-08-03 15:15 ` Eli Zaretskii
2024-08-02 10:44 ` Benjamin Riefenstahl
2024-08-02 11:42 ` Po Lu
2024-08-01 7:57 ` Andrea Corallo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878qx8te33.fsf@protonmail.com \
--to=pipcet@protonmail.com \
--cc=b.riefenstahl@turtle-trading.net \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=luangruo@yahoo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).