[Bf-blender-cvs] [70a27d0a638] master: Fix T77609: Scale to Fit Text Box fails when text is too narrow
Dalai Felinto
noreply at git.blender.org
Tue Jun 9 07:08:21 CEST 2020
Commit: 70a27d0a638665007b45e5d80d2f758d25ed246b
Author: Dalai Felinto
Date: Tue Jun 9 15:05:10 2020 +1000
Branches: master
https://developer.blender.org/rB70a27d0a638665007b45e5d80d2f758d25ed246b
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 54f2492af93..34bb328bde0 100644
--- a/source/blender/blenkernel/intern/font.c
+++ b/source/blender/blenkernel/intern/font.c
@@ -1502,7 +1502,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