diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2018-09-12 19:00:30 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2018-11-27 02:47:33 +0300 |
commit | 8e65e38649f4a926e3c08cb414ff4789454d0f07 (patch) | |
tree | 9a915d8673ed52d5dbab65a24dddc308bfa71c9f /release/scripts/startup/bl_ui/properties_data_curve.py | |
parent | 63db89b5c1e451889ccfd2acae0fabe83e427e6a (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 'release/scripts/startup/bl_ui/properties_data_curve.py')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_data_curve.py | 1 |
1 files changed, 1 insertions, 0 deletions
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): |