[Bf-blender-cvs] [7a0ad20e5ff] master: Fix mistake in recent fix for text editor overflow

Campbell Barton noreply at git.blender.org
Tue Jun 9 09:42:17 CEST 2020


Commit: 7a0ad20e5ffa330183b8135a815f8d2cbd7ccc68
Author: Campbell Barton
Date:   Tue Jun 9 17:39:43 2020 +1000
Branches: master
https://developer.blender.org/rB7a0ad20e5ffa330183b8135a815f8d2cbd7ccc68

Fix mistake in recent fix for text editor overflow

===================================================================

M	source/blender/blenkernel/intern/font.c

===================================================================

diff --git a/source/blender/blenkernel/intern/font.c b/source/blender/blenkernel/intern/font.c
index 5f59666a28a..5771eb053f7 100644
--- a/source/blender/blenkernel/intern/font.c
+++ b/source/blender/blenkernel/intern/font.c
@@ -1514,7 +1514,7 @@ static bool vfont_to_curve(Object *ob,
       }
       else if (tb_scale.h == 0.0f) {
         /* This is a horizontal overflow. */
-        if (longest_line_length > 0.0f) {
+        if (longest_line_length > tb_scale.w) {
           /* We make sure longest line before it broke can fit here. */
           float scale_to_fit = tb_scale.w / longest_line_length;
           scale_to_fit -= FLT_EPSILON;



More information about the Bf-blender-cvs mailing list