emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re:Re: Any new method to deal with Emacs Fonts settings puzzles nearly e


From: tumashu
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)


>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).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]