emacs-devel
[Top][All Lists]
Advanced

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

Re: Display certain glyphs with paddings on the side


From: Clément Pit-Claudel
Subject: Re: Display certain glyphs with paddings on the side
Date: Tue, 3 Dec 2019 11:42:03 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.1

On 2019-12-02 11:24, Eli Zaretskii wrote:
>> From: Yuan Fu <address@hidden>
>> Date: Sat, 30 Nov 2019 14:51:29 -0500
>>
>> Aligning ACSII characters with Chinese characters in Emacs has been a pain 
>> for me. The common solution (among Chinese community) is to scale Chinese 
>> characters with `face-font-rescale-alist’ and make one Chinese character 
>> precisely twice as wide as a ASCII character. However, that makes the 
>> Chinese characters taller than the ASCII characters. Is it possible to add 
>> some padding to the sides of a Chinese character and make it twice as wide 
>> in Emacs?
> 
> I don't think we have any such features.  You will have to choose your
> fonts such that they provide this nice alignment.

This is the approach that I've been using in a different context.  I use 
programming languages with heavy reliane on mathematical symbols, so I have 
patched versions of mathematical fonts to ensure that symbols line up nicely 
with monospace characters.  The python code that does these transformations is 
here: https://github.com/cpitclaudel/monospacifier

I think Emacs might have most of the features needed already as part of the 
composition engine, but applying the right composition properties to each 
character would be costly and complicated.

Clément.






reply via email to

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