From 71c26e615b4f468176b9369cd7ff07d6ca697a1c Mon Sep 17 00:00:00 2001 From: Victor Cebollada Date: Wed, 4 Feb 2015 09:38:42 +0000 Subject: [PATCH] FontClient interface amendments Change-Id: Ia1f69235efc08f27deffdb2990f9d8f829165c7a Signed-off-by: Victor Cebollada --- .../text-abstraction/bidirectional-support-impl.h | 3 +- .../internal/text-abstraction/font-client-impl.cpp | 55 ++++++++++++++----- .../internal/text-abstraction/font-client-impl.h | 25 ++++++--- .../text-abstraction/segmentation-impl.cpp | 4 +- .../internal/text-abstraction/segmentation-impl.h | 2 +- text/dali/internal/text-abstraction/shaping-impl.h | 2 +- .../text-abstraction/bidirectional-support.h | 2 +- .../public-api/text-abstraction/font-client.cpp | 26 +++++++-- .../dali/public-api/text-abstraction/font-client.h | 58 +++++++++++++++----- text/dali/public-api/text-abstraction/script.h | 61 ++++++++++++++++++++++ .../public-api/text-abstraction/segmentation.h | 2 +- text/dali/public-api/text-abstraction/shaping.h | 9 ++-- .../text-abstraction-definitions.h | 27 ---------- .../public-api/text-abstraction/text-abstraction.h | 4 +- text/file.list | 7 +-- 15 files changed, 209 insertions(+), 78 deletions(-) create mode 100644 text/dali/public-api/text-abstraction/script.h diff --git a/text/dali/internal/text-abstraction/bidirectional-support-impl.h b/text/dali/internal/text-abstraction/bidirectional-support-impl.h index e207d1d..1d1694a 100644 --- a/text/dali/internal/text-abstraction/bidirectional-support-impl.h +++ b/text/dali/internal/text-abstraction/bidirectional-support-impl.h @@ -19,6 +19,7 @@ */ // EXTERNAL INCLUDES +#include #include // INTERNAL INCLUDES @@ -36,7 +37,7 @@ namespace Internal /** * Implementation of the BidirectionalSupport */ -class BidirectionalSupport : public Dali::BaseObject +class BidirectionalSupport : public BaseObject { public: diff --git a/text/dali/internal/text-abstraction/font-client-impl.cpp b/text/dali/internal/text-abstraction/font-client-impl.cpp index bdd0f9e..cac4ed5 100644 --- a/text/dali/internal/text-abstraction/font-client-impl.cpp +++ b/text/dali/internal/text-abstraction/font-client-impl.cpp @@ -182,11 +182,20 @@ struct FontClient::Plugin return false; } - bool FindSystemFont( Character charcode, FontDescription& systemFont ) + void GetDescription( FontId id, FontDescription& fontDescription ) const { - // TODO - Use FcCharSetHasChar() + // TODO + } - return false; + PointSize26Dot6 GetPointSize( FontId id ) + { + return 12*64; + } + + FontId FindDefaultFont( Character charcode, PointSize26Dot6 pointSize ) + { + // TODO - Use FcCharSetHasChar() + return FontId(0); } FontId GetFontId( const std::string& path, PointSize26Dot6 pointSize, FaceIndex faceIndex ) @@ -209,6 +218,14 @@ struct FontClient::Plugin return id; } + FontId GetFontId( const FontFamily& fontFamily, + const FontStyle& fontStyle, + PointSize26Dot6 pointSize, + FaceIndex faceIndex ) + { + return 0u; + } + GlyphIndex GetGlyphIndex( FontId fontId, Character charcode ) { GlyphIndex index( 0 ); @@ -268,12 +285,6 @@ struct FontClient::Plugin return id; } - FontId FindDefaultFont( Character charcode ) - { - // TODO - Return cached results based on script - return FontId(0); - } - void GetFontMetrics( FontId fontId, FontMetrics& metrics ) { if( fontId > 0 && @@ -479,6 +490,18 @@ void FontClient::SetDpi( unsigned int horizontalDpi, unsigned int verticalDpi ) } } +void FontClient::GetDescription( FontId id, FontDescription& fontDescription ) +{ + CreatePlugin(); +} + +PointSize26Dot6 FontClient::GetPointSize( FontId id ) +{ + CreatePlugin(); + + return mPlugin->GetPointSize( id ); +} + void FontClient::GetSystemFonts( FontList& systemFonts ) { CreatePlugin(); @@ -486,11 +509,11 @@ void FontClient::GetSystemFonts( FontList& systemFonts ) mPlugin->GetSystemFonts( systemFonts ); } -bool FontClient::FindSystemFont( Character charcode, FontDescription& systemFont ) +FontId FontClient::FindDefaultFont( Character charcode, PointSize26Dot6 pointSize ) { CreatePlugin(); - return mPlugin->FindSystemFont( charcode, systemFont ); + return mPlugin->FindDefaultFont( charcode, pointSize ); } FontId FontClient::GetFontId( const FontPath& path, PointSize26Dot6 pointSize, FaceIndex faceIndex ) @@ -500,11 +523,17 @@ FontId FontClient::GetFontId( const FontPath& path, PointSize26Dot6 pointSize, F return mPlugin->GetFontId( path, pointSize, faceIndex ); } -FontId FontClient::FindDefaultFont( Character charcode ) +FontId FontClient::GetFontId( const FontFamily& fontFamily, + const FontStyle& fontStyle, + PointSize26Dot6 pointSize, + FaceIndex faceIndex ) { CreatePlugin(); - return mPlugin->FindDefaultFont( charcode ); + return mPlugin->GetFontId( fontFamily, + fontStyle, + pointSize, + faceIndex ); } void FontClient::GetFontMetrics( FontId fontId, FontMetrics& metrics ) diff --git a/text/dali/internal/text-abstraction/font-client-impl.h b/text/dali/internal/text-abstraction/font-client-impl.h index 7a758f3..be42c01 100644 --- a/text/dali/internal/text-abstraction/font-client-impl.h +++ b/text/dali/internal/text-abstraction/font-client-impl.h @@ -36,7 +36,7 @@ namespace Internal /** * Implementation of the FontClient */ -class FontClient : public Dali::BaseObject +class FontClient : public BaseObject { public: @@ -66,19 +66,32 @@ public: void GetSystemFonts( FontList& systemFonts ); /** - * @copydoc Dali::FontClient::FindSystemFont() + * @copydoc Dali::FontClient::GetDescription() */ - bool FindSystemFont( Character charcode, FontDescription& systemFont ); + void GetDescription( FontId id, FontDescription& fontDescription ); /** - * @copydoc Dali::FontClient::GetFontId() + * @copydoc Dali::FontClient::GetPointSize() */ - FontId GetFontId( const FontPath& path, PointSize26Dot6 pointSize, FaceIndex faceIndex ); + PointSize26Dot6 GetPointSize( FontId id ); /** * @copydoc Dali::FontClient::FindDefaultFont() */ - FontId FindDefaultFont( Character charcode ); + FontId FindDefaultFont( Character charcode, PointSize26Dot6 pointSize ); + + /** + * @copydoc Dali::FontClient::GetFontId( const FontPath& path, PointSize26Dot6 pointSize, FaceIndex faceIndex ) + */ + FontId GetFontId( const FontPath& path, PointSize26Dot6 pointSize, FaceIndex faceIndex ); + + /** + * @copydoc Dali::FontClient::GetFontId(const FontFamily& fontFamily, const FontStyle& fontStyle, PointSize26Dot6 pointSize, FaceIndex faceIndex ) + */ + FontId GetFontId( const FontFamily& fontFamily, + const FontStyle& fontStyle, + PointSize26Dot6 pointSize, + FaceIndex faceIndex ); /** * @copydoc Dali::FontClient::GetFontMetrics() diff --git a/text/dali/internal/text-abstraction/segmentation-impl.cpp b/text/dali/internal/text-abstraction/segmentation-impl.cpp index 2e59013..aca86d5 100644 --- a/text/dali/internal/text-abstraction/segmentation-impl.cpp +++ b/text/dali/internal/text-abstraction/segmentation-impl.cpp @@ -62,12 +62,12 @@ TextAbstraction::Segmentation Segmentation::Get() } else // create and register the object { - segmentationHandle = TextAbstraction::Segmentation( new Segmentation); + segmentationHandle = TextAbstraction::Segmentation( new Segmentation ); service.Register( typeid( segmentationHandle ), segmentationHandle ); } } - return segmentationHandle; + return segmentationHandle; } void Segmentation::GetLineBreakPositions( const Character* const text, diff --git a/text/dali/internal/text-abstraction/segmentation-impl.h b/text/dali/internal/text-abstraction/segmentation-impl.h index de1fb32..143978b 100644 --- a/text/dali/internal/text-abstraction/segmentation-impl.h +++ b/text/dali/internal/text-abstraction/segmentation-impl.h @@ -37,7 +37,7 @@ namespace Internal * Implementation of the Segmentation */ -class Segmentation : public Dali::BaseObject +class Segmentation : public BaseObject { public: diff --git a/text/dali/internal/text-abstraction/shaping-impl.h b/text/dali/internal/text-abstraction/shaping-impl.h index 575600f..04c347b 100644 --- a/text/dali/internal/text-abstraction/shaping-impl.h +++ b/text/dali/internal/text-abstraction/shaping-impl.h @@ -36,7 +36,7 @@ namespace Internal /** * Implementation of the Shaping */ -class Shaping : public Dali::BaseObject +class Shaping : public BaseObject { public: diff --git a/text/dali/public-api/text-abstraction/bidirectional-support.h b/text/dali/public-api/text-abstraction/bidirectional-support.h index d05af44..f18a9c7 100644 --- a/text/dali/public-api/text-abstraction/bidirectional-support.h +++ b/text/dali/public-api/text-abstraction/bidirectional-support.h @@ -19,7 +19,7 @@ */ // INTERNAL INCLUDES -#include +#include // EXTERNAL INCLUDES #include diff --git a/text/dali/public-api/text-abstraction/font-client.cpp b/text/dali/public-api/text-abstraction/font-client.cpp index 49e3181..027dbc5 100644 --- a/text/dali/public-api/text-abstraction/font-client.cpp +++ b/text/dali/public-api/text-abstraction/font-client.cpp @@ -27,6 +27,8 @@ namespace Dali namespace TextAbstraction { +const PointSize26Dot6 FontClient::DEFAULT_POINT_SIZE = 768u; // 12*64 + FontClient FontClient::Get() { return Internal::FontClient::Get(); @@ -61,9 +63,19 @@ void FontClient::GetSystemFonts( FontList& systemFonts ) GetImplementation(*this).GetSystemFonts( systemFonts ); } -bool FontClient::FindSystemFont( Character charcode, FontDescription& systemFont ) +void FontClient::GetDescription( FontId id, FontDescription& fontDescription ) +{ + GetImplementation(*this).GetDescription( id, fontDescription ); +} + +PointSize26Dot6 FontClient::GetPointSize( FontId id ) +{ + return GetImplementation(*this).GetPointSize( id ); +} + +FontId FontClient::FindDefaultFont( Character charcode, PointSize26Dot6 pointSize ) { - return GetImplementation(*this).FindSystemFont( charcode, systemFont ); + return GetImplementation(*this).FindDefaultFont( charcode, pointSize ); } FontId FontClient::GetFontId( const FontPath& path, PointSize26Dot6 pointSize, FaceIndex faceIndex ) @@ -71,9 +83,15 @@ FontId FontClient::GetFontId( const FontPath& path, PointSize26Dot6 pointSize, F return GetImplementation(*this).GetFontId( path, pointSize, faceIndex ); } -FontId FontClient::FindDefaultFont( Character charcode ) +FontId FontClient::GetFontId( const FontFamily& fontFamily, + const FontStyle& fontStyle, + PointSize26Dot6 pointSize, + FaceIndex faceIndex ) { - return GetImplementation(*this).FindDefaultFont( charcode ); + return GetImplementation(*this).GetFontId( fontFamily, + fontStyle, + pointSize, + faceIndex ); } void FontClient::GetFontMetrics( FontId fontId, FontMetrics& metrics ) diff --git a/text/dali/public-api/text-abstraction/font-client.h b/text/dali/public-api/text-abstraction/font-client.h index 4094a2b..4b17804 100644 --- a/text/dali/public-api/text-abstraction/font-client.h +++ b/text/dali/public-api/text-abstraction/font-client.h @@ -18,10 +18,9 @@ * */ +// INTERNAL INCLUDES #include #include -#include -#include #include #include #include @@ -59,6 +58,9 @@ class FontClient; class DALI_IMPORT_API FontClient : public BaseHandle { public: + static const PointSize26Dot6 DEFAULT_POINT_SIZE; ///< The default point size. + +public: /** * @brief Retrieve a handle to the FontClient instance. @@ -94,6 +96,10 @@ public: */ FontClient& operator=( const FontClient& handle ); + //////////////////////////////////////// + // Font management and validation. + //////////////////////////////////////// + /** * @brief Set the DPI of the target window. * @@ -111,15 +117,33 @@ public: void GetSystemFonts( FontList& systemFonts ); /** - * @brief Find an appropriate system-font for displaying a UTF-32 character. + * @brief Retrieves the font description of a given font @p id. + * + * @param[in] id The font id. + * @param[out] fontDescription The path, family & style describing the font. + */ + void GetDescription( FontId id, FontDescription& fontDescription ); + + /** + * @brief Retrieves the font point size of a given font @p id. + * + * @param[in] id The font id. + * + * @return The point size in 26.6 fractional points. + */ + PointSize26Dot6 GetPointSize( FontId id ); + + /** + * @brief Find an appropriate font for displaying a UTF-32 character. * * This is useful when localised strings are provided for multiple languages * i.e. when a single default font does not work for all languages. * @param[in] charcode The character for which a font is needed. - * @param[out] systemFont The path, family & style describing the font. - * @return True if an appropriate system font was found. + * @param[in] pointSize The point size in 26.6 fractional points; the default point size is 12*64. + * @return A valid font ID, or zero if the font does not exist. */ - bool FindSystemFont( Character charcode, FontDescription& systemFont ); + FontId FindDefaultFont( Character charcode, + PointSize26Dot6 pointSize = DEFAULT_POINT_SIZE ); /** * @brief Retrieve the unique identifier for a font. @@ -129,17 +153,25 @@ public: * @param[in] faceIndex The index of the font face (optional). * @return A valid font ID, or zero if the font does not exist. */ - FontId GetFontId( const FontPath& path, PointSize26Dot6 pointSize = 12*64, FaceIndex faceIndex = 0 ); + FontId GetFontId( const FontPath& path, PointSize26Dot6 pointSize = DEFAULT_POINT_SIZE, FaceIndex faceIndex = 0 ); /** - * @brief Retrieve the ID of the default font for displaying a UTF-32 character. + * @brief Retrieve the unique identifier for a font. * - * This is useful when localised strings are provided for multiple languages - * i.e. when a single default font does not work for all languages. - * @param[in] charcode The character for which a font is needed. - * @return A valid font ID, or zero if no appropriate font was found. + * @param[in] fontFamily The font family name. + * @param[in] fontStyle The font style. + * @param[in] pointSize The point size in 26.6 fractional points; the default point size is 12*64. + * @param[in] faceIndex The index of the font face (optional). + * @return A valid font ID, or zero if the font does not exist. */ - FontId FindDefaultFont( Character charcode ); + FontId GetFontId( const FontFamily& fontFamily, + const FontStyle& fontStyle, + PointSize26Dot6 pointSize = DEFAULT_POINT_SIZE, + FaceIndex faceIndex = 0 ); + + //////////////////////////////////////// + // Font metrics, glyphs and bitmaps. + //////////////////////////////////////// /** * @brief Query the metrics for a font. diff --git a/text/dali/public-api/text-abstraction/script.h b/text/dali/public-api/text-abstraction/script.h new file mode 100644 index 0000000..e2a3b1f --- /dev/null +++ b/text/dali/public-api/text-abstraction/script.h @@ -0,0 +1,61 @@ +#ifndef __DALI_TOOLKIT_TEXT_ABSTRACTION_SCRIPT_H__ +#define __DALI_TOOLKIT_TEXT_ABSTRACTION_SCRIPT_H__ + +/* + * Copyright (c) 2015 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 + +namespace Dali +{ + +namespace TextAbstraction +{ + +/** + * @brief Script is the writing system used by a language. + * Typically one script can be used to write different languages although one language could be written in different scrips. + */ +enum Script +{ + LATIN, ///< The latin script. Used by many western languages and others around the world. + ARABIC, ///< The arabic script. Used by Arab and Urdu among others. + DEVANAGARI, ///< The devanagari script. Used by Hindi, Marathi, Sindhi, Nepali and Sanskrit. + BENGALI, ///< The Bengali script. Used by Bangla, Assamese, Bishnupriya Manipuri, Daphla, Garo, Hallam, Khasi, Mizo, Munda, Naga, Rian, and Santali. + GURMUKHI, ///< The Gurmukhi script. Used by Punjabi. + GUJARATI, ///< The Gujarati script. Used by Gujarati. + ORIYA, ///< The Oriya script. Used by Oriya (Odia), Khondi, and Santali. + TAMIL, ///< The Tamil script. Used by Tamil, Badaga, and Saurashtra. + TELUGU, ///< The Telugu script. Used by Telugu, Gondi, and Lambadi. + KANNADA, ///< The Kannada script. Used by Kannada and Tulu. + MALAYALAM, ///< The Malayalam script. Used by Malayalam. + SINHALA, ///< The Sinhala script. Used by Sinhala and Pali. + CJK, ///< The CJK script. Used by Chinese, Japanese, Korean and Vietnamese(old writing system). + HANGUL, ///< The Hangul jamo script. Used by Korean. + KHMER, ///< The Khmer script. Used by the Khmer language. + LAO, ///< The Lao script. Used by the Lao language. + THAI, ///< The Thai script. Used by the Thai language + BURMESE, ///< The Burmese script. Used by the Burmese (Myanmar) language. + UNKNOWN ///< The script is unknown. +}; + +} // namespace TextAbstraction + +} // namespace Dali + +#endif // __DALI_TOOLKIT_TEXT_ABSTRACTION_SCRIPT_H__ diff --git a/text/dali/public-api/text-abstraction/segmentation.h b/text/dali/public-api/text-abstraction/segmentation.h index 63d5107..746e155 100644 --- a/text/dali/public-api/text-abstraction/segmentation.h +++ b/text/dali/public-api/text-abstraction/segmentation.h @@ -19,7 +19,7 @@ */ // INTERNAL INCLUDES -#include +#include // EXTERNAL INCLUDES #include diff --git a/text/dali/public-api/text-abstraction/shaping.h b/text/dali/public-api/text-abstraction/shaping.h index 3e0570f..825dc31 100644 --- a/text/dali/public-api/text-abstraction/shaping.h +++ b/text/dali/public-api/text-abstraction/shaping.h @@ -19,7 +19,8 @@ */ // INTERNAL INCLUDES -#include +#include +#include // EXTERNAL INCLUDES #include @@ -30,6 +31,8 @@ namespace Dali namespace TextAbstraction { +struct GlyphInfo; + namespace Internal DALI_INTERNAL { @@ -63,7 +66,7 @@ class DALI_IMPORT_API Shaping : public BaseHandle public: /** - * @brief Create an uninitialized TextAbstraction handle. + * @brief Create an uninitialized Shaping handle. * */ Shaping(); @@ -85,7 +88,7 @@ public: /** * @brief Retrieve a handle to the Shaping instance. * - * @return A handle to the Shaping + * @return A handle to the Shaping. */ static Shaping Get(); diff --git a/text/dali/public-api/text-abstraction/text-abstraction-definitions.h b/text/dali/public-api/text-abstraction/text-abstraction-definitions.h index 4f39f68..b4e48ab 100644 --- a/text/dali/public-api/text-abstraction/text-abstraction-definitions.h +++ b/text/dali/public-api/text-abstraction/text-abstraction-definitions.h @@ -57,33 +57,6 @@ enum WORD_NO_BREAK = 1u, ///< Text can't be broken into a new word. }; -/* - * @brief Script is the writing system used by a language. - * Typically one script can be used to write different languages although one language could be written in different scrips. - */ -enum Script -{ - LATIN, ///< The latin script. Used by many western languages and others around the world. - ARABIC, ///< The arabic script. Used by Arab and Urdu among others. - DEVANAGARI, ///< The devanagari script. Used by Hindi, Marathi, Sindhi, Nepali and Sanskrit. - BENGALI, ///< The Bengali script. Used by Bangla, Assamese, Bishnupriya Manipuri, Daphla, Garo, Hallam, Khasi, Mizo, Munda, Naga, Rian, and Santali. - GURMUKHI, ///< The Gurmukhi script. Used by Punjabi. - GUJARATI, ///< The Gujarati script. Used by Gujarati. - ORIYA, ///< The Oriya script. Used by Oriya (Odia), Khondi, and Santali. - TAMIL, ///< The Tamil script. Used by Tamil, Badaga, and Saurashtra. - TELUGU, ///< The Telugu script. Used by Telugu, Gondi, and Lambadi. - KANNADA, ///< The Kannada script. Used by Kannada and Tulu. - MALAYALAM, ///< The Malayalam script. Used by Malayalam. - SINHALA, ///< The Sinhala script. Used by Sinhala and Pali. - CJK, ///< The CJK script. Used by Chinese, Japanese, Korean and Vietnamese(old writing system). - HANGUL, ///< The Hangul jamo script. Used by Korean. - KHMER, ///< The Khmer script. Used by the Khmer language. - LAO, ///< The Lao script. Used by the Lao language. - THAI, ///< The Thai script. Used by the Thai language - BURMESE, ///< The Burmese script. Used by the Burmese (Myanmar) language. - UNKNOWN ///< The script is unknown. -}; - } // namespace TextAbstraction } // namespace Dali diff --git a/text/dali/public-api/text-abstraction/text-abstraction.h b/text/dali/public-api/text-abstraction/text-abstraction.h index 4696bb0..470e176 100644 --- a/text/dali/public-api/text-abstraction/text-abstraction.h +++ b/text/dali/public-api/text-abstraction/text-abstraction.h @@ -18,11 +18,11 @@ * */ -#include +#include #include #include #include -#include +#include #include #include diff --git a/text/file.list b/text/file.list index 443b913..874b793 100644 --- a/text/file.list +++ b/text/file.list @@ -1,24 +1,25 @@ # Add local source files here text_abstraction_src_files = \ + $(text_src_dir)/dali/public-api/text-abstraction/bidirectional-support.cpp \ $(text_src_dir)/dali/public-api/text-abstraction/font-client.cpp \ $(text_src_dir)/dali/public-api/text-abstraction/font-list.cpp \ $(text_src_dir)/dali/public-api/text-abstraction/font-metrics.cpp \ $(text_src_dir)/dali/public-api/text-abstraction/glyph-info.cpp \ - $(text_src_dir)/dali/public-api/text-abstraction/bidirectional-support.cpp \ $(text_src_dir)/dali/public-api/text-abstraction/segmentation.cpp \ $(text_src_dir)/dali/public-api/text-abstraction/shaping.cpp \ - $(text_src_dir)/dali/internal/text-abstraction/font-client-impl.cpp \ $(text_src_dir)/dali/internal/text-abstraction/bidirectional-support-impl.cpp \ + $(text_src_dir)/dali/internal/text-abstraction/font-client-impl.cpp \ $(text_src_dir)/dali/internal/text-abstraction/segmentation-impl.cpp \ $(text_src_dir)/dali/internal/text-abstraction/shaping-impl.cpp text_abstraction_header_files = \ + $(text_src_dir)/dali/public-api/text-abstraction/bidirectional-support.h \ $(text_src_dir)/dali/public-api/text-abstraction/font-client.h \ $(text_src_dir)/dali/public-api/text-abstraction/font-list.h \ $(text_src_dir)/dali/public-api/text-abstraction/font-metrics.h \ $(text_src_dir)/dali/public-api/text-abstraction/glyph-info.h \ - $(text_src_dir)/dali/public-api/text-abstraction/bidirectional-support.h \ + $(text_src_dir)/dali/public-api/text-abstraction/script.h \ $(text_src_dir)/dali/public-api/text-abstraction/segmentation.h \ $(text_src_dir)/dali/public-api/text-abstraction/shaping.h \ $(text_src_dir)/dali/public-api/text-abstraction/text-abstraction.h \ -- 2.7.4