all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
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: Fri, 09 Aug 2024 12:33:37 +0000	[thread overview]
Message-ID: <87ed6xswo2.fsf@protonmail.com> (raw)
In-Reply-To: <87y157naca.fsf@yahoo.com>

"Po Lu" <luangruo@yahoo.com> writes:

> Pip Cet <pipcet@protonmail.com> writes:
>
>> 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 )
>
> Thanks, but I won't agree to install this

No problem at all. Thanks for your response.

> the invariable rule is that
> people, for foolish reasons, will begin to use this font driver, with
> all their flaws and imperfections, and we will ultimately be held
> responsible for its upkeep.  What is truly irritating is that FreeType
> is part of the OS, but that it is not stable, and that the linker is
> rigged not to permit third-party programs from linking to such unstable
> libraries.  If not for this, I could have agreed to a version of the
> ftfont driver disentangled from Fontconfig.

I think the decision to rely on fontconfig for the ftcr(hb) drivers has
been made, though. I must confess I haven't looked at sfnt.c very much,
but I'm surprised to find it has been made part of Emacs. Since it has,
though, we might as well use it. And it seems Noto is working on
replacing the CJK fonts by TrueType fonts.

>> Which devices in the androidfont.c driver currently used on?  Very old
>> ones with 15/16 bpp?
>
> No, on non-standard operating systems where /system/fonts does not
> exist.  Bit depth is no object, since the OS always provides Emacs with
> a 32-bit "RGBA" (which is ABGR on little-endian systems) surface on
> which to draw, and handles conversion between this format and that of
> the screen.

Thanks!

>> 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")
>
> Noto CJK is a version of Source Han Sans:

Thanks, I'm aware it's a modified version of that font.

>   https://github.com/adobe-fonts/source-han-sans

> and its binaries are generated from the same source code by ADFKO
> (though I am surprised to learn that this source is not in UFO format).

I don't think it's the "source" at all. It's an intermediate binary,
produced by a proprietary tool (as Adobe states), probably from a
similarly proprietary, actual source format.

Anyway, as for technical issues, the Type 1 font in the Source Han Sans
CID is clearly closer to the source than the TrueType fonts are. Thus,
there is some quality degradation when I, or when Google, generates a
TrueType font from it.

Pip




  reply	other threads:[~2024-08-09 12:33 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
2024-08-08  0:10                                     ` Po Lu
2024-08-09 12:33                                       ` Pip Cet [this message]
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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ed6xswo2.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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.