PyAPI: remove deprecated blf.size() dpi argument

Scripts can be updated by scaling the font size, e.g.

blf.size(id, size, dpi) -> blf.size(id, size * (dpi / 72.0))
This commit is contained in:
Campbell Barton
2023-05-23 12:02:10 +10:00
parent 7fbac7e235
commit 9357f7b606
3 changed files with 4 additions and 9 deletions

View File

@@ -11,7 +11,7 @@ def draw_callback_px(self, context):
# draw some text
blf.position(font_id, 15, 30, 0)
blf.size(font_id, 20, 72)
blf.size(font_id, 20.0)
blf.draw(font_id, "Hello Word " + str(len(self.mouse_path)))
# 50% alpha, 2 pixel width line