|
From: | Behdad Esfahbod |
Subject: | Re: [ft-devel] Minor modification of `FT_Outline_Check'? |
Date: | Thu, 25 Aug 2016 02:14:01 -0700 |
I don't understand what the problem is. What am I missing?
Folks,
I got the following report.
I found a .ttf file on the web whose outline->n_points and
outline->n_contours are zero. FT_Outline_Check() reports success
because of this condition:
/* empty glyph? */
if ( n_points == 0 && n_contours == 0 )
return FT_Err_Ok;
However, the for loop in FT_Outline_Decompose()
for ( n = 0; n < outline->n_contours; n++ )
is never executed which implies that the if condition should return
failure. I gather that FT_Outline_Decompose() should be called only
if FT_Outline_Check() returns success, but, according to current
code and one of my test files, FT_Outline_Decompose() should not be
called at all.
If you agree, can you fix the if statement in the next release?
And, maybe, you even need to change "and" to "or" as well.
I'm inclined to do that, also clarifying the documentation to
explicitly explain what a valid outline means.
Any objections?
Werner
_______________________________________________
Freetype-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/freetype- devel
[Prev in Thread] | Current Thread | [Next in Thread] |