Skip to content

Commit

Permalink
measureit_geometry: Use ui_scale + dpi : D5455
Browse files Browse the repository at this point in the history
  • Loading branch information
meta-androcto committed Aug 20, 2019
1 parent b37f698 commit 2f23e77
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion measureit/measureit_geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2f23e77

Please sign in to comment.