[Bf-blender-cvs] [56f8d7c7059] master: Fix T89241: Scale to fit overflows into a second line

Campbell Barton noreply at git.blender.org
Wed Sep 15 03:15:42 CEST 2021


Commit: 56f8d7c7059728bad0fe087c291e4829398eab16
Author: Campbell Barton
Date:   Wed Sep 15 11:13:10 2021 +1000
Branches: master
https://developer.blender.org/rB56f8d7c7059728bad0fe087c291e4829398eab16

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 c1765967238..b6e374d158f 100644
--- a/source/blender/blenkernel/intern/font.c
+++ b/source/blender/blenkernel/intern/font.c
@@ -719,6 +719,9 @@ typedef struct VFontToCurveIter {
    *
    * 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;
@@ -1640,7 +1643,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