[Webkit-unassigned] [Bug 77067] Parenthesis in RTL fonts are not mirrored with SVG fonts
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Jan 27 01:39:28 PST 2012
https://bugs.webkit.org/show_bug.cgi?id=77067
--- Comment #8 from Nikolas Zimmermann <zimmermann at kde.org> 2012-01-27 01:39:28 PST ---
(From update of attachment 124241)
View in context: https://bugs.webkit.org/attachment.cgi?id=124241&action=review
r- for the lacking ChangeLog, and as there's more to do I think:
> Source/WebCore/ChangeLog:8
> +
> + Tests: svg/custom/glyph-selection-arabic-forms.svg
Needs a real ChangeLog :-)
> Source/WebCore/svg/SVGFontData.cpp:277
> + mirroredCharacters.append((UChar) mirroredChar(characters[i]));
You're casting from UChar32 to UChar here - doesn't this break any non-bmp glyphs?
What you're supposed to do is using:
UChar32 character = 0;
unsigned clusterLength = 0;
SurrogatePairAwareTextIterator textIterator(characters, 0, length, length);
while (textIterator.consume(character, clusterLength)) {
the SurrogatePairAwareTextIterator.. - see eg. SVGGlyphMap.h collectGlyphsForString(), where the 'remainingTextInRun' is being passed to.
The mirroring needs to happen on UChar32 basis - you wouldn't want to mirror parts of a surrogate pair, but instead the full UTF-16 code point, if I get this right.
Then to create a String again, you need to decompose those potentially mirrored UTF-16 UChar32, back into two utf-8 UChar pairs.
Now if mirroring the two parts of a surrogate pair, is the same as mirroring the full UChar32, then my comment is wrong, but I think this isn't the case.
Please double check.
--
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