Refactoring: Corrections and unifications in mathematics vfont gizmos #107193

Closed
Iliya Katushenock wants to merge 19 commits from mod_moder/blender:tmp_fix_text_cursor_transform into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
1 changed files with 3 additions and 2 deletions
Showing only changes of commit 6928d95478 - Show all commits

View File

@ -1590,16 +1590,17 @@ static bool vfont_to_curve(Object *ob,
cursor_centre[1] -= descender_downship;
float cursor_rot = 0.0f;
/* Default alignment is between previous and current symbol. */
float align_factor = 0.5f;
if (is_line_cap) {
/* Aling to start or end of each line. */
/* Align to start or end of each line. */
align_factor = is_start_cap ? 1.0f : 0.0f;
}
else if (cursor_to_selection) {
align_factor = is_before_selection ? 1.0f : 0.0f;
}
else if (is_between_space_and_word) {
/* Aling to text, if cursor between regular text and space. */
/* Align to text, if cursor between regular text and space. */
align_factor = is_space_word ? 1.0f : 0.0f;
}
cursor_rot = slerp_r_r(prev_char_rot, curent_char_rot, align_factor);