Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenlib/intern/freetypefont.c')
-rw-r--r--source/blender/blenlib/intern/freetypefont.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/blenlib/intern/freetypefont.c b/source/blender/blenlib/intern/freetypefont.c
index 6d6abc88999..482ca1c01e5 100644
--- a/source/blender/blenlib/intern/freetypefont.c
+++ b/source/blender/blenlib/intern/freetypefont.c
@@ -46,12 +46,13 @@
#include "BLI_vfontdata.h"
#include "BLI_blenlib.h"
-#include "BLI_math.h"
+#include "BLI_math.h"
+#include "BLI_utildefines.h"
//XXX #include "BIF_toolbox.h"
#include "BKE_font.h"
-#include "BKE_utildefines.h"
+
#include "DNA_vfont_types.h"
#include "DNA_packedFile_types.h"
@@ -126,7 +127,6 @@ static void freetypechar_to_vchar(FT_Face face, FT_ULong charcode, VFontData *vf
// get number of on-curve points for beziertriples (including conic virtual on-points)
for(j = 0; j < ftoutline.n_contours; j++) {
- l = 0;
for(k = 0; k < npoints[j]; k++) {
if(j > 0) l = k + ftoutline.contours[j - 1] + 1; else l = k;
if(ftoutline.tags[l] == FT_Curve_Tag_On)
@@ -252,15 +252,15 @@ static void freetypechar_to_vchar(FT_Face face, FT_ULong charcode, VFontData *vf
}
// get the handles that are aligned, tricky...
- // DistVL2Dfl, check if the three beztriple points are on one line
- // VecLenf, see if there's a distance between the three points
- // VecLenf again, to check the angle between the handles
+ // dist_to_line_v2, check if the three beztriple points are on one line
+ // len_squared_v2v2, see if there's a distance between the three points
+ // len_squared_v2v2 again, to check the angle between the handles
// finally, check if one of them is a vector handle
if((dist_to_line_v2(bezt->vec[0],bezt->vec[1],bezt->vec[2]) < 0.001) &&
- (len_v3v3(bezt->vec[0], bezt->vec[1]) > 0.0001) &&
- (len_v3v3(bezt->vec[1], bezt->vec[2]) > 0.0001) &&
- (len_v3v3(bezt->vec[0], bezt->vec[2]) > 0.0002) &&
- (len_v3v3(bezt->vec[0], bezt->vec[2]) > MAX2(len_v3v3(bezt->vec[0], bezt->vec[1]), len_v3v3(bezt->vec[1], bezt->vec[2]))) &&
+ (len_squared_v2v2(bezt->vec[0], bezt->vec[1]) > 0.0001*0.0001) &&
+ (len_squared_v2v2(bezt->vec[1], bezt->vec[2]) > 0.0001*0.0001) &&
+ (len_squared_v2v2(bezt->vec[0], bezt->vec[2]) > 0.0002*0.0001) &&
+ (len_squared_v2v2(bezt->vec[0], bezt->vec[2]) > MAX2(len_squared_v2v2(bezt->vec[0], bezt->vec[1]), len_squared_v2v2(bezt->vec[1], bezt->vec[2]))) &&
bezt->h1 != HD_VECT && bezt->h2 != HD_VECT)
{
bezt->h1= bezt->h2= HD_ALIGN;