[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: |
Sun, 21 Jun 2020 10:55:38 -0400 |
> On Jun 21, 2020, at 10:52 AM, Eli Zaretskii <eliz@gnu.org> wrote:
>
>> From: Yuan Fu <casouri@gmail.com>
>> Date: Sun, 21 Jun 2020 00:01:37 -0400
>>
>> When writing my package I need to get height of the face at point. But
>> `face-attribute` doesn’t take face remapping into account, which gives wrong
>> answers. Is there a reliable way to get the actual face attribute that’s
>> used for display? Thanks.
>
> From Lisp or from C?
From Lisp.
>
> In general, you cannot know that except by displaying that text or
> emulating its display, because the face is fully realized only while
> displaying text that is affected by the face.
>
I see, then I will use some ad-hoc check to produce a mostly-right answer.
Thanks.
Yuan