diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-01-05 13:15:39 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-01-05 14:15:24 +0400 |
commit | 4eed4b3bcd6af2a3f0b71220cd7e8c8286bd9e27 (patch) | |
tree | b29bbe3fb098883213da40cd3cb6bdc7392f5d2e /source/blender/blenkernel/intern/font.c | |
parent | e20f357cc2955071d4505f7f4b3bce965484884e (diff) |
Text3d: remove sepchar, old feature which no longer has any UI access.
Diffstat (limited to 'source/blender/blenkernel/intern/font.c')
-rw-r--r-- | source/blender/blenkernel/intern/font.c | 83 |
1 files changed, 29 insertions, 54 deletions
diff --git a/source/blender/blenkernel/intern/font.c b/source/blender/blenkernel/intern/font.c index 0fddce5a9b3..59061c28f57 100644 --- a/source/blender/blenkernel/intern/font.c +++ b/source/blender/blenkernel/intern/font.c @@ -1011,63 +1011,38 @@ makebreak: BKE_nurbList_free(&cu->nurb); ct = chartransdata; - if (cu->sepchar == 0) { - for (i = 0; i < slen; i++) { - unsigned int cha = (unsigned int) mem[i]; - info = &(custrinfo[i]); - if (info->mat_nr > (ob->totcol)) { - /* printf("Error: Illegal material index (%d) in text object, setting to 0\n", info->mat_nr); */ - info->mat_nr = 0; - } - /* We do not want to see any character for \n or \r */ - if (cha != '\n' && cha != '\r') - buildchar(bmain, cu, cha, info, ct->xof, ct->yof, ct->rot, i); - - if ((info->flag & CU_CHINFO_UNDERLINE) && (cu->textoncurve == NULL) && (cha != '\n') && (cha != '\r')) { - float ulwidth, uloverlap = 0.0f; - - if ((i < (slen - 1)) && (mem[i + 1] != '\n') && (mem[i + 1] != '\r') && - ((mem[i + 1] != ' ') || (custrinfo[i + 1].flag & CU_CHINFO_UNDERLINE)) && - ((custrinfo[i + 1].flag & CU_CHINFO_WRAP) == 0)) - { - uloverlap = xtrax + 0.1f; - } - /* Find the character, the characters has to be in the memory already - * since character checking has been done earlier already. */ - che = find_vfont_char(vfd, cha); - - twidth = char_width(cu, che, info); - ulwidth = cu->fsize * ((twidth * (1.0f + (info->kern / 40.0f))) + uloverlap); - build_underline(cu, ct->xof * cu->fsize, ct->yof * cu->fsize + (cu->ulpos - 0.05f) * cu->fsize, - ct->xof * cu->fsize + ulwidth, - ct->yof * cu->fsize + (cu->ulpos - 0.05f) * cu->fsize - cu->ulheight * cu->fsize, - i, info->mat_nr); - } - ct++; + for (i = 0; i < slen; i++) { + unsigned int cha = (unsigned int) mem[i]; + info = &(custrinfo[i]); + if (info->mat_nr > (ob->totcol)) { + /* printf("Error: Illegal material index (%d) in text object, setting to 0\n", info->mat_nr); */ + info->mat_nr = 0; } - } - else { - int outta = 0; - for (i = 0; (i < slen) && (outta == 0); i++) { - ascii = mem[i]; - info = &(custrinfo[i]); - if (cu->sepchar == (i + 1)) { - float vecyo[3]; - - vecyo[0] = ct->xof; - vecyo[1] = ct->yof; - vecyo[2] = 0.0f; - - mem[0] = ascii; - mem[1] = 0; - custrinfo[0] = *info; - cu->len = cu->len_wchar = cu->pos = 1; - mul_v3_m4v3(ob->loc, ob->obmat, vecyo); - outta = 1; - cu->sepchar = 0; + /* We do not want to see any character for \n or \r */ + if (cha != '\n' && cha != '\r') + buildchar(bmain, cu, cha, info, ct->xof, ct->yof, ct->rot, i); + + if ((info->flag & CU_CHINFO_UNDERLINE) && (cu->textoncurve == NULL) && (cha != '\n') && (cha != '\r')) { + float ulwidth, uloverlap = 0.0f; + + if ((i < (slen - 1)) && (mem[i + 1] != '\n') && (mem[i + 1] != '\r') && + ((mem[i + 1] != ' ') || (custrinfo[i + 1].flag & CU_CHINFO_UNDERLINE)) && + ((custrinfo[i + 1].flag & CU_CHINFO_WRAP) == 0)) + { + uloverlap = xtrax + 0.1f; } - ct++; + /* Find the character, the characters has to be in the memory already + * since character checking has been done earlier already. */ + che = find_vfont_char(vfd, cha); + + twidth = char_width(cu, che, info); + ulwidth = cu->fsize * ((twidth * (1.0f + (info->kern / 40.0f))) + uloverlap); + build_underline(cu, ct->xof * cu->fsize, ct->yof * cu->fsize + (cu->ulpos - 0.05f) * cu->fsize, + ct->xof * cu->fsize + ulwidth, + ct->yof * cu->fsize + (cu->ulpos - 0.05f) * cu->fsize - cu->ulheight * cu->fsize, + i, info->mat_nr); } + ct++; } } |