unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: tumashu  <tumashu@163.com>
To: "Eli Zaretskii" <eliz@gnu.org>
Cc: Po Lu <luangruo@yahoo.com>, "emacs-devel@gnu.org" <emacs-devel@gnu.org>
Subject: Re:Re: Any new method to deal with Emacs Fonts settings puzzles nearly every Chinese emacser?
Date: Mon, 15 Nov 2021 08:36:43 +0800 (CST)	[thread overview]
Message-ID: <8d818a1.3f1.17d21065826.Coremail.tumashu@163.com> (raw)
In-Reply-To: <83o86nupjl.fsf@gnu.org>



>If anyone knows or could find out how other applications solve these
>issues, it could help us come up with ideas that are not only useful,
>but also help users by presenting similar solutions to what they are
>already used to.

The below is a Chinese emacser  SuperMMX's  info:

In fact, there were solutions to this problem long ago in the BBS era, such as the implementation of various terms. There are generally two solutions.

The first principle is mainly based on a font, such as the height and width of a Chinese font under a certain size, and then use this size 
to calculate the size that other fonts should set, so as to ensure that two ASCII characters are the same as a Chinese character,
and the height is the same. Therefore, the width is aligned, and the height is subject to the higher one. 
But I remember one disadvantage, non Chinese will be bigger. This should be the solution of cnfonts.
However, CN Fonts is not fully automatic, but allows users to manually select the appropriate one, 
and it is impossible to control the height.

The second method is to adding padding. No matter how many fonts and sizes (subject to user settings), the height is the largest,
the width is the widest, and two ASCII characters correspond to one Chinese text. When drawing, the baseline should be adjusted,
and then left and right, and padding when necessary. The disadvantage is that the space may be too large and not good-looking, 
but it is a user selection problem. Another disadvantage is that there will be more calculations. It seems to be called adjusting tracking

I don't know how Emacs is done. It can be done in theory.

For example, qterm: https://github.com/qterm/qterm/blob/master/src/qtermscreen.cpp 2 screen:: getfontmetrics(), even the second 
method (adding padding).



  parent reply	other threads:[~2021-11-15  0:36 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-13 14:36 Any new method to deal with Emacs Fonts settings puzzles nearly every Chinese emacser? tumashu
2021-11-13 14:49 ` tumashu
2021-11-13 15:03   ` tumashu
2021-11-13 15:32     ` Any " Eli Zaretskii
2021-11-13 16:19       ` Feng Shu
2021-11-13 16:42         ` Eli Zaretskii
2021-11-13 19:35           ` Feng Shu
2021-11-13 20:03             ` Eli Zaretskii
2021-11-13 23:38               ` Feng Shu
2021-11-14  0:28                 ` Eric Abrahamsen
2021-11-14  7:37                   ` Eli Zaretskii
2021-11-14  7:51                     ` Po Lu
2021-11-14  9:07                       ` Werner LEMBERG
2021-11-14  9:38                         ` Po Lu
2021-11-15  7:20                           ` Byung-Hee HWANG
2021-11-14  7:31                 ` Eli Zaretskii
2021-11-14  7:36                   ` Po Lu
2021-11-14  8:09                     ` Eli Zaretskii
2021-11-14  8:24                       ` Feng Shu
2021-11-14  9:41                       ` Po Lu
2021-11-14 11:33                         ` Eli Zaretskii
2021-11-14 11:57                           ` Po Lu
2021-11-15  0:36                       ` tumashu [this message]
2021-11-15  0:48                       ` tumashu
2021-11-15 12:43                         ` Eli Zaretskii
2021-11-15 12:47                           ` Po Lu
2021-11-15 13:55                             ` Eli Zaretskii
2021-11-13 15:21 ` Eli Zaretskii
2021-11-13 16:04   ` Feng Shu
2021-11-13 16:12   ` Feng Shu
2021-11-13 16:36     ` Eli Zaretskii
2021-11-13 19:33       ` Feng Shu
2021-11-13 19:54         ` Feng Shu
2021-11-13 20:06           ` Eli Zaretskii
2021-11-13 23:31             ` Feng Shu
2021-11-14  6:48               ` Eli Zaretskii
2021-11-14  7:03                 ` Feng Shu
2021-11-13 20:02         ` Eli Zaretskii
2021-11-13 23:29           ` Feng Shu
2021-11-13 23:14   ` Phil Sainty
2021-11-14  0:02     ` Feng Shu
2021-11-14  0:18       ` Feng Shu
2021-11-14  7:36         ` Eli Zaretskii
2021-11-14  7:54           ` Po Lu
2021-11-14  8:14             ` Eli Zaretskii
2021-11-14  9:43               ` Po Lu
2021-11-14  6:45     ` Eli Zaretskii
2021-11-14  7:17       ` Feng Shu
2021-11-14  8:00         ` Eli Zaretskii
2021-11-14  1:12   ` Po Lu
2021-11-14  1:52     ` Feng Shu
2021-11-14  7:55     ` Eli Zaretskii

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=8d818a1.3f1.17d21065826.Coremail.tumashu@163.com \
    --to=tumashu@163.com \
    --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).