It works, thanks very much.
At 2018-01-12 00:03:51, "Eli Zaretskii" <eliz@gnu.org> wrote:
>> Date: Thu, 11 Jan 2018 16:45:43 +0800 (CST)
>> From: tumashu <tumashu@163.com>
>>
>> Doesn't vertical-motion fit the bill? If not, why not?
>> ------------------------------------------------------------------------
>> @Eli Zaretskii Thanks for your suggestion, it works very well, the only problem is that
>> it can not work when point at the end line of buffer, I use the below code to handle this problem,
>> (add a temp "\n" then remove) but it seem to hacky. any good way to solve this problem:
>
>Something like the below, perhaps?
>
> (aref (font-info (font-at POS)) 3)
>
>This will give you the height of the font used at position POS. Then
>you could add that to the y-coordinate of the line at EOB, to get the
>bottom y-coordinate of that line. (Caveat: font-at doesn't like to be
>called at EOB, so make sure you are one buffer position before that.)