UI: Correction to Weight of 3D Viewport Overlay Text #119808

Merged
Harley Acheson merged 1 commits from Harley/blender:View3DOverlayWeight into main 2024-03-22 21:29:04 +01:00
2 changed files with 5 additions and 2 deletions

View File

@ -494,7 +494,7 @@ static void fontstyle_set_ex(const uiFontStyle *fs, const float dpi_fac)
uiFont *font = uifont_to_blfont(fs->uifont_id);
BLF_size(font->blf_id, fs->points * dpi_fac);
BLF_character_weight(fs->uifont_id, fs->character_weight);
BLF_character_weight(font->blf_id, fs->character_weight);
}
void UI_fontstyle_set(const uiFontStyle *fs)

View File

@ -1506,7 +1506,10 @@ void view3d_draw_region_info(const bContext *C, ARegion *region)
if ((v3d->flag2 & V3D_HIDE_OVERLAYS) == 0) {
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);
const uiFontStyle *fstyle = UI_FSTYLE_WIDGET_LABEL;
UI_fontstyle_set(fstyle);
BLF_default_size(fstyle->points);
BLF_set_default();
if ((v3d->overlay.flag & V3D_OVERLAY_HIDE_TEXT) == 0) {