I wanted to share a (glimpse at a) cool thing that I made and ask how I could improve it. I am really giddy about the fact that it worked out nicely, so excuse the gloating that's inevitably present in the description below
It's a fontmap generator. It can take any font, either installed or from a custom file and draw a condensed (bin packed) fontmap of symbols in any size and style using GDI+.
You then request a character and it returns its position, size and the index of the texture it's currently contained in.
It's also fully dynamic, so if you request a character that hasn't been before generated (and you allow the fontmap to be dynamic), the fontmap will automatically generate the character, add it to the texture and return the symbol.
The image below took +/- 13 seconds (it's 13000+ symbols in all styles possible and a lot of sizes). It's a 2048x2048
The text below has been written with the symbols that were dynamically generated, added to the fontmap and then extracted to be applied on quads. I love it.
But enough with the gloating, I dearly need some advice. Do the fonts look okay when you see them? Could you look at a text like this for a long time? I have been continually staring at these fonts for so long that I honestly can't tell. Sometimes the font looks too blurry (GDI+ is set to AntiAliasGridFit), but japanese and arabic symbols look too pixelated. Using AntiAlias (No grid fit) fixes the second problem, but sometimes augments the blurriness on thin lines, makes them gray instead of black.
And second, (I know this is an OpenGL forum, but whom better to ask than you people, many of whom attempted the same thing, I'm sure) where could I find any information that could help me with creating my own GUI? Namely textboxes - none of my pitiful attempts at creating a textbox control succeeded. I need some design, structure or anything that would explain how exactly does a textbox (like the one I'm using right now) effectively manage its text.
Thank you for any help
Tags for this Thread