emacs-devel
[Top][All Lists]
Advanced

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

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


From: Feng Shu
Subject: Re: Any new method to deal with Emacs Fonts settings puzzles nearly every Chinese emacser?
Date: Sun, 14 Nov 2021 00:04:38 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

>> Date: Sat, 13 Nov 2021 22:36:11 +0800 (CST)
>> From: tumashu <tumashu@163.com>
>> 
>> Hello everyone:
>> 
>>    (1)    How to let A Chinese char width = 2 * Ascii char width is an 
>> eternal topic for Chinese new emacser.
>
> On GUI frames Emacs takes the width of each character in pixels from
> the font that is being used.  So if you want each Chinese character to
> take exactly 2 character cells of an ASCII character, you need to find
> a pair of fonts that satisfy this relation.  Because the font used for

This is the main way Chinese emacser used, like below, but it 
will have question 2:  Chinese Char Height > Ascii Char Height.

(progn
  (set-face-attribute
   'default nil
   :font (font-spec :name "PragmataPro"
                    :weight 'normal
                    :slant 'normal
                    :size 16.0))
  (dolist (charset '(kana han symbol cjk-misc bopomofo))
    (set-fontset-font
     "fontset-default"
     charset
     (font-spec :name "黑体"
                :weight 'normal
                :slant 'normal
                :size 16.0))))

>> it let all Chinese new users and many old users puzzle a lot, that
>> is the reason my cnfonts package (a Chinese fonts setup utils) get
>> >600 github star.
>> recent day, we talk about Emacs fonts, so I want to know, is it
>> possible provide a feature in emacs core to solve this problem?
>
> Which problem is that?  The 2 questions you asked or something else?

What I said is question 1: "A Chinese char width = 2 * Ascii char"




-- 




reply via email to

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