
Scope of OpenTK.Utils.Fonts
Posted Thursday, 12 June, 2008 - 21:28 by objarni inHi everybody.
I'm trying to add some constructivity/pragmatism to the font discussion.
Maybe we could discuss use cases/scope of OpenTK fonts?
Here are some use cases of text rendering in multimedia apps' from the top of my head:
- Debugging (headsup, smallish, easy-to-read)
- In-game consoles (headsup, smallish, easy-to-read)
- GUI-widget text (headsup, eyecandy)
- Credits / high score (headsup, eyecandy)
- Decals/info on walls in 3d environments (FPS-games etc.)
- Demo-effects (Star Wars scrolling..)
- In-game entitity info (ontop of NPC's heads etc.)
- In-game message-boxes/chat (RPG games etc.)
(please add to this list..)
Maybe after we decide the priority of these kind of use cases, it is easier to make decisions on technology, API and so on. Without a "mind map" of this kind, talking about implementation is just confusing. What is the scope of OpenTK fonts..?


Comments
Re: Scope of OpenTK.Utils.Fonts
"What is the scope of OpenTK fonts..?"
I think it would help me to know the answer to this question also. At then end of the day, if my use case is not withing the scope of OpenTK fonts, then its probably not very smart of me to try to coerce it to fit.
Re: Scope of OpenTK.Utils.Fonts
Comprehension questions:
"easy-to-read" = Glyphs based on .ttf font?
"eyecandy" = Glyphs based on colored 2D Bitmap?
"smallish" = ???
Partial solution for most of the mentioned scenarios:
Use Framebuffer Objects for offscreen rendering and prepare a Texture containing the (static) text you will need at some later point. (i.e. Create an empty texture and a FBO. Bind Texture to FBO, make FBO current, call TextPrinter, disable FBO, unbind Texture from FBO. Now you have a Texture containing the whole string/sentence which you can use however you please, without any further TextPrinter calls.)
You can modify the code from http://www.opentk.com/node/397 to print text instead of drawing random triangles to test this, but you will have to make sure that texture size, viewport and matrices are appropriate.
Re: Scope of OpenTK.Utils.Fonts
@Inertia: I tried to avoid talking about implementation, so easy-to-read means just easy-to-read, eyecandy means visually appealing, smallish means "small compared to the window size".
Re: Scope of OpenTK.Utils.Fonts
Are there no feelings regaring this issue..?
Re: Scope of OpenTK.Utils.Fonts
What I need from Fonts:
Re: Scope of OpenTK.Utils.Fonts
How about specifying font size in percentage (or 0 to 1 interval) of the viewport? Or automatic font resizing with viewport?
PS: Haven't really tested fonts yet so ignore this post if I'm just nagging.