Fix strips text offset when zooming VSE timeline
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].
This commit is contained in:
parent
82b3b1a3c6
commit
f680ab9c4e
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue