measureit_geometry: Use ui_scale + dpi : D5455

This commit is contained in:
Brendon Murphy 2019-08-20 11:15:31 +10:00
parent b37f698270
commit 2f23e77e11
1 changed files with 2 additions and 1 deletions

View File

@ -810,7 +810,8 @@ def draw_text(myobj, pos2d, display_text, rgba, fsize, align='L', text_rot=0.0):
gap = 12
x_pos, y_pos = pos2d
font_id = 0
blf.size(font_id, fsize, 72)
ui_scale = bpy.context.preferences.system.ui_scale
blf.size(font_id, round(fsize * ui_scale), bpy.context.preferences.system.dpi)
# blf.size(font_id, fsize, dpi)
# height of one line
mwidth, mheight = blf.dimensions(font_id, "Tp") # uses high/low letters