Function added to check if a script may have ligatures that need to be broken. 36/44036/4
authorVictor Cebollada <v.cebollada@samsung.com>
Thu, 16 Jul 2015 07:14:33 +0000 (08:14 +0100)
committerVíctor Cebollada <v.cebollada@samsung.com>
Fri, 17 Jul 2015 09:12:48 +0000 (02:12 -0700)
Change-Id: I92c9d23b76c174f47057a75fa071e19aa23a7676
Signed-off-by: Victor Cebollada <v.cebollada@samsung.com>
text/dali/devel-api/text-abstraction/script.cpp
text/dali/devel-api/text-abstraction/script.h

index 6629a21..2b534f8 100644 (file)
@@ -597,6 +597,12 @@ bool IsCommonScript( Character character )
            IsNewParagraph( character ) );
 }
 
+bool HasLigatureMustBreak( Script script )
+{
+  return ( ( LATIN == script ) ||
+           ( ARABIC == script ) );
+}
+
 } // namespace TextAbstraction
 
 } // namespace Dali
index c8939c6..ee08ab2 100644 (file)
@@ -215,6 +215,17 @@ DALI_IMPORT_API bool IsThinSpace( Character character );
  */
 DALI_IMPORT_API bool IsCommonScript( Character character );
 
+/**
+ * @brief Whether the script contains ligatures that must be 'broken' for selection or cursor position.
+ *
+ * i.e The latin script has the 'ff' or 'fi' ligatures that need to be broken to position the cursor
+ * between the two characters. Equally the arabic script has the 'ﻻ' ligature that needs to be broken.
+ *
+ * @param[in] script The script.
+ *
+ * @return @e true if the script has ligatures that must be 'broken'.
+ */
+DALI_IMPORT_API bool HasLigatureMustBreak( Script script );
 } // namespace TextAbstraction
 
 } // namespace Dali