We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在Sample14GetFontMetricsView中计算yOffset的用的是 yOffset = - (fontMetrics.ascent + fontMetrics.descent) / 2; 之前你在文章里写的ascent是负数,descent是正数,这两个相加是什么意思,计算baseline吗?不太懂。 如果是计算baseline应该只要ascent就可以了吧,而且canvas.drawText方法,里面的y就是baseline的值,搞不懂?!
The text was updated successfully, but these errors were encountered:
而且 Sample14GetFontMetricsView 实现的效果和13的效果不一致,14没有全部字体居中,不知道是不是刻意这样的。
Sorry, something went wrong.
然后你的关于「yOffset = - (fontMetrics.ascent + fontMetrics.descent) / 2;」的疑问看一下https://blog.csdn.net/qq_36713816/article/details/79104716
No branches or pull requests
在Sample14GetFontMetricsView中计算yOffset的用的是
yOffset = - (fontMetrics.ascent + fontMetrics.descent) / 2;
之前你在文章里写的ascent是负数,descent是正数,这两个相加是什么意思,计算baseline吗?不太懂。
如果是计算baseline应该只要ascent就可以了吧,而且canvas.drawText方法,里面的y就是baseline的值,搞不懂?!
The text was updated successfully, but these errors were encountered: