From 6398e2daddfa7c53433cf8a5204aa80cdd12a7d5 Mon Sep 17 00:00:00 2001
From: Jonathan Smith <j.jaydez@gmail.com>
Date: Sun, 20 Jun 2010 06:15:54 +0000
Subject: [PATCH] Added fontid args to all missing spots so that script now
 displays text distance on the screen

---
 space_view3d_panel_measure.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/space_view3d_panel_measure.py b/space_view3d_panel_measure.py
index 51e559dd6..f338ae58b 100644
--- a/space_view3d_panel_measure.py
+++ b/space_view3d_panel_measure.py
@@ -502,14 +502,14 @@ def draw_measurements_callback(self, context):
         # we can draw it OVER the line.
         coord_2d = region3d_get_2d_coordinates(context, p2 + (p1 - p2) * 0.5)
         offset = 10  # Offset the text a bit to the right.
-        blf.position(coord_2d[0] + offset, coord_2d[1], 0)
+        blf.position(0, coord_2d[0] + offset, coord_2d[1], 0)
 
         dist = (p1 - p2).length
         text = "Distance: " + str(round(dist, PRECISION)) + " BU"
         # @todo Get user pref for text color in 3D View
         bgl.glColor4f(1.0, 1.0, 1.0, 1.0)
-        blf.size(12, 72)  # Prevent font size to randomly change.
-        blf.draw(text)
+        blf.size(0, 12, 72)  # Prevent font size to randomly change.
+        blf.draw(0, text)
 
 
 class VIEW3D_OT_display_measurements(bpy.types.Operator):
-- 
GitLab