OpenGL font without textures

Here’s some code you can use to draw text in OpenGL (LWJGL in this case) given a position, character size, kerning scale, and the text!

Each character is a grid of points (3 columns, 5 rows) and a glyph is defined by lines from one point to another.

Here’s what it looks like (1.0 pixel thickness, 12 pixels tall, 8 pixels wide):


http://i1150.photobucket.com/albums/o604/ClickerMonkey/Glyphs_zps2d5f5477.png

And the code:

http://pastebin.com/urD2QYpH

Whoa. Just like 8-segment displays. :slight_smile: Thanks for contributing.

When I use ‘:’ or ‘;’ inside a string it prints a symbol like ‘\’. What can be the problem ?

That’s very odd, can you show me an example of a String you’re trying to print?

7 Segment. 2 on the top, 4 on the sides, and 1 in the middle.

However, this text is quite different.

More like subdivided alphanumerical displays, but whatever :slight_smile:

Thanks for contributing this! I will definitely be using this in my projects!

This is awesome.
Unfortunately, ascii only, which is too little for my needs.