* The string length of the UTF8 ellipsis was incorrect (would have been 3).
* Whitespace cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26961 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -849,18 +849,18 @@ ServerFont::TruncateString(BString* inOut, uint32 mode, float width) const
|
||||
return;
|
||||
|
||||
// the width of the "…" glyph
|
||||
float ellipsisWidth = StringWidth(B_UTF8_ELLIPSIS, 1);
|
||||
const char *string = inOut->String();
|
||||
float ellipsisWidth = StringWidth(B_UTF8_ELLIPSIS, strlen(B_UTF8_ELLIPSIS));
|
||||
const char* string = inOut->String();
|
||||
int32 length = inOut->Length();
|
||||
|
||||
// temporary array to hold result
|
||||
char *result = new char[length + 3];
|
||||
char* result = new char[length + 3];
|
||||
|
||||
// count the individual glyphs
|
||||
int32 numChars = UTF8CountChars(string, -1);
|
||||
|
||||
// get the escapement of each glyph in font units
|
||||
float *escapementArray = new float[numChars];
|
||||
float* escapementArray = new float[numChars];
|
||||
static escapement_delta delta = (escapement_delta){ 0.0, 0.0 };
|
||||
if (GetEscapements(string, length, numChars, delta, escapementArray)
|
||||
== B_OK) {
|
||||
|
||||
Reference in New Issue
Block a user