From 8e65e38649f4a926e3c08cb414ff4789454d0f07 Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Wed, 12 Sep 2018 13:00:30 -0300 Subject: 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. --- release/scripts/startup/bl_ui/properties_data_curve.py | 1 + 1 file changed, 1 insertion(+) (limited to 'release/scripts/startup/bl_ui/properties_data_curve.py') diff --git a/release/scripts/startup/bl_ui/properties_data_curve.py b/release/scripts/startup/bl_ui/properties_data_curve.py index 2625c23a5a8..e7f9de5dc20 100644 --- a/release/scripts/startup/bl_ui/properties_data_curve.py +++ b/release/scripts/startup/bl_ui/properties_data_curve.py @@ -441,6 +441,7 @@ class DATA_PT_text_boxes(CurveButtonsPanelText, Panel): text = context.curve layout.operator("font.textbox_add", icon='ADD') + layout.prop(text, "overflow", text="Overflow") for i, box in enumerate(text.text_boxes): -- cgit v1.2.3