Fix T40180: Space between letters adds space after last letter
authorCampbell Barton <ideasman42@gmail.com>
Thu, 15 May 2014 05:43:59 +0000 (15:43 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 15 May 2014 05:43:59 +0000 (15:43 +1000)
source/blender/blenkernel/intern/font.c

index ef861e2844ca0379bd8537a88aafef228dc109ce..5ae4180267d9411ff8bad2f6be49086395203110 100644 (file)
@@ -717,12 +717,13 @@ makebreak:
 
                        yof -= linedist;
 
-                       maxlen = max_ff(maxlen, (xof - tb->x / cu->fsize));
-                       linedata[lnr] = xof - tb->x / cu->fsize;
+                       linedata[lnr] = (xof - xtrax) - (tb->x / cu->fsize);
                        linedata2[lnr] = cnr;
                        linedata3[lnr] = tb->w / cu->fsize;
                        linedata4[lnr] = wsnr;
-                       
+
+                       CLAMP_MIN(maxlen, linedata[lnr]);
+
                        if ((tb->h != 0.0f) &&
                            ((-(yof - (tb->y / cu->fsize))) > ((tb->h / cu->fsize) - (linedist * cu->fsize)) - cu->yof) &&
                            (cu->totbox > (curbox + 1)) )