Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/font.c
| Show First 20 Lines • Show All 949 Lines • ▼ Show 20 Lines | if (ascii == '\n' || ascii == 0 || ct->dobreak) { | ||||
| yof = MARGIN_Y_MIN; | yof = MARGIN_Y_MIN; | ||||
| } | } | ||||
| else if (last_line == -1) { | else if (last_line == -1) { | ||||
| last_line = lnr + 1; | last_line = lnr + 1; | ||||
| info->flag |= CU_CHINFO_OVERFLOW; | info->flag |= CU_CHINFO_OVERFLOW; | ||||
| } | } | ||||
| } | } | ||||
| current_line_length += xof; | current_line_length += xof - MARGIN_X_MIN; | ||||
| if (ct->dobreak) { | if (ct->dobreak) { | ||||
| current_line_length += twidth; | current_line_length += twidth; | ||||
| } | } | ||||
| else { | else { | ||||
| longest_line_length = MAX2(current_line_length, longest_line_length); | longest_line_length = MAX2(current_line_length, longest_line_length); | ||||
| current_line_length = 0.0f; | current_line_length = 0.0f; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 54 Lines • ▼ Show 20 Lines | else { | ||||
| xof += (twidth * wsfac * (1.0f + (info->kern / 40.0f))) + xtrax; | xof += (twidth * wsfac * (1.0f + (info->kern / 40.0f))) + xtrax; | ||||
| if (sb) { | if (sb) { | ||||
| sb->w = (xof * font_size) - sb->w; | sb->w = (xof * font_size) - sb->w; | ||||
| } | } | ||||
| } | } | ||||
| ct++; | ct++; | ||||
| } | } | ||||
| current_line_length += xof + twidth; | current_line_length += xof + twidth - MARGIN_X_MIN; | ||||
| longest_line_length = MAX2(current_line_length, longest_line_length); | longest_line_length = MAX2(current_line_length, longest_line_length); | ||||
| cu->lines = 1; | cu->lines = 1; | ||||
| for (i = 0; i <= slen; i++) { | for (i = 0; i <= slen; i++) { | ||||
| ascii = mem[i]; | ascii = mem[i]; | ||||
| ct = &chartransdata[i]; | ct = &chartransdata[i]; | ||||
| if (ascii == '\n' || ct->dobreak) { | if (ascii == '\n' || ct->dobreak) { | ||||
| cu->lines++; | cu->lines++; | ||||
| ▲ Show 20 Lines • Show All 678 Lines • Show Last 20 Lines | |||||