[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to get the actual face attribute?
From: |
Yuan Fu |
Subject: |
Re: How to get the actual face attribute? |
Date: |
Mon, 22 Jun 2020 15:54:19 -0400 |
> On Jun 22, 2020, at 3:49 PM, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>
>>>> Some one reported that when they change the text size with
>>>> text-scale-adjust, the alignment are messed up.
>>> If the alignment is done before changing the text-scale, then it's no
>>> big surprise, since text-scale won't scale everything by the same factor.
>> I see. I calculate the text size base on the assumption that the text scale
>> is the same for all glyphs. That explains why my measuring are off.
>
> I don't know what that means. The text-scale does apply globally.
> But it doesn't necessarily scale by the same factor horizontally and
> vertically, nor does it necessarily scale by the same factor for
> different fonts. It's "more or less equal" but not exactly. And of
> course, it won't affect those glyphs whose size is not relative to the
> base `default` face (e.g. images or glyphs to which a face is applied
> which sets an absolute rather than relative size).
>
> IOW it needs to be recomputed from scratch when the text-scale is changed.
How should I recompute the text scale? Currently I calculate it from
(expt text-scale-mode-step text-scale-mode-amount)
Which is what text-scale-mode uses. (Face remap is hard to calculate so I
thought I can just support text-scale-mode.)
Yuan
- Re: How to get the actual face attribute?, (continued)
- Re: How to get the actual face attribute?, Stefan Monnier, 2020/06/21
- Re: How to get the actual face attribute?, Yuan Fu, 2020/06/22
- Re: How to get the actual face attribute?, Stefan Monnier, 2020/06/22
- Re: How to get the actual face attribute?, Yuan Fu, 2020/06/22
- Re: How to get the actual face attribute?, Stefan Monnier, 2020/06/22
- Re: How to get the actual face attribute?,
Yuan Fu <=
- Re: How to get the actual face attribute?, Stefan Monnier, 2020/06/22
- Emacs hackers all around the world (was: Re: How to get the actual face attribute?), Emanuel Berg, 2020/06/22
- Re: How to get the actual face attribute?, Yuan Fu, 2020/06/24
- Re: How to get the actual face attribute?, Emanuel Berg, 2020/06/22
- Re: How to get the actual face attribute?, Yuan Fu, 2020/06/24