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: Eli Zaretskii
Subject: Re: Any new method to deal with Emacs Fonts settings puzzles nearly every Chinese emacser?
Date: Sun, 14 Nov 2021 09:36:48 +0200

> From: "Feng Shu" <tumashu@163.com>
> Cc: Eli Zaretskii <eliz@gnu.org>,  emacs-devel@gnu.org
> Date: Sun, 14 Nov 2021 08:18:49 +0800
> 
> "Feng Shu" <tumashu@163.com> writes:
> 
> > Phil Sainty <psainty@orcon.net.nz> writes:
> >
> >> 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).
> >
> > Maybe we just need a padding api, and let user control the number px or 
> > pecent of
> > padding.
> 
>    What about: (font-spec :name "Microsoft Yahei" :padding 2)
> 
>    Mean Micorsoft Yahei will pad 2px to 1 char when showed?

How would you know that the value 2 is the one to use?

This kind of solution sounds like a terrible kludge to me.  It is also
unreliable, because the font designers didn't promise us the padding
value will not have to change when more characters are added.  And the
value depends on the ASCII font being used as well, not just the CJK
font, so even the syntax of the spec is incomplete (it doesn't mention
the ASCII font).

Would someone please investigate how do other GUI editors solve this
problem, and post a summary?  I'm sure there are better solutions than
asking users to provide pixel values for each pair of fonts.



reply via email to

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