Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDalai Felinto <dfelinto@gmail.com>2018-09-12 19:00:30 +0300
committerDalai Felinto <dfelinto@gmail.com>2018-11-27 02:47:33 +0300
commit8e65e38649f4a926e3c08cb414ff4789454d0f07 (patch)
tree9a915d8673ed52d5dbab65a24dddc308bfa71c9f /source/blender/draw
parent63db89b5c1e451889ccfd2acae0fabe83e427e6a (diff)
Font textbox overflow: Different methods
Sometimes the text doesn't fit. What to do in this case? * Overflow: The default behaviour still is to overflow the text. * Truncated: If any text box is defined we can also not draw the text that goes outside the text boxes. * Scale to Fit: For single-text box texts we can scale down the text until it fits. To support textboxes we are bisecting the scale until we find a good match. Right now the hardcoded iteration limit is 20, and the threshold 0.0001f. An alternative in the future would be to tackle this by integrating existing layout engines such as HarfBuzz. Note: Scale to fit won't work for multiple text-boxes if any of them has either width or height as zero. Reviewers: campbellbarton Differential Revision: https://developer.blender.org/D3874 Feature development sponsored by Viddyoze.
Diffstat (limited to 'source/blender/draw')
-rw-r--r--source/blender/draw/modes/edit_text_mode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/draw/modes/edit_text_mode.c b/source/blender/draw/modes/edit_text_mode.c
index d186ee967e5..7d6aa5b560c 100644
--- a/source/blender/draw/modes/edit_text_mode.c
+++ b/source/blender/draw/modes/edit_text_mode.c
@@ -215,7 +215,7 @@ static void edit_text_cache_populate_boxes(void *vedata, Object *ob)
DRWShadingGroup *shading_group = shading_groups[is_active ? 0 : 1];
vec[0] = cu->xof + tb->x;
- vec[1] = cu->yof + tb->y + cu->fsize;
+ vec[1] = cu->yof + tb->y + cu->fsize_realtime;
vec[2] = 0.001;
mul_v3_m4v3(vec1, ob->obmat, vec);