[Bf-blender-cvs] [e90aabdebfa] blender-v2.93-release: Fix T89241: Scale to fit overflows into a second line

Campbell Barton noreply at git.blender.org
Wed Sep 22 08:50:25 CEST 2021


Commit: e90aabdebfa1561daa8d7725b90a81014d46ebb2
Author: Campbell Barton
Date:   Wed Sep 15 11:13:10 2021 +1000
Branches: blender-v2.93-release
https://developer.blender.org/rBe90aabdebfa1561daa8d7725b90a81014d46ebb2

Fix T89241: Scale to fit overflows into a second line

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

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

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

diff --git a/source/blender/blenkernel/intern/font.c b/source/blender/blenkernel/intern/font.c
index ce29a657c80..f4b67e5cb28 100644
--- a/source/blender/blenkernel/intern/font.c
+++ b/source/blender/blenkernel/intern/font.c
@@ -716,8 +716,13 @@ typedef struct VFontToCurveIter {
   } bisect;
   bool ok;
   /**
-   * Disables checking if word wrapping is needed to fit the text-box width.
-   * Currently only used when scale-to-fit is enabled.
+   * Wrap words that extends beyond the text-box width (enabled by default).
+   *
+   * Currently only disabled when scale-to-fit is enabled,
+   * so floating-point error doesn't cause unexpected wrapping, see T89241.
+   *
+   * \note This should only be set once, in the #VFONT_TO_CURVE_INIT pass
+   * otherwise iterations wont behave predictably, see T89241.
    */
   bool word_wrap;
   int status;
@@ -1639,7 +1644,6 @@ static bool vfont_to_curve(Object *ob,
           else {
             iter_data->scale_to_fit = iter_data->bisect.min;
             iter_data->status = VFONT_TO_CURVE_SCALE_ONCE;
-            iter_data->word_wrap = false;
           }
         }
       }



More information about the Bf-blender-cvs mailing list