diff options
author | Harley Acheson <harley.acheson@gmail.com> | 2021-08-19 05:48:30 +0300 |
---|---|---|
committer | Harley Acheson <harley.acheson@gmail.com> | 2021-08-19 05:48:30 +0300 |
commit | feaa61a9680844d0fdc5b9b1a1407819fbb6dc97 (patch) | |
tree | e3407589ef0cc827db3642a84ff92f59e1d2cef0 /source/blender/editors/space_file | |
parent | ac09411368a968fd1d90aef2362654d5007b6b48 (diff) |
UI: Remove "Unfitted" Kerning Style Option
This patch removes the "Kerning Style" option for UI widget font
drawing and uses only the current default of "Fitted", since the other
option of "Unfitted" is just the result of truncation errors.
see D12231 for much more information.
Differential Revision: https://developer.blender.org/D12231
Reviewed by Campbell Barton
Diffstat (limited to 'source/blender/editors/space_file')
-rw-r--r-- | source/blender/editors/space_file/filesel.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c index 72e7e0716db..4ab7014cf82 100644 --- a/source/blender/editors/space_file/filesel.c +++ b/source/blender/editors/space_file/filesel.c @@ -863,20 +863,8 @@ FileAttributeColumnType file_attribute_column_type_find_isect(const View2D *v2d, float file_string_width(const char *str) { const uiStyle *style = UI_style_get(); - float width; - UI_fontstyle_set(&style->widget); - if (style->widget.kerning == 1) { /* for BLF_width */ - BLF_enable(style->widget.uifont_id, BLF_KERNING_DEFAULT); - } - - width = BLF_width(style->widget.uifont_id, str, BLF_DRAW_STR_DUMMY_MAX); - - if (style->widget.kerning == 1) { - BLF_disable(style->widget.uifont_id, BLF_KERNING_DEFAULT); - } - - return width; + return BLF_width(style->widget.uifont_id, str, BLF_DRAW_STR_DUMMY_MAX); } float file_font_pointsize(void) |