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/blenkernel/intern/font.c')
-rw-r--r--source/blender/blenkernel/intern/font.c33
1 files changed, 13 insertions, 20 deletions
diff --git a/source/blender/blenkernel/intern/font.c b/source/blender/blenkernel/intern/font.c
index 222251f6e5e..0fddce5a9b3 100644
--- a/source/blender/blenkernel/intern/font.c
+++ b/source/blender/blenkernel/intern/font.c
@@ -598,9 +598,21 @@ makebreak:
}
vfont = which_vfont(cu, info);
-
+
if (vfont == NULL) break;
+ if (vfont != oldvfont) {
+ vfd = vfont_get_data(bmain, vfont);
+ oldvfont = vfont;
+ }
+
+ /* VFont Data for VFont couldn't be found */
+ if (!vfd) {
+ MEM_freeN(chartransdata);
+ chartransdata = NULL;
+ goto finally;
+ }
+
if (!ELEM(ascii, '\n', '\0')) {
BLI_rw_mutex_lock(&vfont_rwlock, THREAD_LOCK_READ);
che = find_vfont_char(vfd, ascii);
@@ -629,25 +641,6 @@ makebreak:
che = NULL;
}
- /* No VFont found */
- if (vfont == NULL) {
- MEM_freeN(chartransdata);
- chartransdata = NULL;
- goto finally;
- }
-
- if (vfont != oldvfont) {
- vfd = vfont_get_data(bmain, vfont);
- oldvfont = vfont;
- }
-
- /* VFont Data for VFont couldn't be found */
- if (!vfd) {
- MEM_freeN(chartransdata);
- chartransdata = NULL;
- goto finally;
- }
-
twidth = char_width(cu, che, info);
/* Calculate positions */