diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-08-21 14:44:10 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-08-21 14:44:10 +0400 |
commit | 6a2018fe13ad35537f8758f005b0cb3dc3bb0997 (patch) | |
tree | 61f2b0212af741ef997752b8e3e7ff22d684f5ea /source/blender/blenkernel/intern/font.c | |
parent | 08417318cd37b3f20c67b6062e604735a12b1179 (diff) |
code cleanup: minor changes to last commit.
Diffstat (limited to 'source/blender/blenkernel/intern/font.c')
-rw-r--r-- | source/blender/blenkernel/intern/font.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/source/blender/blenkernel/intern/font.c b/source/blender/blenkernel/intern/font.c index 8689d6648a9..0ffd68c9079 100644 --- a/source/blender/blenkernel/intern/font.c +++ b/source/blender/blenkernel/intern/font.c @@ -60,7 +60,6 @@ #include "BKE_curve.h" #include "BKE_displist.h" -//static ListBase ttfdata = {NULL, NULL}; /* The vfont code */ void BKE_vfont_free_data(struct VFont *vfont) @@ -149,7 +148,7 @@ static VFontData *vfont_get_data(Main *bmain, VFont *vfont) /* We need to copy a tmp font to memory unless it is already there */ if (vfont->temp_pf == NULL) { - vfont->temp_pf = dupPackedFileMemory(pf); + vfont->temp_pf = dupPackedFile(pf); } } else { @@ -237,8 +236,6 @@ VFont *BKE_vfont_load(Main *bmain, const char *name) if (!vfont || vfont->packedfile != pf) { freePackedFile(pf); } - - //XXX waitcursor(0); } return vfont; @@ -248,13 +245,13 @@ static VFont *which_vfont(Curve *cu, CharInfo *info) { switch (info->flag & (CU_CHINFO_BOLD | CU_CHINFO_ITALIC)) { case CU_CHINFO_BOLD: - if (cu->vfontb) return(cu->vfontb); else return(cu->vfont); + return cu->vfontb ? cu->vfontb : cu->vfont; case CU_CHINFO_ITALIC: - if (cu->vfonti) return(cu->vfonti); else return(cu->vfont); + return cu->vfonti ? cu->vfonti : cu->vfont; case (CU_CHINFO_BOLD | CU_CHINFO_ITALIC): - if (cu->vfontbi) return(cu->vfontbi); else return(cu->vfont); + return cu->vfontbi ? cu->vfontbi : cu->vfont; default: - return(cu->vfont); + return cu->vfont; } } |