projects
/
platform
/
core
/
uifw
/
dali-toolkit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[dali_1.9.29] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git]
/
dali-toolkit
/
internal
/
text
/
shaper.cpp
diff --git
a/dali-toolkit/internal/text/shaper.cpp
b/dali-toolkit/internal/text/shaper.cpp
old mode 100644
(file)
new mode 100755
(executable)
index
5313d0c
..
de41d0e
--- a/
dali-toolkit/internal/text/shaper.cpp
+++ b/
dali-toolkit/internal/text/shaper.cpp
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (c) 201
5
Samsung Electronics Co., Ltd.
+ * Copyright (c) 201
9
Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@
-111,10
+111,14
@@
void ShapeText( const Vector<Character>& text,
// There is no way to know the number of glyphs before shaping the text.
// To avoid reallocations it's reserved space for a slightly biger number of glyphs than the number of characters.
// There is no way to know the number of glyphs before shaping the text.
// To avoid reallocations it's reserved space for a slightly biger number of glyphs than the number of characters.
+ GlyphInfo glyphInfo;
+ glyphInfo.isItalicRequired = false;
+ glyphInfo.isBoldRequired = false;
+
const Length currentNumberOfGlyphs = glyphs.Count();
const Length numberOfGlyphsReserved = static_cast<Length>( numberOfCharacters * 1.3f );
const Length currentNumberOfGlyphs = glyphs.Count();
const Length numberOfGlyphsReserved = static_cast<Length>( numberOfCharacters * 1.3f );
- glyphs.Res
iz
e( currentNumberOfGlyphs + numberOfGlyphsReserved );
- glyphToCharacterMap.Res
iz
e( currentNumberOfGlyphs + numberOfGlyphsReserved );
+ glyphs.Res
erv
e( currentNumberOfGlyphs + numberOfGlyphsReserved );
+ glyphToCharacterMap.Res
erv
e( currentNumberOfGlyphs + numberOfGlyphsReserved );
// The actual number of glyphs.
Length totalNumberOfGlyphs = currentNumberOfGlyphs;
// The actual number of glyphs.
Length totalNumberOfGlyphs = currentNumberOfGlyphs;
@@
-137,6
+141,8
@@
void ShapeText( const Vector<Character>& text,
currentFontId = fontRun.fontId;
currentScript = scriptRun.script;
currentFontId = fontRun.fontId;
currentScript = scriptRun.script;
+ const bool isItalicRequired = fontRun.isItalicRequired;
+ const bool isBoldRequired = fontRun.isBoldRequired;
// Get the min index to the last character of both runs.
CharacterIndex currentIndex = min( fontRun.characterRun.characterIndex + fontRun.characterRun.numberOfCharacters,
// Get the min index to the last character of both runs.
CharacterIndex currentIndex = min( fontRun.characterRun.characterIndex + fontRun.characterRun.numberOfCharacters,
@@
-170,12
+176,17
@@
void ShapeText( const Vector<Character>& text,
// Retrieve the glyphs and the glyph to character conversion map.
Vector<GlyphInfo> tmpGlyphs;
Vector<CharacterIndex> tmpGlyphToCharacterMap;
// Retrieve the glyphs and the glyph to character conversion map.
Vector<GlyphInfo> tmpGlyphs;
Vector<CharacterIndex> tmpGlyphToCharacterMap;
- tmpGlyphs.Resize( numberOfGlyphs );
+
+ GlyphInfo glyphInfo;
+ glyphInfo.isItalicRequired = isItalicRequired;
+ glyphInfo.isBoldRequired = isBoldRequired;
+
+ tmpGlyphs.Resize( numberOfGlyphs, glyphInfo );
tmpGlyphToCharacterMap.Resize( numberOfGlyphs );
shaping.GetGlyphs( tmpGlyphs.Begin(),
tmpGlyphToCharacterMap.Begin() );
tmpGlyphToCharacterMap.Resize( numberOfGlyphs );
shaping.GetGlyphs( tmpGlyphs.Begin(),
tmpGlyphToCharacterMap.Begin() );
- // Update the
indices
.
+ // Update the
new indices of the glyph to character map
.
if( 0u != totalNumberOfGlyphs )
{
for( Vector<CharacterIndex>::Iterator it = tmpGlyphToCharacterMap.Begin(),
if( 0u != totalNumberOfGlyphs )
{
for( Vector<CharacterIndex>::Iterator it = tmpGlyphToCharacterMap.Begin(),