Making stroke fonts less ugly

View: New views
3 Messages — Rating Filter:   Alert me  

Making stroke fonts less ugly

by Florian Echtler-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello everybody,

I've just been quite happy that FreeGLUT provides stroke fonts out of
the box (never really used them before, but they were quite handy right
now). Unfortunately, they're a bit ugly when rendered with wide lines
due to the missing joins. I've found a nice discussion of the problem
[1] and decided to try the simplest variant with points. It actually
looks really good now IMHO, so I thought I'll just post this tiny patch
here. I suppose there's lots of reasons why this can't be included in
FreeGLUT, but nevertheless, maybe somebody else can also make use of it.


Thanks, Yours, Florian

[1]
http://www.opengl.org/resources/code/samples/sig99/advanced99/notes/node281.html
--
0666 - Filemode of the Beast

[strokefont.patch]

Index: src/freeglut_font.c
===================================================================
--- src/freeglut_font.c (Revision 813)
+++ src/freeglut_font.c (Arbeitskopie)
@@ -256,6 +256,10 @@
         for( j = 0; j < strip->Number; j++ )
             glVertex2f( strip->Vertices[ j ].X, strip->Vertices[ j ].Y );
         glEnd( );
+ glBegin( GL_POINTS );
+        for( j = 0; j < strip->Number; j++ )
+            glVertex2f( strip->Vertices[ j ].X, strip->Vertices[ j ].Y );
+ glEnd( );
     }
     glTranslatef( schar->Right, 0.0, 0.0 );
 }


------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
_______________________________________________
Freeglut-developer mailing list
Freeglut-developer@...
https://lists.sourceforge.net/lists/listinfo/freeglut-developer

Parent Message unknown Re: Making stroke fonts less ugly

by John F. Fay :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Well, the single biggest reason not to put the change in is that we're having a release shortly ... so I've put your change in.

Folks, WHEN ARE WE GOING TO GET 2.6.0 OUT THE DOOR?  Should I be expecting the Parousia first?

        - John


-----Original Message-----
From: Florian Echtler
Sent: Sunday, May 31, 2009 3:56 AM
To: 'FreeGLUT developers list'
Subject: [Freeglut-developer] Making stroke fonts less ugly

Hello everybody,

I've just been quite happy that FreeGLUT provides stroke fonts out of
the box (never really used them before, but they were quite handy right
now). Unfortunately, they're a bit ugly when rendered with wide lines
due to the missing joins. I've found a nice discussion of the problem
[1] and decided to try the simplest variant with points. It actually
looks really good now IMHO, so I thought I'll just post this tiny patch
here. I suppose there's lots of reasons why this can't be included in
FreeGLUT, but nevertheless, maybe somebody else can also make use of it.


Thanks, Yours, Florian

[1]
http://www.opengl.org/resources/code/samples/sig99/advanced99/notes/node281.html
--
0666 - Filemode of the Beast
 << File: strokefont.patch; charset = UTF-8 >>  << File: ATT00005.txt >>  << File: ATT00006.txt >>


------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
_______________________________________________
Freeglut-developer mailing list
Freeglut-developer@...
https://lists.sourceforge.net/lists/listinfo/freeglut-developer

Re: Making stroke fonts less ugly

by Sven Panne :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Am Sonntag, 31. Mai 2009 15:00:58 schrieb John F. Fay:
> [...]
> Folks, WHEN ARE WE GOING TO GET 2.6.0 OUT THE DOOR?  Should I be expecting
> the Parousia first?

I would really, really like to see the 2.6.0 release happening now, too. I've
solved the binary compatibility problems on Windows (see my mail from last
week), and there haven't been any complaints about the RC1 so far. So the
current revision (including my patches and John's) should be tagged and a tar
file should be released officially. I can deliver the Windows source/binary
ZIPs then, which should go to the SourceForge download section, too.

I'd really like to add support for

   http://www.opengl.org/registry/specs/ARB/color_buffer_float.txt
   http://www.opengl.org/registry/specs/ARB/framebuffer_sRGB.txt

(both are part of OpenGL 3.0) to freeglut, but we should get 2.6.0 out of the
door first...

Cheers,
   S.


------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
_______________________________________________
Freeglut-developer mailing list
Freeglut-developer@...
https://lists.sourceforge.net/lists/listinfo/freeglut-developer