mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-08 06:53:45 +00:00
ICU-6315 use char indices from fakeGlyphStorage after canonical processing.
X-SVN-Rev: 24102
This commit is contained in:
parent
340fa39fd6
commit
1e7e07e616
1 changed files with 9 additions and 1 deletions
|
@ -179,7 +179,7 @@ void LayoutEngine::getGlyphPosition(le_int32 glyphIndex, float &x, float &y, LEE
|
|||
}
|
||||
|
||||
le_int32 LayoutEngine::characterProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft,
|
||||
LEUnicode *&outChars, LEGlyphStorage &/*glyphStorage*/, LEErrorCode &success)
|
||||
LEUnicode *&outChars, LEGlyphStorage &glyphStorage, LEErrorCode &success)
|
||||
{
|
||||
if (LE_FAILURE(success)) {
|
||||
return 0;
|
||||
|
@ -246,6 +246,14 @@ le_int32 LayoutEngine::characterProcessing(const LEUnicode chars[], le_int32 off
|
|||
|
||||
out = (rightToLeft? outCharCount - 1 : 0);
|
||||
|
||||
/*
|
||||
* The char indices array in fakeGlyphStorage has the correct mapping
|
||||
* back to the original input characters. Save it in glyphStorage. The
|
||||
* subsequent call to glyphStoratge.allocateGlyphArray will keep this
|
||||
* array rather than allocating and initializing a new one.
|
||||
*/
|
||||
glyphStorage.adoptCharIndicesArray(fakeGlyphStorage);
|
||||
|
||||
outChars = LE_NEW_ARRAY(LEUnicode, outCharCount);
|
||||
for (i = 0; i < outCharCount; i += 1, out += dir) {
|
||||
outChars[out] = (LEUnicode) LE_GET_GLYPH(fakeGlyphStorage[i]);
|
||||
|
|
Loading…
Add table
Reference in a new issue