![]() |
True Type Font Support - Printable Version +- Forums (https://www.vdrift.net/Forum) +-- Forum: Community (https://www.vdrift.net/Forum/forumdisplay.php?fid=3) +--- Forum: Feature Requests (https://www.vdrift.net/Forum/forumdisplay.php?fid=6) +--- Thread: True Type Font Support (/showthread.php?tid=1177) |
True Type Font Support - zimluura - 10-19-2009 does anyone think true type font support would be a good thing to add to vdrift? recently, through modifying the nehe freetype tutorial, i got a little font demo application done that loads the first 0-255 characters into a single texture and stores uv coordinates and position data for each. so if this would be desired i've got allot of the code written to do it. - joevenzon - 10-20-2009 If you're interested in digging into VDrift fonts: The font rendering in VDrift is pretty nifty, it uses a distance field (if you have shaders enabled) which, using only a small bitmap, provides exceptionally high quality (with antialiasing) even when the lettering is huge... and hardly uses any resources. It's an application of this: http://www.valvesoftware.com/publications/2007/SIGGRAPH2007_AlphaTestedMagnification.pdf to fonts. The font generator I use to create the distance fields is this one: http://www.lonesock.net/files/SDFont.zip from this thread: http://www.gamedev.net/community/forums/topic.asp?topic_id=491938 You can fiddle with adding/changing fonts; the program outputs .png and .txt files and those can be copied over the ones in VDrift/data/skins/simple/fonts if you want to see them in-game. - zimluura - 10-21-2009 hmm, cool! i'm not actually that interested in fonts. just did a bunch of work with them recently in order to get a quick ttf bolt-on for any opengl apps i try to build in the future. it looks like vdrift has a different system that offers some benefits over vanilla ttf. - joevenzon - 10-22-2009 Yeah, so it does use TTF fonts sort of, but they have to be processed by a separate program first. |