The MATCH_SYSTEM_LANGUAGE_DIRECTION property defaults to true.
When the layout direction of TextLabel, TextField, or TextEditor is changed,
LTR/RTL alignment of text follows the layout direction of each control.
If you set MATCH_SYSTEM_LANGUAGE_DIRECTION to false
As before, LTR/RTL is determined according to the language of the text.
Change-Id: If92e44feb942cf3024bbe56842d75b2b45a73448
/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 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.
BidiInfoIndex BidirectionalSupport::CreateInfo(const Character* const paragraph,
Length numberOfCharacters,
- bool matchSystemLanguageDirection,
+ bool matchLayoutDirection,
LayoutDirection::Type layoutDirection)
{
return GetImplementation(*this).CreateInfo(paragraph,
numberOfCharacters,
- matchSystemLanguageDirection,
+ matchLayoutDirection,
layoutDirection);
}
#define DALI_PLATFORM_TEXT_ABSTRACTION_BIDIRECTIONAL_SUPPORT_H
/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 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.
*
* @param[in] paragraph Pointer to the first character of the paragraph coded in UTF32.
* @param[in] numberOfCharacters The number of characters of the paragraph.
- * @param[in] matchSystemLanguageDirection Whether match for system language direction or not.
- * @param[in] layoutDirection The direction of the system language.
+ * @param[in] matchLayoutDirection Whether match for layout direction or not.
+ * @param[in] layoutDirection The direction of the layout direction.
* @return An index of an object inside a table storing the bidirectional data.
*/
BidiInfoIndex CreateInfo(const Character* const paragraph,
Length numberOfCharacters,
- bool matchSystemLanguageDirection,
+ bool matchLayoutDirection,
LayoutDirection::Type layoutDirection);
/**
BidiInfoIndex CreateInfo(const Character* const paragraph,
Length numberOfCharacters,
- bool matchSystemLanguageDirection,
+ bool matchLayoutDirection,
LayoutDirection::Type layoutDirection)
{
// Reserve memory for the paragraph's bidirectional info.
fribidi_get_bidi_types(paragraph, numberOfCharacters, bidirectionalInfo->characterTypes);
// Retrieve the paragraph's direction.
- bidirectionalInfo->paragraphDirection = matchSystemLanguageDirection == true ? (layoutDirection == LayoutDirection::RIGHT_TO_LEFT ? FRIBIDI_PAR_RTL : FRIBIDI_PAR_LTR) : (fribidi_get_par_direction(bidirectionalInfo->characterTypes, numberOfCharacters));
+ bidirectionalInfo->paragraphDirection = matchLayoutDirection == true ? (layoutDirection == LayoutDirection::RIGHT_TO_LEFT ? FRIBIDI_PAR_RTL : FRIBIDI_PAR_LTR) : (fribidi_get_par_direction(bidirectionalInfo->characterTypes, numberOfCharacters));
// Retrieve the embedding levels.
if(fribidi_get_par_embedding_levels(bidirectionalInfo->characterTypes, numberOfCharacters, &bidirectionalInfo->paragraphDirection, bidirectionalInfo->embeddedLevels) == 0)
BidiInfoIndex BidirectionalSupport::CreateInfo(const Character* const paragraph,
Length numberOfCharacters,
- bool matchSystemLanguageDirection,
+ bool matchLayoutDirection,
Dali::LayoutDirection::Type layoutDirection)
{
CreatePlugin();
return mPlugin->CreateInfo(paragraph,
numberOfCharacters,
- matchSystemLanguageDirection,
+ matchLayoutDirection,
layoutDirection);
}
*/
BidiInfoIndex CreateInfo(const Character* const paragraph,
Length numberOfCharacters,
- bool matchSystemLanguageDirection,
+ bool matchLayoutDirection,
LayoutDirection::Type layoutDirection);
/**