Fix T68658: Text offset makes scale to fit not to work
authorDalai Felinto <dfelinto@gmail.com>
Wed, 14 Aug 2019 18:08:25 +0000 (15:08 -0300)
committerDalai Felinto <dfelinto@gmail.com>
Wed, 14 Aug 2019 22:18:51 +0000 (19:18 -0300)
Differential Revision: https://developer.blender.org/D5484

source/blender/blenkernel/intern/font.c

index 78117a4f615beb196aeaa598f887d8d7eb16502d..b55635560be1930c0095750eacaad632b36e733c 100644 (file)
@@ -955,7 +955,7 @@ static bool vfont_to_curve(Object *ob,
         }
       }
 
-      current_line_length += xof;
+      current_line_length += xof - MARGIN_X_MIN;
       if (ct->dobreak) {
         current_line_length += twidth;
       }
@@ -1026,7 +1026,7 @@ static bool vfont_to_curve(Object *ob,
     }
     ct++;
   }
-  current_line_length += xof + twidth;
+  current_line_length += xof + twidth - MARGIN_X_MIN;
   longest_line_length = MAX2(current_line_length, longest_line_length);
 
   cu->lines = 1;