From 16bdfc8cc6b510919577bdff1b6811aa09f2da4d Mon Sep 17 00:00:00 2001 From: themancalledjakob Date: Tue, 13 May 2025 17:29:12 +0200 Subject: [PATCH] cosmetics --- butils.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/butils.py b/butils.py index e792156..924ae35 100644 --- a/butils.py +++ b/butils.py @@ -866,9 +866,9 @@ def set_text_on_curve(text_properties, reset_timeout_s=0.1, reset_depsgraph_n=4) glyph_tmp = Font.get_glyph( text_properties.font_name, text_properties.face_name, glyph_id ) - if glyph_tmp == None: + if glyph_tmp is None: space_width = Font.is_space(glyph_id) - if space_width != False: + if space_width: advance = advance + space_width * text_properties.font_size continue @@ -881,7 +881,7 @@ def set_text_on_curve(text_properties, reset_timeout_s=0.1, reset_depsgraph_n=4) text_properties.face_name, possible_replacement, ) - if glyph_tmp != None: + if glyph_tmp is not None: message = message + f" (replaced with '{possible_replacement}')" replaced = True @@ -891,7 +891,7 @@ def set_text_on_curve(text_properties, reset_timeout_s=0.1, reset_depsgraph_n=4) message=message, prevent_repeat=True, ) - if replaced == False: + if not replaced: continue glyph = glyph_tmp.original @@ -987,7 +987,7 @@ def set_text_on_curve(text_properties, reset_timeout_s=0.1, reset_depsgraph_n=4) # now we need to compensate for curvature # otherwise letters will be closer together the curvier the bezier is - # this could be done more efficiently, but whatever + # NOTE: this could be done more efficiently curve_compensation = 0 if distribution_type == "CALCULATE" and ( not is_newline or spline_index == 0