如前文,绘制字符的对应字体的上下文产生成功,现在要加载字体图像了。
- SunGraphics2D.drawChars()
- ValidatePipe.drawChars()
- SolidTextRenderer(GlyphListPipe).drawChars()
- GlyphList.setFromChars()
- GlyphList.mapChars()
- FileFontStrike.getGlyphImagePtrs()
- TrueTypeFont(FileFont).getGlyphImage()
- FreetypeFontScaler.getGlyphImage()
调用本地函数getGlyphImageNative()
- freetypeScaler.c Java_sun_font_FreetypeFontScaler_getGlyphImageNative
getGlyphImageNativeInternal()
FT_Load_Glyph()
FT_Render_Glyph()
此处就不讲解了。可以参考:
运行可用:使用FreeType输出中文汉字点阵图形的源码_柳鲲鹏的博客-CSDN博客