Text3d: store number of characters and utf8 length separately
authorCampbell Barton <ideasman42@gmail.com>
Fri, 3 Jan 2014 06:04:42 +0000 (17:04 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 3 Jan 2014 06:08:23 +0000 (17:08 +1100)
commit15bc30f4ee49c69f3ed6f92701a0f5cd52d306c5
treefc77fe7096673256d90c512267adb58eb53c23de
parenta5cb2229abbc7d43f34dabea332afd33614fc0db
Text3d: store number of characters and utf8 length separately

EditFont's use of Curve.len was very confusing, in editmode it
represented the number of characters, in object mode the number of
bytes. add Curve.len_wchar and keep track of both.

Also don't convert the editmode text into utf8 on every keystroke.
Now this is done on exiting editmode or save - to match most other
object types.

This also fixes curves 'body_format' being reported with an invalid size.
source/blender/blenkernel/BKE_blender.h
source/blender/blenkernel/BKE_font.h
source/blender/blenkernel/intern/curve.c
source/blender/blenkernel/intern/font.c
source/blender/blenloader/intern/versioning_260.c
source/blender/blenloader/intern/writefile.c
source/blender/editors/curve/editfont.c
source/blender/makesdna/DNA_curve_types.h
source/blender/makesrna/intern/rna_curve.c