JAVA流程
FontDesignMetrics.getMetrics(Font, FontRenderContext) line: 302
FontDesignMetrics.<init>(Font, FontRenderContext) line: 350
FontDesignMetrics.initMatrixAndMetrics() line: 359
FileFontStrike.getFontMetrics() line: 815
TrueTypeFont(FileFont).getFontMetrics(long) line: 181
FreetypeFontScaler.getFontMetrics(long) line: 78
FreetypeFontScaler.getFontMetricsNative(Font2D, long, long) line: not available [native method] StrikeMetrics.<init>(float, float, float, float, float, float, float, float, float, float) line: 96
getFontMetricsNative是本地函数,然后新建StrikeMetrics对象。
getFontMetricsNative
FTScalerInfo.face中的值:ascender/descender/height
leading=height-ascender-descender
处理完毕之后,再新建一个对象StrikeMetrics。