diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-04-28 10:31:57 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-04-28 10:31:57 +0400 |
commit | b340f930ec5639f24e7e2d47fab221fb752b61dd (patch) | |
tree | 0e880a36bb528d133af6d10701fc090716b3b7f8 /source/blender/blenlib/intern/freetypefont.c | |
parent | 09dc600839904a198ab4ba3fad62ce58c2d3aa07 (diff) |
style cleanup: changes to brace placement / newlines - for/while/if/switch
Diffstat (limited to 'source/blender/blenlib/intern/freetypefont.c')
-rw-r--r-- | source/blender/blenlib/intern/freetypefont.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/source/blender/blenlib/intern/freetypefont.c b/source/blender/blenlib/intern/freetypefont.c index a9a1f2bc57e..8f2a2e6f8b5 100644 --- a/source/blender/blenlib/intern/freetypefont.c +++ b/source/blender/blenlib/intern/freetypefont.c @@ -127,17 +127,21 @@ static void freetypechar_to_vchar(FT_Face face, FT_ULong charcode, VFontData *vf npoints[j] = ftoutline.contours[j] - ftoutline.contours[j - 1]; } - // get number of on-curve points for beziertriples (including conic virtual on-points) + // get number of on-curve points for beziertriples (including conic virtual on-points) for (j = 0; j < ftoutline.n_contours; j++) { 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) - onpoints[j]++; + l = (j > 0) ? (k + ftoutline.contours[j - 1] + 1) : k; - if (k < npoints[j] - 1 ) + if (ftoutline.tags[l] == FT_Curve_Tag_On) + onpoints[j]++; + + if (k < npoints[j] - 1 ) { if ( ftoutline.tags[l] == FT_Curve_Tag_Conic && - ftoutline.tags[l+1] == FT_Curve_Tag_Conic) + ftoutline.tags[l+1] == FT_Curve_Tag_Conic) + { onpoints[j]++; + } + } } } @@ -398,8 +402,7 @@ static VFontData *objfnt_to_ftvfontdata(PackedFile * pf) } // Load characters - while (charcode < 256) - { + while (charcode < 256) { // Generate the font data freetypechar_to_vchar(face, charcode, vfd); |