diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-09-15 04:13:10 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2021-09-22 09:29:26 +0300 |
commit | e90aabdebfa1561daa8d7725b90a81014d46ebb2 (patch) | |
tree | 9a94647fb73c56cfe67c91c4d536e7cdc205a130 | |
parent | 597d9518efff2ace142aa0232d849e73f3ce8eb0 (diff) |
Fix T89241: Scale to fit overflows into a second line
-rw-r--r-- | source/blender/blenkernel/intern/font.c | 10 |
1 files changed, 7 insertions, 3 deletions
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; } } } |