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 13:43:33 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.1

On 2019-12-03 12:38, Eli Zaretskii wrote:
>> From: Clément Pit-Claudel <address@hidden>
>> Date: Tue, 3 Dec 2019 11:42:03 -0500
>>
>> I think Emacs might have most of the features needed already as part of the 
>> composition engine
> 
> No, character composition does nothing to the width of glyphs on
> display.  We take the width from the glyph metrics reported by the
> font.

For the OP's purpose, I think character composition is "enough", in the sense 
that it can be used to display a glyphs with padding on the sides (as far as I 
know, composition can't be used to shrink a glyph, however).

Concretely, I'm think of this:

  (insert (compose-string "a" 0 1 '(?\s (br . bl) ?\s (bc . bc) ?我)))

If I'm reading the spec correctly, this should draw the character 我 with 
padding on both sides to reach the width of two spaces (assuming the choice of 
fonts is such as 我 is narrower than two spaces to being with).

Clément.



reply via email to

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