preliminary font size and translation

This commit is contained in:
jrkb 2024-08-05 12:59:07 +02:00
parent 8a63014d58
commit 7e55f9e9bf
2 changed files with 35 additions and 12 deletions

View file

@ -576,7 +576,7 @@ def set_text_on_curve(text_properties):
ob.constraints["Follow Path"].up_axis = "UP_Y"
elif distribution_type == 'CALCULATE':
location, tangent = calc_point_on_bezier_curve(mom, advance, True)
ob.location = mom.matrix_world @ location
ob.location = mom.matrix_world @ (location + text_properties.translation)
mask = [0]
input_rotations = [mathutils.Vector((0.0, 0.0, 0.0))]
vectors = [tangent]
@ -593,7 +593,7 @@ def set_text_on_curve(text_properties):
q.rotate(text_properties.orientation)
ob.rotation_quaternion = (mom.matrix_world @ motor[0] @ q.to_matrix().to_4x4()).to_quaternion()
scalor = 0.001
scalor = 0.001 * text_properties.font_size
glyph_advance = (-1 * glyph.bound_box[0][0] + glyph.bound_box[4][0]) * scalor + text_properties.letter_spacing