Spannable: Add CharacterSpacing span 54/285554/6
authorsarajammal <s.al-jammal@partner.samsung.com>
Wed, 14 Dec 2022 12:17:48 +0000 (15:17 +0300)
committersarajammal <s.al-jammal@partner.samsung.com>
Sun, 18 Dec 2022 08:59:58 +0000 (11:59 +0300)
Change-Id: Ie9a6245719c5dced94d4e43599cfc54588126a0d

13 files changed:
automated-tests/src/dali-toolkit-internal/utc-Dali-Text-TextSpannable.cpp
automated-tests/src/dali-toolkit/CMakeLists.txt
automated-tests/src/dali-toolkit/utc-Dali-Text-CharacterSpacingSpan.cpp [new file with mode: 0644]
dali-toolkit/devel-api/file.list
dali-toolkit/devel-api/text/spans/character-spacing-span.cpp [new file with mode: 0644]
dali-toolkit/devel-api/text/spans/character-spacing-span.h [new file with mode: 0644]
dali-toolkit/internal/file.list
dali-toolkit/internal/text/controller/text-controller-impl-model-updater.cpp
dali-toolkit/internal/text/controller/text-controller-impl.cpp
dali-toolkit/internal/text/logical-model-impl.cpp
dali-toolkit/internal/text/logical-model-impl.h
dali-toolkit/internal/text/spannable/spans/character-spacing-span-impl.cpp [new file with mode: 0644]
dali-toolkit/internal/text/spannable/spans/character-spacing-span-impl.h [new file with mode: 0644]

index 1143326..8aec3c1 100644 (file)
@@ -37,6 +37,8 @@
 #include <dali-toolkit/internal/text/text-view.h>
 #include <dali-toolkit/public-api/text/text-enumerations.h>
 #include <toolkit-text-utils.h>
+#include <dali-toolkit/devel-api/text/spans/character-spacing-span.h>
+
 
 using namespace Dali;
 using namespace Toolkit;
@@ -90,6 +92,19 @@ Text::SpannableString CreateSpannableStringForUnderlineSpan()
   return spannableString;
 }
 
+Text::SpannableString CreateSpannableStringForCharacterSpacing()
+{
+  Text::SpannableString spannableString = Text::SpannableString::New("Hello World");
+  DALI_TEST_CHECK(spannableString);
+
+  auto isCharacterSpacingSpan = spannableString.AttachSpan(
+  Text::CharacterSpacingSpan::New(5.2f),
+  Text::Range::New(5u, 7u));
+  DALI_TEST_CHECK(isCharacterSpacingSpan);
+
+  return spannableString;
+}
+
 void CheckColorIndices(const Text::ColorIndex* const colorIndicesBuffer,
                        uint32_t                      numberOfIndices,
                        std::vector<uint32_t>         indicesToCheck,
@@ -362,4 +377,25 @@ int UtcDaliToolkitTextLabelSetSpannedText_UnderlineSpan(void)
   DALI_TEST_CHECK(underlineRuns[0].properties == expectedProperties);
 
   END_TEST;
+}
+
+int UtcDaliToolkitTextLabelSetSpannedText_CharacterSpacingSpan(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline("UtcDaliToolkitTextLabelSetSpannedText_CharacterSpacingSpan");
+
+  TextLabel textLabel = TextLabel::New();
+  DALI_TEST_CHECK(textLabel);
+  application.GetScene().Add(textLabel);
+
+  Text::SpannableString spannableString = CreateSpannableStringForCharacterSpacing();
+  Text::SetSpannedText(textLabel, spannableString);
+
+  application.SendNotification();
+  application.Render();
+
+  Toolkit::Internal::TextLabel& labelImpl   = GetImpl(textLabel);
+  const Vector<Dali::Toolkit::Text::CharacterSpacingGlyphRun> characterSpacing = labelImpl.GetTextController()->GetTextModel()->GetCharacterSpacingGlyphRuns();
+  DALI_TEST_EQUALS(1, characterSpacing.Count(), TEST_LOCATION);
+  END_TEST;
 }
\ No newline at end of file
index 5914024..4d94c20 100755 (executable)
@@ -42,6 +42,7 @@ SET(TC_SOURCES
   utc-Dali-TableView.cpp
   utc-Dali-Text-BaseSpan.cpp
   utc-Dali-Text-ForegroundColorSpan.cpp
+  utc-Dali-Text-CharacterSpacingSpan.cpp
   utc-Dali-Text-FontSpan.cpp
   utc-Dali-Text-Range.cpp
   utc-Dali-Text-SpannableString.cpp
diff --git a/automated-tests/src/dali-toolkit/utc-Dali-Text-CharacterSpacingSpan.cpp b/automated-tests/src/dali-toolkit/utc-Dali-Text-CharacterSpacingSpan.cpp
new file mode 100644 (file)
index 0000000..2b34c3b
--- /dev/null
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2022 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+
+#include <dali-toolkit-test-suite-utils.h>
+#include <dali-toolkit/dali-toolkit.h>
+#include <dali-toolkit/devel-api/text/spans/character-spacing-span.h>
+
+using namespace Dali;
+using namespace Toolkit;
+
+int UtcDaliToolkitCharacterSpacingSpanNew(void)
+{
+    ToolkitTestApplication application;
+    tet_infoline("UtcDaliToolkitCharacterSpacingSpanNew");
+
+    auto charSpacingSpan = Text::CharacterSpacingSpan::New(5.6f);
+    DALI_TEST_CHECK(charSpacingSpan);
+
+    END_TEST;
+}
+
+int UtcDaliToolkitGetCharacterSpacingSpan(void)
+{
+    ToolkitTestApplication application;
+    tet_infoline("UtcDaliToolkitCharacterSpacingSpanNew");
+
+    auto charSpacingSpan = Text::CharacterSpacingSpan::New(9.1f);
+    DALI_TEST_CHECK(charSpacingSpan);
+    DALI_TEST_EQUALS(9.1f, charSpacingSpan.GetCharacterSpacing(), TEST_LOCATION);
+
+    END_TEST;
+}
+
+int UtcDaliToolkitCharacterSpacingSpanDownCast(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline("UtcDaliToolkitCharacterSpacingSpanDownCast");
+
+  Text::BaseSpan baseSpan = Text::CharacterSpacingSpan::New(3.6f);
+  DALI_TEST_CHECK(baseSpan);
+
+  Text::CharacterSpacingSpan charSpacingSpan = Text::CharacterSpacingSpan::DownCast(baseSpan);
+  DALI_TEST_CHECK(charSpacingSpan);
+
+  END_TEST;
+}
+
+int UtcDaliToolkitIsCharacterSpacingDefined(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline("UtcDaliToolkitIsCharacterSpacingDefined");
+
+  auto charSpacingSpan = Text::CharacterSpacingSpan::New(4.2f);
+  DALI_TEST_CHECK(charSpacingSpan);
+  DALI_TEST_EQUALS(true, charSpacingSpan.IsCharacterSpacingDefined(), TEST_LOCATION);
+
+  END_TEST;
+}
index 54cb62e..f35aae5 100755 (executable)
@@ -68,6 +68,7 @@ SET( devel_api_src_files
   ${devel_api_src_dir}/text/spannable-string.cpp
   ${devel_api_src_dir}/text/spans/base-span.cpp
   ${devel_api_src_dir}/text/spans/foreground-color-span.cpp
+  ${devel_api_src_dir}/text/spans/character-spacing-span.cpp
   ${devel_api_src_dir}/text/spans/font-span.cpp
   ${devel_api_src_dir}/text/spans/underline-span.cpp
   ${devel_api_src_dir}/transition-effects/cube-transition-cross-effect.cpp
@@ -251,6 +252,7 @@ SET( devel_api_text_header_files
   ${devel_api_src_dir}/text/spannable-string.h
   ${devel_api_src_dir}/text/spans/base-span.h
   ${devel_api_src_dir}/text/spans/foreground-color-span.h
+  ${devel_api_src_dir}/text/spans/character-spacing-span.h
   ${devel_api_src_dir}/text/spans/font-span.h
   ${devel_api_src_dir}/text/spans/underline-span.h
 )
diff --git a/dali-toolkit/devel-api/text/spans/character-spacing-span.cpp b/dali-toolkit/devel-api/text/spans/character-spacing-span.cpp
new file mode 100644 (file)
index 0000000..2383140
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2022 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// CLASS HEADER
+#include <dali-toolkit/devel-api/text/spans/character-spacing-span.h>
+
+// INTERNAL INCLUDES
+#include <dali-toolkit/internal/text/spannable/spans/character-spacing-span-impl.h>
+
+namespace Dali
+{
+namespace Toolkit
+{
+namespace Text
+{
+CharacterSpacingSpan CharacterSpacingSpan::New(const float value)
+{
+  return Internal::CharacterSpacingSpan::New(value);
+}
+
+CharacterSpacingSpan::CharacterSpacingSpan(Internal::CharacterSpacingSpan* internal)
+: BaseSpan(internal)
+{
+}
+
+CharacterSpacingSpan::CharacterSpacingSpan() = default;
+
+CharacterSpacingSpan::CharacterSpacingSpan(const CharacterSpacingSpan& rhs) = default;
+
+CharacterSpacingSpan::CharacterSpacingSpan(CharacterSpacingSpan&& rhs) = default;
+
+CharacterSpacingSpan& CharacterSpacingSpan::operator=(const CharacterSpacingSpan& rhs) = default;
+
+CharacterSpacingSpan& CharacterSpacingSpan::operator=(CharacterSpacingSpan&& rhs) = default;
+
+CharacterSpacingSpan::~CharacterSpacingSpan() = default;
+
+//Methods
+const float CharacterSpacingSpan::GetCharacterSpacing() const
+{
+  return GetImplementation(*this).GetCharacterSpacing();
+}
+
+bool CharacterSpacingSpan::IsCharacterSpacingDefined() const
+{
+  return GetImplementation(*this).IsCharacterSpacingDefined();
+}
+
+CharacterSpacingSpan CharacterSpacingSpan::DownCast(BaseHandle handle)
+{
+  return CharacterSpacingSpan(dynamic_cast<Dali::Toolkit::Text::Internal::CharacterSpacingSpan*>(handle.GetObjectPtr()));
+}
+
+} // namespace Text
+
+} // namespace Toolkit
+
+} // namespace Dali
diff --git a/dali-toolkit/devel-api/text/spans/character-spacing-span.h b/dali-toolkit/devel-api/text/spans/character-spacing-span.h
new file mode 100644 (file)
index 0000000..8d59b3f
--- /dev/null
@@ -0,0 +1,129 @@
+#ifndef DALI_TOOLKIT_TEXT_CHARACTER_SPACING_SPAN_H
+#define DALI_TOOLKIT_TEXT_CHARACTER_SPACING_SPAN_H
+
+/*
+ * Copyright (c) 2022 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// INTERNAL INCLUDES
+#include <dali-toolkit/devel-api/text/spans/base-span.h>
+
+namespace Dali
+{
+namespace Toolkit
+{
+namespace Text
+{
+namespace Internal DALI_INTERNAL
+{
+class CharacterSpacingSpan;
+}
+
+/**
+ * @brief CharacterSpacingSpan is a handle to an object that specifies the CharacterSpacing for range of characters.
+ */
+class DALI_TOOLKIT_API CharacterSpacingSpan : public BaseSpan
+{
+public:
+  /**
+   * @brief Create an initialized CharacterSpacingSpan.
+   *
+   * @param[in] value The CharacterSpacing value.
+   *
+   * @return A handle to a newly allocated Dali resource
+   */
+  static CharacterSpacingSpan New(const float value);
+
+  /**
+   * @brief Creates an uninitialized CharacterSpacingSpan handle.
+   *
+   * Calling member functions with an uninitialized CharacterSpacingSpan handle is not allowed.
+   */
+  CharacterSpacingSpan();
+
+  /**
+   * @brief Copy constructor.
+   * @param[in] rhs A reference to the copied handle
+   */
+  CharacterSpacingSpan(const CharacterSpacingSpan& rhs);
+
+  /**
+   * @brief Move constructor.
+   * @param[in] rhs A reference to the handle to move
+   */
+  CharacterSpacingSpan(CharacterSpacingSpan&& rhs);
+
+  /**
+   * @brief Assignment operator.
+   * @param[in] rhs A reference to the copied handle
+   * @return A reference to this
+   */
+  CharacterSpacingSpan& operator=(const CharacterSpacingSpan& rhs);
+
+  /**
+   * @brief Move assignment operator.
+   * @param[in] rhs A reference to the moved handle
+   * @return A reference to this
+   */
+  CharacterSpacingSpan& operator=(CharacterSpacingSpan&& rhs);
+
+  /**
+   * @brief Non virtual destructor.
+   */
+  ~CharacterSpacingSpan();
+
+  /**
+   * @brief Downcasts to a CharacterSpacingSpan handle.
+   * If handle is not a CharacterSpacingSpan, the returned handle is left uninitialized.
+   *
+   * @param[in] handle Handle to an object
+   * @return CharacterSpacingSpan handle or an uninitialized handle
+   */
+  static CharacterSpacingSpan DownCast(BaseHandle handle);
+
+public: //Methods
+  /**
+   * @brief Retrive the CharacterSpacing.
+   *
+   * @return A CharacterSpacing value.
+   */
+  const float GetCharacterSpacing() const;
+
+  /**
+   * @brief Retrieve whether the CharacterSpacing is defined.
+   *
+   * @return The return is true if CharacterSpacing is defined, otherwise false.
+   */
+  bool IsCharacterSpacingDefined() const;
+
+public: // Not intended for application developers
+  /// @cond internal
+  /**
+   * @brief This constructor is used internally to Create an initialized CharacterSpacingSpan handle.
+   *
+   * @param[in] charSpacingSpan Pointer to internal CharacterSpacingSpan
+   */
+  explicit DALI_INTERNAL CharacterSpacingSpan(Internal::CharacterSpacingSpan* charSpacingSpan);
+  /// @endcond
+};
+
+} // namespace Text
+
+} // namespace Toolkit
+
+} // namespace Dali
+
+#endif // DALI_TOOLKIT_TEXT_CHARACTER_SPACING_SPAN_H
index 0ffdbfc..a3f162d 100644 (file)
@@ -162,6 +162,7 @@ SET( toolkit_src_files
    ${toolkit_src_dir}/text/spannable/spannable-string-impl.cpp
    ${toolkit_src_dir}/text/spannable/spans/base-span-impl.cpp
    ${toolkit_src_dir}/text/spannable/spans/foreground-color-span-impl.cpp
+   ${toolkit_src_dir}/text/spannable/spans/character-spacing-span-impl.cpp
    ${toolkit_src_dir}/text/spannable/spans/font-span-impl.cpp
    ${toolkit_src_dir}/text/spannable/spans/underline-span-impl.cpp
    ${toolkit_src_dir}/text/spannable/span-ranges-container-impl.cpp
index d29ac70..cb21ed9 100644 (file)
@@ -583,7 +583,8 @@ bool ControllerImplModelUpdater::Update(Controller::Impl& impl, OperationsMask o
   {
     //Mark-up processor case
     if(impl.mModel->mVisualModel->IsMarkupProcessorEnabled() ||
-       impl.mModel->mLogicalModel->mUnderlineRunsUpdated)
+       impl.mModel->mLogicalModel->mUnderlineRunsUpdated ||
+       impl.mModel->mLogicalModel->mCharacterSpacingRunsUpdated)
     {
       impl.CopyUnderlinedFromLogicalToVisualModels(true);
       impl.CopyStrikethroughFromLogicalToVisualModels();
index 46d9263..614a754 100644 (file)
@@ -1790,6 +1790,7 @@ void Controller::Impl::CopyCharacterSpacingFromLogicalToVisualModels()
 
     mModel->mVisualModel->mCharacterSpacingRuns.PushBack(characterSpacingGlyphRun);
   }
+  mModel->mLogicalModel->mCharacterSpacingRunsUpdated = false;
 }
 
 void Controller::Impl::SetAutoScrollEnabled(bool enable)
index 123d8ea..fc50ac4 100644 (file)
@@ -660,7 +660,8 @@ LogicalModel::~LogicalModel()
 LogicalModel::LogicalModel()
 : mBidirectionalLineIndex(0u),
   mSpannedTextPlaced(false),
-  mUnderlineRunsUpdated(false)
+  mUnderlineRunsUpdated(false),
+  mCharacterSpacingRunsUpdated(false)
 {
 }
 
index 546e308..1c18010 100644 (file)
@@ -265,6 +265,7 @@ public:
   bool                      mSpannedTextPlaced : 1;  ///< Whether the spanned-text is placed.
 
   bool mUnderlineRunsUpdated : 1; /// Whether the UnderlinedCharacterRuns is updated. (Added for SpannedText)
+  bool mCharacterSpacingRunsUpdated : 1; // Flag for updating character-spacing.
 };
 
 } // namespace Text
diff --git a/dali-toolkit/internal/text/spannable/spans/character-spacing-span-impl.cpp b/dali-toolkit/internal/text/spannable/spans/character-spacing-span-impl.cpp
new file mode 100644 (file)
index 0000000..89ea379
--- /dev/null
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2022 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// CLASS HEADER
+#include <dali-toolkit/internal/text/spannable/spans/character-spacing-span-impl.h>
+
+// INTERNAL INCLUDES
+#include <dali-toolkit/internal/text/color-run.h>
+#include <dali-toolkit/internal/text/markup-tags-and-attributes.h>
+
+namespace Dali
+{
+namespace Toolkit
+{
+namespace Text
+{
+namespace Internal
+{
+struct CharacterSpacingSpan::Impl
+{
+  float mCharacterSpacing;            ///< The character-spacing-value.
+  bool  mCharacterSpacingDefined : 1; ///< Whether the character-spacing-value is defined.
+};
+
+CharacterSpacingSpan::CharacterSpacingSpan()
+: BaseSpan()
+{
+  mImpl = std::make_unique<Impl>();
+}
+
+CharacterSpacingSpan ::~CharacterSpacingSpan()
+{
+}
+
+Dali::Toolkit::Text::CharacterSpacingSpan CharacterSpacingSpan::New(const float& value)
+{
+  CharacterSpacingSpanPtr object = new CharacterSpacingSpan();
+  object->SetCharacterSpacing(value);
+
+  Dali::Toolkit::Text::CharacterSpacingSpan handle = Dali::Toolkit::Text::CharacterSpacingSpan(object.Get());
+
+  return handle;
+}
+
+//Methods
+const float CharacterSpacingSpan::GetCharacterSpacing() const
+{
+  return mImpl->mCharacterSpacing;
+}
+
+bool CharacterSpacingSpan::IsCharacterSpacingDefined() const
+{
+  return mImpl->mCharacterSpacingDefined;
+}
+
+void CharacterSpacingSpan::SetCharacterSpacing(const float& value)
+{
+  mImpl->mCharacterSpacing        = value;
+  mImpl->mCharacterSpacingDefined = true;
+}
+
+void CharacterSpacingSpan::CreateStyleCharacterRun(IntrusivePtr<LogicalModel>& logicalModel, const Dali::Toolkit::Text::Range& range) const
+{
+  CharacterSpacingCharacterRun characterSpacingCharacterRun;
+  characterSpacingCharacterRun.characterRun.characterIndex     = range.GetStartIndex();
+  characterSpacingCharacterRun.characterRun.numberOfCharacters = range.GetNumberOfIndices();
+  characterSpacingCharacterRun.value                           = mImpl->mCharacterSpacing;
+  logicalModel->mCharacterSpacingCharacterRuns.PushBack(characterSpacingCharacterRun);
+  logicalModel->mCharacterSpacingRunsUpdated = true;
+}
+
+} // namespace Internal
+
+} // namespace Text
+
+} // namespace Toolkit
+
+} // namespace Dali
diff --git a/dali-toolkit/internal/text/spannable/spans/character-spacing-span-impl.h b/dali-toolkit/internal/text/spannable/spans/character-spacing-span-impl.h
new file mode 100644 (file)
index 0000000..4aa8adc
--- /dev/null
@@ -0,0 +1,128 @@
+#ifndef DALI_TOOLKIT_INTERNAL_TEXT_CHARACTER_SPACING_SPAN_IMPL_H
+#define DALI_TOOLKIT_INTERNAL_TEXT_CHARACTER_SPACING_SPAN_IMPL_H
+
+/*
+ * Copyright (c) 2022 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// EXTERNAL INCLUDES
+#include <dali-toolkit/devel-api/text/spans/character-spacing-span.h>
+#include <memory>
+
+// INTERNAL INCLUDES
+#include <dali-toolkit/internal/text/logical-model-impl.h>
+#include <dali-toolkit/internal/text/spannable/spans/base-span-impl.h>
+#include <dali/public-api/math/vector4.h>
+
+namespace Dali
+{
+namespace Toolkit
+{
+namespace Text
+{
+namespace Internal
+{
+class CharacterSpacingSpan;
+using CharacterSpacingSpanPtr = IntrusivePtr<CharacterSpacingSpan>;
+
+/**
+ * @copydoc Dali::Toolkit::Text::CharacterSpacingSpan
+ */
+class CharacterSpacingSpan : public BaseSpan
+{
+public:
+  /**
+   * @brief Creates a new CharacterSpacingSpan object.
+   */
+  static Dali::Toolkit::Text::CharacterSpacingSpan New(const float& value);
+
+  /**
+   * Default Constructor
+   */
+  CharacterSpacingSpan();
+
+  CharacterSpacingSpan(const CharacterSpacingSpan&) = delete;            ///< Deleted copy constructor
+  CharacterSpacingSpan(CharacterSpacingSpan&&)      = delete;            ///< Deleted move constructor
+  CharacterSpacingSpan& operator=(const CharacterSpacingSpan&) = delete; ///< Deleted copy assignment operator
+  CharacterSpacingSpan& operator=(CharacterSpacingSpan&&) = delete;      ///< Deleted move assignment operator
+
+  /**
+   * @brief Destructor
+   *
+   * A reference counted object may only be deleted by calling Unreference()
+   */
+  ~CharacterSpacingSpan() override;
+
+public: //Methods
+  /**
+   * @copydoc Dali::Toolkit::Text::CharacterSpacingSpan::GetCharacterSpacing()
+   */
+  const float GetCharacterSpacing() const;
+
+  /**
+   * @copydoc Dali::Toolkit::Text::CharacterSpacingSpan::IsCharacterSpacingDefined()
+   */
+  bool IsCharacterSpacingDefined() const;
+
+public: //Methods. Not intended for application developers
+  /**
+   * @brief Set the CharacterSpacing.
+   *
+   * @param[in] value The CharacterSpacing.
+   */
+  void SetCharacterSpacing(const float& value);
+
+public: //Methods for internal only
+  /**
+   * @copydoc Dali::Toolkit::Text::BaseSpan::CreateStyleCharacterRun
+   */
+  void CreateStyleCharacterRun(IntrusivePtr<LogicalModel>& logicalModel, const Dali::Toolkit::Text::Range& range) const override;
+
+private:
+  struct Impl;
+  std::unique_ptr<Impl> mImpl{nullptr};
+
+}; // class CharacterSpacingSpan
+
+} // namespace Internal
+
+// Helpers for public-api forwarding methods
+
+inline Internal::CharacterSpacingSpan& GetImplementation(Dali::Toolkit::Text::CharacterSpacingSpan& characterSpacingSpan)
+{
+  DALI_ASSERT_ALWAYS(characterSpacingSpan && "CharacterSpacingSpan handle is empty");
+
+  BaseObject& object = characterSpacingSpan.GetBaseObject();
+
+  return static_cast<Internal::CharacterSpacingSpan&>(object);
+}
+
+inline const Internal::CharacterSpacingSpan& GetImplementation(const Dali::Toolkit::Text::CharacterSpacingSpan& CharacterSpacingSpan)
+{
+  DALI_ASSERT_ALWAYS(CharacterSpacingSpan && "CharacterSpacingSpan handle is empty");
+
+  const BaseObject& object = CharacterSpacingSpan.GetBaseObject();
+
+  return static_cast<const Internal::CharacterSpacingSpan&>(object);
+}
+
+} // namespace Text
+
+} // namespace Toolkit
+
+} // namespace Dali
+
+#endif // DALI_TOOLKIT_INTERNAL_TEXT_CHARACTER_SPACING_SPAN_IMPL_H
\ No newline at end of file