[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to get the actual face attribute?
From: |
Eli Zaretskii |
Subject: |
Re: How to get the actual face attribute? |
Date: |
Sun, 21 Jun 2020 18:03:55 +0300 |
> From: Yuan Fu <casouri@gmail.com>
> Date: Sun, 21 Jun 2020 10:55:38 -0400
> Cc: help-gnu-emacs@gnu.org
>
> >> 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.
You could try calling vertical-motion to move past that line, then use
posn-at-point in the position where you arrived to see how many pixels
you moved. (Completely untested.)
- How to get the actual face attribute?, Yuan Fu, 2020/06/21
- Re: How to get the actual face attribute?, Eli Zaretskii, 2020/06/21
- 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, 2020/06/22