mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
Fix T75965: Scale to Fit Text Box fails with a single word
This commit is contained in:
parent
e812512e1d
commit
83d9ba341e
1 changed files with 2 additions and 2 deletions
|
|
@ -1501,9 +1501,9 @@ static bool vfont_to_curve(Object *ob,
|
||||||
}
|
}
|
||||||
else if (tb_scale.h == 0.0f) {
|
else if (tb_scale.h == 0.0f) {
|
||||||
/* This is a horizontal overflow. */
|
/* This is a horizontal overflow. */
|
||||||
if (lnr > 1) {
|
if (longest_line_length != 0.0f) {
|
||||||
/* We make sure longest line before it broke can fit here. */
|
/* We make sure longest line before it broke can fit here. */
|
||||||
float scale_to_fit = tb_scale.w / (longest_line_length);
|
float scale_to_fit = tb_scale.w / longest_line_length;
|
||||||
scale_to_fit -= FLT_EPSILON;
|
scale_to_fit -= FLT_EPSILON;
|
||||||
|
|
||||||
iter_data->scale_to_fit = scale_to_fit;
|
iter_data->scale_to_fit = scale_to_fit;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue