Has Tomasz's (h3r3tic's) OpenGL font rendering code been ported to D2?

Kiith-Sa 42 at theanswer.com
Mon Mar 12 06:22:24 PDT 2012


On Sunday, 11 March 2012 at 22:39:46 UTC, Chad J wrote:
> On 03/11/2012 04:24 AM, Kiith-Sa wrote:
>
> Thanks for the link!
>
> I don't have time to go over it right now, but that looks 
> promising.  I took a shot at porting Tomasz's code a while ago, 
> but I never got it to compile.  At least your code /compiles/, 
> so even if it's integrated into other stuff, at least I might 
> stand a better chance.
>
> Btw, also a fan of Raptor and Tyrian.  Good taste dude.  ;)


I just remembered I also wrote a tool for this as a project at
university (in Java, because I had to) last year:

http://gitorious.org/fmapper

It spits out a texture or a set of textures with tightly packed 
glyphs
of specified font with specified parameters, and a text file
containing offsets and texture coords of glyphs.

There is an example C++/OpenGL
program on how to load the textures and draw fonts.

Only supports the basic multilingual plane, though.


If you're only using a fixed number of font sizes, you can 
generate textures
for them with this.

It's not as flexible, but probably easier than writing your own 
code
based on FreeType.


Note that it's not maintained - I hate Java - but it should work.



More information about the Digitalmars-d mailing list