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:
authorRichard Antalik <richardantalik@gmail.com>2019-02-23 17:14:44 +0300
committerRichard Antalik <richardantalik@gmail.com>2019-02-23 17:14:44 +0300
commit6bcdcc96c2548e0ee5e18acc37915aedee6329e0 (patch)
tree92fb7e5870dd89a9a0db6f5373d7ca2d1d38a185 /source/blender/editors/interface
parent6eb59c57782724cdcbc1564356f2c2e2619c01ec (diff)
Glyph cache is cleared by UI_view2d_zoom_cache_reset, when zooming V2D, but is required to calculate text height in UI_view2d_text_cache_draw
This caused text in strips to "jump around" There was a comment in UI_view2d_zoom_cache_reset: While scaling we can accumulate fonts at many sizes (~20 or so). Not an issue with embedded font, but can use over 500Mb with i18n ones! See [#38244]. Reviewed by: Brecht Differential revision: https://developer.blender.org/D4389
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r--source/blender/editors/interface/view2d.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c
index 6ac8d83da92..bb49f024bc3 100644
--- a/source/blender/editors/interface/view2d.c
+++ b/source/blender/editors/interface/view2d.c
@@ -2572,6 +2572,8 @@ void UI_view2d_text_cache_draw(ARegion *ar)
/* investigate using BLF_ascender() */
const int font_id = BLF_default();
+
+ BLF_set_default();
const float default_height = g_v2d_strings ? BLF_height(font_id, "28", 3) : 0.0f;
wmOrtho2_region_pixelspace(ar);