转载_paint.ascent()和paint.descent()

 

1.基准点是baseline

2.ascent:是baseline之上至字符最高处的距离

3.descent:是baseline之下至字符最低处的距离

4.leading:是上一行字符的descent到下一行的ascent之间的距离,也就是相邻行间的空白距离

5.top:是指的是最高字符到baseline的值,即ascent的最大值

6.bottom:是指最低字符到baseline的值,即descent的最大值

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

基线(baeseline),坡顶(ascenter),坡底(descenter)
上坡度(ascent),下坡度(descent)
行间距(leading):坡底到下一行坡顶的距离
字体的高度=上坡度+下坡度+行间距

ascent是指从一个字的基线(baseline)到最顶部的距离,descent是指一个字的基线到最底部的距离

注意, ascent和top都是负数
原文地址:https://www.cnblogs.com/wangziqiang/p/4355986.html