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
Merge "Fix the cursor position when retrieving the selected text." into devel/master
[platform/core/uifw/dali-toolkit.git]
/
dali-toolkit
/
internal
/
text
/
multi-language-support-impl.cpp
diff --git
a/dali-toolkit/internal/text/multi-language-support-impl.cpp
b/dali-toolkit/internal/text/multi-language-support-impl.cpp
index
8d8b3c8
..
37cf040
100644
(file)
--- a/
dali-toolkit/internal/text/multi-language-support-impl.cpp
+++ b/
dali-toolkit/internal/text/multi-language-support-impl.cpp
@@
-32,7
+32,7
@@
namespace Toolkit
namespace
{
#if defined(DEBUG_ENABLED)
namespace
{
#if defined(DEBUG_ENABLED)
-Debug::Filter* gLogFilter = Debug::Filter::New(Debug::
Concise
, true, "LOG_MULTI_LANGUAGE_SUPPORT");
+Debug::Filter* gLogFilter = Debug::Filter::New(Debug::
NoLogging
, true, "LOG_MULTI_LANGUAGE_SUPPORT");
#endif
const Dali::Toolkit::Text::Character UTF32_A = 0x0041;
#endif
const Dali::Toolkit::Text::Character UTF32_A = 0x0041;
@@
-325,10
+325,10
@@
void MultilanguageSupport::SetScripts( const Vector<Character>& text,
// Adds white spaces between characters.
currentScriptRun.characterRun.numberOfCharacters += numberOfAllScriptCharacters;
numberOfAllScriptCharacters = 0u;
// Adds white spaces between characters.
currentScriptRun.characterRun.numberOfCharacters += numberOfAllScriptCharacters;
numberOfAllScriptCharacters = 0u;
-
- // Add one more character to the run.
- ++currentScriptRun.characterRun.numberOfCharacters;
}
}
+
+ // Add one more character to the run.
+ ++currentScriptRun.characterRun.numberOfCharacters;
}
}
}
}
@@
-351,19
+351,19
@@
void MultilanguageSupport::ValidateFonts( const Vector<Character>& text,
const Vector<ScriptRun>& scripts,
Vector<FontRun>& fonts )
{
const Vector<ScriptRun>& scripts,
Vector<FontRun>& fonts )
{
- DALI_LOG_INFO( gLogFilter, Debug::
Verbose
, "-->MultilanguageSupport::ValidateFonts\n" );
+ DALI_LOG_INFO( gLogFilter, Debug::
General
, "-->MultilanguageSupport::ValidateFonts\n" );
const Length numberOfCharacters = text.Count();
if( 0u == numberOfCharacters )
{
const Length numberOfCharacters = text.Count();
if( 0u == numberOfCharacters )
{
- DALI_LOG_INFO( gLogFilter, Debug::
Verbose
, "<--MultilanguageSupport::ValidateFonts\n" );
+ DALI_LOG_INFO( gLogFilter, Debug::
General
, "<--MultilanguageSupport::ValidateFonts\n" );
// Nothing to do if there are no characters.
return;
}
// Copy the fonts set by application developers.
const Length numberOfFontRuns = fonts.Count();
// Nothing to do if there are no characters.
return;
}
// Copy the fonts set by application developers.
const Length numberOfFontRuns = fonts.Count();
- const Vector<FontRun>
defined
Fonts = fonts;
+ const Vector<FontRun>
userSet
Fonts = fonts;
fonts.Clear();
// Traverse the characters and validate/set the fonts.
fonts.Clear();
// Traverse the characters and validate/set the fonts.
@@
-386,8
+386,8
@@
void MultilanguageSupport::ValidateFonts( const Vector<Character>& text,
TextAbstraction::FontClient fontClient = TextAbstraction::FontClient::Get();
// Iterators of the font and script runs.
TextAbstraction::FontClient fontClient = TextAbstraction::FontClient::Get();
// Iterators of the font and script runs.
- Vector<FontRun>::ConstIterator fontRunIt =
defined
Fonts.Begin();
- Vector<FontRun>::ConstIterator fontRunEndIt =
defined
Fonts.End();
+ Vector<FontRun>::ConstIterator fontRunIt =
userSet
Fonts.Begin();
+ Vector<FontRun>::ConstIterator fontRunEndIt =
userSet
Fonts.End();
Vector<ScriptRun>::ConstIterator scriptRunIt = scripts.Begin();
Vector<ScriptRun>::ConstIterator scriptRunEndIt = scripts.End();
Vector<ScriptRun>::ConstIterator scriptRunIt = scripts.Begin();
Vector<ScriptRun>::ConstIterator scriptRunEndIt = scripts.End();
@@
-428,6
+428,7
@@
void MultilanguageSupport::ValidateFonts( const Vector<Character>& text,
// Whether the font being validated is a default one not set by the user.
const bool isDefault = ( 0u == fontId );
// Whether the font being validated is a default one not set by the user.
const bool isDefault = ( 0u == fontId );
+ FontId preferredFont = fontId;
DALI_LOG_INFO( gLogFilter,
Debug::Verbose,
DALI_LOG_INFO( gLogFilter,
Debug::Verbose,
@@
-525,8
+526,8
@@
void MultilanguageSupport::ValidateFonts( const Vector<Character>& text,
// Emojis are present in many monochrome fonts; prefer color by default.
bool preferColor = ( TextAbstraction::EMOJI == script );
// Emojis are present in many monochrome fonts; prefer color by default.
bool preferColor = ( TextAbstraction::EMOJI == script );
- // Find a
default
font.
- fontId = fontClient.Find
DefaultFont(
character, pointSize, preferColor );
+ // Find a
fallback-
font.
+ fontId = fontClient.Find
FallbackFont( preferredFont,
character, pointSize, preferColor );
// If the system does not support a suitable font, fallback to Latin
if( 0u == fontId )
// If the system does not support a suitable font, fallback to Latin
if( 0u == fontId )
@@
-585,7
+586,7
@@
void MultilanguageSupport::ValidateFonts( const Vector<Character>& text,
// Store the last run.
fonts.PushBack( currentFontRun );
}
// Store the last run.
fonts.PushBack( currentFontRun );
}
- DALI_LOG_INFO( gLogFilter, Debug::
Verbose
, "<--MultilanguageSupport::ValidateFonts\n" );
+ DALI_LOG_INFO( gLogFilter, Debug::
General
, "<--MultilanguageSupport::ValidateFonts\n" );
}
} // namespace Internal
}
} // namespace Internal