Fix #113826: Set Explicit Font Size for Overlays
The complaint illustrates how text measurement can be broken by a drawing callback. This is because overlays are setting global_font_size value, which is used by subsequent drawing, but does not explicitly set size on the global_font_default font, which is needed for measurement. Pull Request: https://projects.blender.org/blender/blender/pulls/113868
This commit is contained in:
committed by
Harley Acheson
parent
934c2c894b
commit
9a3fa4d8cc
@@ -1535,6 +1535,7 @@ void view3d_draw_region_info(const bContext *C, ARegion *region)
|
||||
int xoffset = rect->xmin + (0.5f * U.widget_unit);
|
||||
int yoffset = rect->ymax - (0.1f * U.widget_unit);
|
||||
BLF_default_size(UI_style_get()->widgetlabel.points);
|
||||
BLF_set_default();
|
||||
|
||||
if ((v3d->overlay.flag & V3D_OVERLAY_HIDE_TEXT) == 0) {
|
||||
if ((U.uiflag & USER_SHOW_FPS) && ED_screen_animation_no_scrub(wm)) {
|
||||
|
||||
Reference in New Issue
Block a user