[Webkit-unassigned] [Bug 108881] Canvas fillText and measureText handle ideographic spaces differently
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Aug 16 06:27:53 PDT 2013
https://bugs.webkit.org/show_bug.cgi?id=108881
--- Comment #39 from Rashmi Shyamasundar <rashmi.s2 at samsung.com> 2013-08-16 06:27:25 PST ---
Please comment on below piece of code :-
static void normalizeSpaces(String& text)
{
unsigned textLength = text.length();
unsigned i = 0;
for (; i != textLength; ++i) {
if (spaceNeedsReplacing(text[i]))
break;
}
if (i == textLength)
return;
WTF::Vector<UChar> charVector(textLength);
memcpy(&charVector, &text, i * sizeof(UChar));
charVector[i] = ' ';
++i;
for (; i != textLength; ++i) {
if (spaceNeedsReplacing(text[i]))
charVector[i] = ' ';
else
charVector[i] = text[i];
}
text.adopt(charVector);
}
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list