jME-TTF is a True Type Font(.ttf) rendering system for jMonkeyEngine3.1 and newer. With this library you can render text styles loaded directly from a true type font file at run-time. Characters from the ttf file are written to a dynamically sized texture atlas and then rendered on screen using a series of quads that display each character from the atlas. When requesting a text string to display jME-TTF looks through the string to see if any characters are missing from the atlas and if so adds them, expanding the size of the atlas texture as necessary.
In addition to that you can opt to render scaleable text styled from a true type font file in your 3D or 2D scenes. jME-TTF can triangulate a mesh from the glyph outline of each requested character, caching new glyph meshes, and apply a material that interpolates curved sections of the glyph's contours using quadratic bezier formulas. The result is a text that can scale without pixelization and is fully compatible with modern GPU anti-aliasing methods.
jME-TTF provides a variety of conveniences such as getting the width of a line of text in pixels or world units, the line height, visual heights, scaling and kerning, you can even get a texture displaying blurred text. Formatting options such as vertical/horizontal alignment and text wrapping are also available.
jME-TTF supports outlined text and also assigns several UV layers that can be taken advantage of in your own custom shaders to create a wide variety of different effects.
Changelog:
v2.2.2:
Fixed TrueTypeBMPContainer so it no longer ignores empty lines.
v2.2.1:
Converted to Gradle project.
Added ability to specify atlas texture size for bitmap fonts.
Added example usage.
v2.12:
Fixed a bug that could cause a crash when using a StringContainer too small to display any text.
v2.11:
Added the ability to specify a maximum texture resolution for non-mesh fonts in the constructor and removed DirectByteBuffer destruction from TrueTypeSfntly instances as this is taken care of by the garbage collector.
v2.1:
One can now specify a string of characters to initialize a font with in a TrueTypeFont constructor and via TrueTypeKeys.
v2b:
Added additional padding to texture atlases to correct for UV rounding errors.
Added a shader directive instructing shaders running on GLES devices to insert 'mediump float;'
v2a:
Fixed an issue that could cause a crash when trying to display clipped text using word or char wrapping when the available display space is too small to display any text including the optional ellipsis.