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:
authorCampbell Barton <ideasman42@gmail.com>2019-03-27 05:16:10 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-03-27 05:17:30 +0300
commit9ba948a4859da3308033fa6dc54f74433d7e6a21 (patch)
tree0bd6e95eb59d9af03aa32d925c68e1cbebecc246 /source/blender/blenlib/intern/freetypefont.c
parent337eb8c1de4c57c34520b467d79779153335eecb (diff)
Cleanup: style, use braces for blenlib
Diffstat (limited to 'source/blender/blenlib/intern/freetypefont.c')
-rw-r--r--source/blender/blenlib/intern/freetypefont.c25
1 files changed, 18 insertions, 7 deletions
diff --git a/source/blender/blenlib/intern/freetypefont.c b/source/blender/blenlib/intern/freetypefont.c
index fba3c825a1c..36051e3e7f0 100644
--- a/source/blender/blenlib/intern/freetypefont.c
+++ b/source/blender/blenlib/intern/freetypefont.c
@@ -104,10 +104,13 @@ static VChar *freetypechar_to_vchar(FT_Face face, FT_ULong charcode, VFontData *
for (k = 0; k < n; k++) {
l = (j > 0) ? (k + ftoutline.contours[j - 1] + 1) : k;
- if (k == 0) l_first = l;
+ if (k == 0) {
+ l_first = l;
+ }
- if (ftoutline.tags[l] == FT_Curve_Tag_On)
+ if (ftoutline.tags[l] == FT_Curve_Tag_On) {
onpoints[j]++;
+ }
{
const int l_next = (k < n - 1) ? (l + 1) : l_first;
@@ -140,7 +143,9 @@ static VChar *freetypechar_to_vchar(FT_Face face, FT_ULong charcode, VFontData *
/* individual curve loop, start-end */
for (k = 0; k < n; k++) {
l = (j > 0) ? (k + ftoutline.contours[j - 1] + 1) : k;
- if (k == 0) l_first = l;
+ if (k == 0) {
+ l_first = l;
+ }
/* virtual conic on-curve points */
{
@@ -291,7 +296,9 @@ static VFontData *objfnt_to_ftvfontdata(PackedFile *pf)
0,
&face);
- if (err) return NULL;
+ if (err) {
+ return NULL;
+ }
/* allocate blender font */
vfd = MEM_callocN(sizeof(*vfd), "FTVFontData");
@@ -319,8 +326,9 @@ static VFontData *objfnt_to_ftvfontdata(PackedFile *pf)
err = FT_Set_Charmap(face, found);
- if (err)
+ if (err) {
return NULL;
+ }
lcode = charcode = FT_Get_First_Char(face, &glyph_index);
}
@@ -362,8 +370,9 @@ static VFontData *objfnt_to_ftvfontdata(PackedFile *pf)
charcode = FT_Get_Next_Char(face, charcode, &glyph_index);
/* Check that we won't start infinite loop */
- if (charcode <= lcode)
+ if (charcode <= lcode) {
break;
+ }
lcode = charcode;
}
@@ -460,7 +469,9 @@ VChar *BLI_vfontchar_from_freetypefont(VFont *vfont, unsigned long character)
{
VChar *che = NULL;
- if (!vfont) return NULL;
+ if (!vfont) {
+ return NULL;
+ }
/* Init Freetype */
err = FT_Init_FreeType(&library);