Hey. First I'd like to thank you a lot for the great work on this tool kit. Porting my code from XNA to SharpDX was only made possible because of this tool kit (I started porting with SharpDX 2.3 - before they introduced their tool kit).
I realize this issue was already raised here
, where you stated that you really don't see this as an issue. Well, it might be an issue for some, like me, who are implementing any sort of text editor with a caret. My implementation uses SpriteFont::MeasureString
to determine the position of the caret and requires trailing spaces accounted for. For a [quite ugly] work around, I intend to
- create string1, a substring of the trailing spaces.
- create string2, containing just one arbitrary letter character (ie: 'W').
- measure string2.
- create string3 by appending string2 to string1.
- measure string 3.
- calculate the length of trailing spaces as length-of-string3 minus length-of-string2.
Right now, I see no other approach to move the caret in my textbox/editor.