[Bf-blender-cvs] [9a4d51c5d98] blender-v2.83-release: Fix T77609: Scale to Fit Text Box fails when text is too narrow

Dalai Felinto noreply at git.blender.org
Wed Jul 29 10:53:11 CEST 2020


Commit: 9a4d51c5d98f1c661c475f54a3fa4e41735936ec
Author: Dalai Felinto
Date:   Tue Jun 9 15:05:10 2020 +1000
Branches: blender-v2.83-release
https://developer.blender.org/rB9a4d51c5d98f1c661c475f54a3fa4e41735936ec

Fix T77609: Scale to Fit Text Box fails when text is too narrow

Caused by error in fix for T75965 (83d9ba341e5a).

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

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

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

diff --git a/source/blender/blenkernel/intern/font.c b/source/blender/blenkernel/intern/font.c
index 92eb6ea03e2..5b45a916834 100644
--- a/source/blender/blenkernel/intern/font.c
+++ b/source/blender/blenkernel/intern/font.c
@@ -1501,7 +1501,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 > 0.0f) {
           /* 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