cosmetics

This commit is contained in:
jrkb 2025-05-13 17:29:12 +02:00
parent 47bc10df3f
commit 16bdfc8cc6

View file

@ -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( glyph_tmp = Font.get_glyph(
text_properties.font_name, text_properties.face_name, glyph_id 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) space_width = Font.is_space(glyph_id)
if space_width != False: if space_width:
advance = advance + space_width * text_properties.font_size advance = advance + space_width * text_properties.font_size
continue 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, text_properties.face_name,
possible_replacement, possible_replacement,
) )
if glyph_tmp != None: if glyph_tmp is not None:
message = message + f" (replaced with '{possible_replacement}')" message = message + f" (replaced with '{possible_replacement}')"
replaced = True replaced = True
@ -891,7 +891,7 @@ def set_text_on_curve(text_properties, reset_timeout_s=0.1, reset_depsgraph_n=4)
message=message, message=message,
prevent_repeat=True, prevent_repeat=True,
) )
if replaced == False: if not replaced:
continue continue
glyph = glyph_tmp.original 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 # now we need to compensate for curvature
# otherwise letters will be closer together the curvier the bezier is # 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 curve_compensation = 0
if distribution_type == "CALCULATE" and ( if distribution_type == "CALCULATE" and (
not is_newline or spline_index == 0 not is_newline or spline_index == 0