From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail
From: "Feng Shu" <tumashu@163.com>
Newsgroups: gmane.emacs.devel
Subject: Re: Any new method to deal with Emacs Fonts settings puzzles nearly
 every Chinese =?utf-8?Q?emacser=EF=BC=9F?=
Date: Sun, 14 Nov 2021 15:17:07 +0800
Message-ID: <87fsrz6wb0.fsf@163.com>
References: <2c676019.21d2.17d19ba2dc8.Coremail.tumashu@163.com>
 <838rxsxes6.fsf@gnu.org>
 <165ffaaf53a0f38af0415eb4e6b7844f@webmail.orcon.net.nz>
 <83k0hbw80c.fsf@gnu.org>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214";
	logging-data="17535"; mail-complaints-to="usenet@ciao.gmane.io"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
Cc: Phil Sainty <psainty@orcon.net.nz>, emacs-devel@gnu.org
To: Eli Zaretskii <eliz@gnu.org>
Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Nov 14 08:20:15 2021
Return-path: <emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org>
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 <emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org>)
	id 1mm9oF-0004P9-HI
	for ged-emacs-devel@m.gmane-mx.org; Sun, 14 Nov 2021 08:20:15 +0100
Original-Received: from localhost ([::1]:56076 helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org>)
	id 1mm9oE-0006Vd-ES
	for ged-emacs-devel@m.gmane-mx.org; Sun, 14 Nov 2021 02:20:14 -0500
Original-Received: from eggs.gnu.org ([209.51.188.92]:51032)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <tumashu@163.com>) id 1mm9lR-0003i6-GZ
 for emacs-devel@gnu.org; Sun, 14 Nov 2021 02:17:23 -0500
Original-Received: from m12-15.163.com ([220.181.12.15]:41578)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <tumashu@163.com>)
 id 1mm9lK-00048F-B1; Sun, 14 Nov 2021 02:17:17 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com;
 s=s110527; h=From:Subject:Date:Message-ID:MIME-Version; bh=haWkL
 gbWqQRuN2kkcKmbr4xOAZUtGrN6Z7WUSd3VCc4=; b=IF71i97qASDlMQkr1iyvd
 S2VYqSVaOAgk0/uiw80qtZih6W1dpRb24apRiiKeLoLJQI3mAQttj1ztRAxErFBj
 +Wuli76UGq8q5Cp74YnLw0FfM+yMQy3LA4wO4PUE6JLUMxIHz7U8a9sllwojk4Wu
 2t5MN2qjHH+w+3Ns1jkG7k=
Original-Received: from tumashu (unknown [49.88.37.140])
 by smtp11 (Coremail) with SMTP id D8CowACnIjjzt5BhchPXBw--.19927S2;
 Sun, 14 Nov 2021 15:17:07 +0800 (CST)
In-Reply-To: <83k0hbw80c.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 14 Nov
 2021 08:45:07 +0200")
X-CM-TRANSID: D8CowACnIjjzt5BhchPXBw--.19927S2
X-Coremail-Antispam: 1Uf129KBjvJXoW7WrWxXFyUJF13uF1fAF43Jrb_yoW8CFW8pF
 WYgFZagw4DJr18C3Zrtw1IgasxG3y5Aa4DJr95Gr1Sva1rXa4Sqw4xKa1rKFyjvw4xJr1j
 qayYkF1DC390yaDanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2
 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07U2385UUUUU=
X-Originating-IP: [49.88.37.140]
X-CM-SenderInfo: 5wxpt2lkx6il2tof0z/1tbiRRNL1GDuuKmDrQAAs4
Received-SPF: pass client-ip=220.181.12.15; envelope-from=tumashu@163.com;
 helo=m12-15.163.com
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_H2=-0.001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-BeenThere: emacs-devel@gnu.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Emacs development discussions." <emacs-devel.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/emacs-devel>,
 <mailto:emacs-devel-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/emacs-devel>
List-Post: <mailto:emacs-devel@gnu.org>
List-Help: <mailto:emacs-devel-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/emacs-devel>,
 <mailto:emacs-devel-request@gnu.org?subject=subscribe>
Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org
Original-Sender: "Emacs-devel"
 <emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org>
Xref: news.gmane.io gmane.emacs.devel:279386
Archived-At: <http://permalink.gmane.org/gmane.emacs.devel/279386>

Eli Zaretskii <eliz@gnu.org> writes:

>> Date: Sun, 14 Nov 2021 12:14:39 +1300
>> From: Phil Sainty <psainty@orcon.net.nz>
>> Cc: tumashu <tumashu@163.com>, emacs-devel@gnu.org
>> 
>> On 2021-11-14 04:21, Eli Zaretskii wrote:
>> > On GUI frames Emacs takes the width of each character in pixels from
>> > the font that is being used.
>> 
>> Potentially Emacs could provide a defcustom mapping of fonts to minimum
>> character widths, and if the actual width of any character is less than
>> the customized minimum then the (larger) minimum width is used instead
>> (I guess padding either side of the character).
>> 
>> I've no clue whether this is practical -- I know very little about 
>> fonts.
>
> This could be done, but as I already asked up-thread: how will the
> user know what value to give to the defcustom?  Especially if Emacs is

Try from 1px to 100px, until align properly :-), we find proper size
Chinese fonts by same way :-)

> using more than one pair of fonts, due to several important features

"1 Chinese char width = 2 * ascii char width" only meanful in "table"
style environment, for example: org md table, gnus, org-agenda ....
In most case, it can not use many fonts.


> using non-default faces?  And even with the default face, what happens
> if the user does "C-x C-+"?

This is the most case, as for "C-x C-+", we just do not use it, or
rewrite to a new function.


As Chinese emacser users, we just expect align proper *in most case* :-)

>
> I feel that I don't understand the issue well enough, because it
> sounds strange that Emacs needs to invent a solution for a problem
> that was probably already solved umpteen times in other programs (and
> I don't mean terminal emulators, I mean GUI programs).  I very much

I do not know, maybe other GUI programs less use aligned text to create UI.

> doubt that those other applications provide such a user option, so
> some more sensible solution must exist.

--