Good Quality Fonts and Shapes, HOW TO?

Hi all OF lovers,

so i just released some apps made with open frameworks,
check www.tangiblex.net

but i still always have the same problem:

  • poor quality in fonts rendering
  • poor quality in shapes rendering (windows os issue mainly).

i am using in mac the famous :

  
 window.setGlutDisplayString("rgb double samples>=4 depth");  

in main.cpp, and works great with shapes, not so great with fonts…

but unable to use it in windows, it makes the app crash for the “pixel… bla bla” problem.
tried

  
window.setGlutDisplayString( "rgb double depth alpha samples");  

could work on windows but not really a difference…

for the fonts, still have poor quality rendering in mac and windows…

any idea?

it is a basic issue, but could not find a proper solution…
we should be able to have smooth circles, fonts, etc. as all the apps do… strange…

miguel
www.tangiblex.net

any help would be great, really !!!

Perhaps check out the FTGL wrapper? https://github.com/Flightphase/ofxFTGL

It’s not a fix-all, but it does generally look better imo.

Hi, i just tested FTGL wrapper, but too many errors compiling…

Any other ideas ?

That is my main issue in OF. Strange that we can not do this so simple task: render fonts as you can see them in any other app.
I have also big problems with anti-aliasing of very simple shapes (circles, arcs, lines…). Did not find ANY good solution for crossplatform- hardware independent app…
did all the tricks ( "window.setGlutDisplayString(“rgba double samples>=4 depth)” " , etc. ) but did not find a main solution.

this is the only thing makes me miss other programming frameworks…
sure there must be a simple solution, because ANY app will have this same problem (good quality rendering).
I tried to supersample, some good initial results, but still not correct ones (fonts mainly).

Also tried FXAA shaders, adapted to OF, and some improvements, but not as i should see.

Strange…

Any help?

thanks.

Hi all,

just replying to myself, to say i still did not find a proper solution to good fonts rendering and good shapes.
I used supersampling, fbos, shaders, font libraries, the main.cpp sample depth line, etc, etc, but not good results.
So i am using pre-rendered images to make the shapes, etc…

Lines are ok, using ofEnableSmoothing… wouldn´t be a magic solution like this one for shapes and fonts???

I found fonts get better if you draw them in integer positions, not in float positions. Also setting dpi to 72 can help.
That makes of to draw non rotated fonts.
But when you diplay them rotated, they get SO UGLY… that is a shame, really.
I still can not find a cross platform solution to that and it is the ONLY feature i really miss in OF, and should be simple…

Perhaps an Open GL command to smooth shapes??

any advice would be really great !!!

miguel.
www.tangiblex.net

window.setGlutDisplayString(“rgb double samples>=4 depth”);
will not working with windows unless replaced the glut lib with freeglut,but like you said might not be help on fonts. for better quality fonts,maybe you can have look at this page. http://forum.libcinder.org/topic/signed-distance-field-font-rendering

Well, some kind of improvement/rewrite is in the pipeline, at least:
https://github.com/openframeworks/openFrameworks/issues/1131

edit: whoa, that SDF method looks amazing!

Is the consensus that ofxFTGL is still the way to go?
I’m having a lot of trouble compiling the examples - mainly the FTGL lib itself is throwing all sorts of errors that might take me a while to fix.

If this isn’t such a necessity then I’ll just let it go.

Thanks, Liam