Subject: bug#73363: 30.0.91; CJK Font Rendering Behavior Changed

From: Eli Zaretskii <[email-masked]>
Date: Thu, 19 Sep 2024 19:33:01 +0300

> From: Tomohisa Kuranari <[email-masked]>
> Date: Thu, 19 Sep 2024 23:50:58 +0900
> 
> This may not be a bug, but I have noticed different behavior compared to
> Emacs 29.4.
> 
> I found that the behavior changed when the Android port was introduced, but
> I haven't been able to pinpoint the exact cause.
> https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=c71a520d1da636a722cf87b46534ca3b5aafbc7b
> 
> ## Steps to Reproduce
> 1. Start Emacs with emacs -Q.
> 2. Evaluate the following in the scratch buffer:
> 
> ;; 29.4
> (face-font 'default nil ?元)
> "-*-Hiragino Sans-regular-normal-normal-*-12-*-*-*-p-0-iso10646-1"
> (face-font 'default nil ?你)
> "-*-Hiragino Sans-regular-normal-normal-*-12-*-*-*-p-0-iso10646-1"
> (face-font 'default nil ?안)
> "-*-Apple SD Gothic Neo-regular-normal-normal-*-12-*-*-*-p-0-iso10646-1"
> 
> ;; 30.0.91
> (face-font 'default nil ?元)
> "-*-Arial Unicode MS-regular-normal-normal-*-12-*-*-*-p-0-iso10646-1"
> (face-font 'default nil ?你)
> "-*-Arial Unicode MS-regular-normal-normal-*-12-*-*-*-p-0-iso10646-1"
> (face-font 'default nil ?안)
> "-*-Arial Unicode MS-regular-normal-normal-*-12-*-*-*-p-0-iso10646-1"
> 
> ## Workaround
> Specify the font explicitly
> ```
> (set-fontset-font nil 'japanese-jisx0208
>                   (font-spec :family "Hiragino Sans"))
> ```
> 
> 
> In GNU Emacs 30.0.91 (build 1, x86_64-apple-darwin23.1.0, NS
>  appkit-2487.20 Version 14.1 (Build 23B74)) of 2024-09-14 built on
>  kuranariMacBook-Pro.local

I cannot reproduce this, but I'm not on macOS.  Can someone reproduce
this on GNU/Linux and/or on macOS?

The only changes I see in fontset.el due to Android which could
explain this are supposed to be in effect only when Emacs is built for
Android.  I see quite some changes in macfont.m, but they seem to
affect font's weight and slant, so I'm not sure how that could be
relevant.