freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Freetype] ft_outline_reverse_fill broken?


From: Changyuan Hu
Subject: RE: [Freetype] ft_outline_reverse_fill broken?
Date: Wed, 28 Nov 2001 16:01:29 -0500

I had the similar experience with none formal TrueType fonts. Some fonts even 
contains mixed direction contours, such as the Batang font in Windows. In 
Batang font, outer contours are almost all counter clockwised (reverse to 
normal TrueType font) but the dot of character "i" is clockwised! Strange, ehh? 
The font contour direction may not cause problem if you only render the 2D 
outline or even fill interior. However, it does cause problem in 3D rendering 
because contour direction determines the surface normal direction.

My fix to this problem is to test contour direction for the whole font if you 
assume all contours have same direction (of course inner contours should be in 
reverse direction to the outer contours). But, if you don't want to assume 
that, you have to test direction of each individual contours. That's life.

Good luck,
Changyuan

> -----Original Message-----
> From: address@hidden [mailto:address@hidden
> Behalf Of address@hidden
> Sent: November 28, 2001 3:43 PM
> To: address@hidden
> Subject: [Freetype] ft_outline_reverse_fill broken?
> 
> 
> I've struck a problem with my openGL font rendering library. It has 
> shown up when drawing extruded glyphs.
> See image of correct rendering...
> 
> http://homepages.paradise.net.nz/henryj/code/index.html#ftgl
> 
> According to the docs outline fonts are generally wound clockwise, if 
> not then the 'flags' field of the 'FT_Outline' will be set to 
> 'ft_outline_reverse_fill'. I've found some fonts that aren't rendering 
> correctly because of the anti clockwise winding but the 
> ft_outline_reverse_fill flag isn't set. In fact the flag field is set to 
> 1 in almost all fonts I tested. Am I missing something or is it broken? 
> If it is broken what else can I test because this is a show stopper!
> 
> henry
> 
> 
> 
> "I can run faster scared than you can angry"
> 
> 
> _______________________________________________
> Freetype mailing list
> address@hidden
> http://www.freetype.org/mailman/listinfo/freetype
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]