如何在java中使用opengl中的字体? [英] How to use fonts in opengl in java?

查看:167
本文介绍了如何在java中使用opengl中的字体?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

标题几乎总结了它 - 这是C ++和Windows中
世界中最简单的事情,但是Java似乎正在为这个问题而苦恼。



我想远离包含加载字体位图的解决方案,如果可能,请尝试使用原生truetype字体加载器。 Kerning和抗锯齿在我的应用程序中非常重要。使用JOGL / Java 2D桥:在纹理上渲染字体。

查阅Java 2D和JOGL[1] $ b [1]: http://weblogs.java.net/blog/campbell/archive/2007/01 /java_2d_and_jog.html


The title pretty much sums it up - its the easiest thing in the world in C++ and Windows, but Java seems to struggle with this issue.

I would like to stay away from solutions involving loading bitmaps of fonts, and instead try go for a native truetype font loader, if possible. Kerning and antialiasing is quite important in my application.

解决方案

Use the JOGL/Java 2D bridge: render the font on a texture.

Check out "Java 2D and JOGL"[1]

[1]: http://weblogs.java.net/blog/campbell/archive/2007/01/java_2d_and_jog.html ""

这篇关于如何在java中使用opengl中的字体?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆