#include <dali/public-api/object/type-registry.h>
#include <dali/integration-api/debug.h>
+// INTERNAL INCLUDES
+#include <dali-toolkit/public-api/text/layouts/layout-engine.h>
+#include <dali-toolkit/public-api/text/rendering/basic/text-basic-renderer.h> // TODO - Get from RendererFactory
+
+using Dali::Toolkit::Text::LayoutEngine;
+
namespace
{
namespace Toolkit
{
-const Property::Index TextLabel::PROPERTY_TEXT( Internal::TextLabel::TEXTLABEL_PROPERTY_START_INDEX );
+const Property::Index TextLabel::PROPERTY_TEXT( Internal::TextLabel::TEXTLABEL_PROPERTY_START_INDEX );
+const Property::Index TextLabel::PROPERTY_MULTI_LINE( Internal::TextLabel::TEXTLABEL_PROPERTY_START_INDEX + 1 );
namespace Internal
{
TypeRegistration mType( typeid(Toolkit::TextLabel), typeid(Toolkit::Control), Create );
-PropertyRegistration property1( mType, "text", Toolkit::TextLabel::PROPERTY_TEXT, Property::STRING, &TextLabel::SetProperty, &TextLabel::GetProperty );
+PropertyRegistration property1( mType, "text", Toolkit::TextLabel::PROPERTY_TEXT, Property::STRING, &TextLabel::SetProperty, &TextLabel::GetProperty );
+PropertyRegistration property2( mType, "multi-line", Toolkit::TextLabel::PROPERTY_MULTI_LINE, Property::STRING, &TextLabel::SetProperty, &TextLabel::GetProperty );
} // namespace
labelImpl.SetText( value.Get< std::string >() );
break;
}
+ case Toolkit::TextLabel::PROPERTY_MULTI_LINE:
+ {
+ labelImpl.SetMultiLine( value.Get< bool >() );
+ break;
+ }
}
}
}
mController = Text::Controller::New();
}
-void TextLabel::SetText( const std::string& text )
+void TextLabel::OnRelayout( const Vector2& size, ActorSizeContainer& container )
{
- if( mController )
+ if( mController->Relayout( size ) )
{
- // The Controller updates the View for the renderer
- mController->SetText( text );
+ if( !mRenderer )
+ {
+ // TODO - Get from RendererFactory
+ mRenderer = Dali::Toolkit::Text::BasicRenderer::New();
+ }
if( mRenderer )
{
}
}
+void TextLabel::SetText( const std::string& text )
+{
+ if( mController )
+ {
+ // The Controller updates the View for the renderer
+ mController->SetText( text );
+ }
+}
+
+void TextLabel::SetMultiLine( bool multiLine )
+{
+ if( mController )
+ {
+ if( multiLine )
+ {
+ mController->GetLayoutEngine().SetLayout( LayoutEngine::MULTI_LINE_BOX );
+ }
+ else
+ {
+ mController->GetLayoutEngine().SetLayout( LayoutEngine::SINGLE_LINE_BOX );
+ }
+ }
+}
+
TextLabel::TextLabel()
: Control( ControlBehaviour( CONTROL_BEHAVIOUR_NONE ) )
{
*/
virtual void OnInitialize();
+ /**
+ * @copydoc Control::OnInitialize()
+ */
+ virtual void OnRelayout( const Vector2& size, ActorSizeContainer& container );
+
private: // Implementation
/**
void SetText( const std::string& text );
/**
+ * Helper for SetProperty.
+ * @param[in] multiLine The new "multi-line" property value.
+ */
+ void SetMultiLine( bool multiLine );
+
+ /**
* Construct a new TextLabel.
*/
TextLabel();
namespace Toolkit
{
+const std::string TextLabel::TEXT_PROPERTY_NAME("text");
+const std::string TextLabel::MULTI_LINE_PROPERTY_NAME("multi-line");
+
TextLabel TextLabel::New()
{
return Internal::TextLabel::New();
public:
// Property indices
- static const Property::Index PROPERTY_TEXT; ///< name "text", type STRING
+ static const Property::Index PROPERTY_TEXT; ///< name "text", type STRING
+ static const Property::Index PROPERTY_MULTI_LINE; ///< name "multi-line", type BOOLEAN
// Property names
- static const std::string TEXT_PROPERTY_NAME; ///< Property, name "text", type STRING
+ static const std::string TEXT_PROPERTY_NAME; ///< Property, name "text", type STRING
+ static const std::string MULTI_LINE_PROPERTY_NAME; ///< Property, name "multi-line", type BOOLEAN
/**
* Create the TextLabel control.
$(public_api_base_src_dir)/text/text-view.cpp \
$(public_api_base_src_dir)/text/text-view-interface.cpp \
$(public_api_base_src_dir)/text/visual-model.cpp \
+ $(public_api_base_src_dir)/text/layouts/layout-engine.cpp \
$(public_api_base_src_dir)/text/rendering/text-renderer.cpp \
$(public_api_base_src_dir)/text/rendering/basic/text-basic-renderer.cpp \
$(public_api_base_src_dir)/text/rendering/shaders/text-basic-shader.cpp \
$(public_api_base_src_dir)/text/text-view-interface.h \
$(public_api_base_src_dir)/text/visual-model.h
+public_api_base_text_layouts_header_files = \
+ $(public_api_base_src_dir)/text/layouts/layout-engine.h
+
public_api_base_text_rendering_header_files = \
$(public_api_base_src_dir)/text/rendering/text-renderer.h
--- /dev/null
+/*
+ * 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.
+ *
+ */
+
+// CLASS HEADER
+#include <dali-toolkit/public-api/text/layouts/layout-engine.h>
+
+// EXTERNAL INCLUDES
+#include <dali/public-api/math/vector2.h>
+#include <dali/public-api/text-abstraction/font-client.h>
+
+// INTERNAL INCLUDES
+#include <dali-toolkit/public-api/text/logical-model.h>
+#include <dali-toolkit/public-api/text/visual-model.h>
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+namespace Text
+{
+
+struct LayoutEngine::Impl
+{
+ Impl()
+ : mLayout( LayoutEngine::SINGLE_LINE_BOX )
+ {
+ mFontClient = TextAbstraction::FontClient::Get();
+ }
+
+ void UpdateVisualModel( const Vector2& boundingBox, const LogicalModel& logicalModel, VisualModel& visualModel )
+ {
+ // TODO Switch between different layouts
+
+ TextAbstraction::FontId fontId = mFontClient.GetFontId( "/usr/share/fonts/truetype/ubuntu-font-family/UbuntuMono-R.ttf", 13*64 );
+
+ const Length characterCount = logicalModel.GetNumberOfCharacters();
+
+ Vector<GlyphInfo> glyphs;
+ glyphs.Reserve( characterCount );
+
+ Vector<CharacterIndex> characterIndices;
+ characterIndices.Reserve( characterCount );
+
+ std::vector<Length> charactersPerGlyph;
+ charactersPerGlyph.assign( characterCount, 1 );
+
+ for( unsigned int i=0; i<characterCount; ++i )
+ {
+ Character charcode;
+ logicalModel.GetText( i, &charcode, 1 );
+
+ // TODO - Perform shaping to get correct glyph indices
+ GlyphIndex glyphIndex = mFontClient.GetGlyphIndex( fontId, charcode );
+
+ glyphs.PushBack( GlyphInfo(fontId, glyphIndex) );
+ characterIndices.PushBack( 1 );
+ }
+
+ if( mFontClient.GetGlyphMetrics( &glyphs[0], glyphs.Size() ) )
+ {
+ visualModel.SetGlyphs( &glyphs[0],
+ &characterIndices[0],
+ &charactersPerGlyph[0],
+ characterCount );
+
+ UpdateGlyphPositions( boundingBox, visualModel );
+ }
+ }
+
+ void UpdateGlyphPositions( const Vector2& boundingBox, VisualModel& visualModel )
+ {
+ if( LayoutEngine::SINGLE_LINE_BOX == mLayout )
+ {
+ SingleLineLayout( boundingBox, visualModel );
+ }
+ else
+ {
+ MultiLineLayout( boundingBox, visualModel );
+ }
+ }
+
+ // TODO - Rewrite this to handle bidi
+ void SingleLineLayout( const Vector2& boundingBox, VisualModel& visualModel )
+ {
+ Length glyphCount = visualModel.GetNumberOfGlyphs();
+
+ std::vector<Vector2> glyphPositions;
+ glyphPositions.reserve( glyphCount );
+
+ if( glyphCount > 0 )
+ {
+ // FIXME Single font assumption
+ Text::FontMetrics fontMetrics;
+ GlyphInfo firstGlyph;
+ visualModel.GetGlyphs( 0, &firstGlyph, 1 );
+ mFontClient.GetFontMetrics( firstGlyph.fontId, fontMetrics );
+
+ float penX( 0 );
+ float penY( fontMetrics.ascender ); // Move to baseline
+
+ for( unsigned int i=0; i<glyphCount; ++i )
+ {
+ GlyphInfo glyph;
+ visualModel.GetGlyphs( i, &glyph, 1 );
+
+ glyphPositions.push_back( Vector2( penX + glyph.xBearing,
+ penY - glyph.yBearing ) );
+
+ penX += glyph.advance;
+ }
+
+ visualModel.SetGlyphPositions( &glyphPositions[0], glyphCount );
+ }
+ }
+
+ // TODO - Rewrite this to handle bidi
+ void MultiLineLayout( const Vector2& boundingBox, VisualModel& visualModel )
+ {
+ Length glyphCount = visualModel.GetNumberOfGlyphs();
+
+ std::vector<Vector2> glyphPositions;
+ glyphPositions.reserve( glyphCount );
+
+ if( glyphCount > 0 )
+ {
+ // FIXME Single font assumption
+ Text::FontMetrics fontMetrics;
+ GlyphInfo firstGlyph;
+ visualModel.GetGlyphs( 0, &firstGlyph, 1 );
+ mFontClient.GetFontMetrics( firstGlyph.fontId, fontMetrics );
+
+ float penX( 0 );
+ float penY( fontMetrics.ascender ); // Move to baseline
+
+ unsigned int i=0;
+ while( i < glyphCount )
+ {
+ // Skip initial whitespace
+ for( ; i<glyphCount; ++i )
+ {
+ GlyphInfo glyph;
+ visualModel.GetGlyphs( i, &glyph, 1 );
+
+ if( glyph.width > 0 &&
+ glyph.height > 0 )
+ {
+ break;
+ }
+ else
+ {
+ glyphPositions.push_back( Vector2( penX + glyph.xBearing,
+ penY - glyph.yBearing ) );
+ }
+ }
+
+ // Find last glyph for the next line
+ unsigned int endIndex = i;
+ float endPenX = penX;
+ unsigned int j=i;
+ for( ; j<glyphCount; ++j )
+ {
+ GlyphInfo glyph;
+ visualModel.GetGlyphs( j, &glyph, 1 );
+
+ endPenX += glyph.advance;
+
+ if( glyph.width <= 0 ||
+ glyph.height <= 0 )
+ {
+ // Potential line end found
+ endIndex = j;
+ }
+ else if( endPenX > boundingBox.width )
+ {
+ break;
+ }
+ }
+
+ // If end of text or no whitespace found
+ if( glyphCount == j ||
+ endIndex == i )
+ {
+ endIndex = j;
+ }
+
+ for( ; i<endIndex; ++i )
+ {
+ GlyphInfo glyph;
+ visualModel.GetGlyphs( i, &glyph, 1 );
+
+ glyphPositions.push_back( Vector2( penX + glyph.xBearing,
+ penY - glyph.yBearing ) );
+
+ penX += glyph.advance;
+ }
+
+ // Go to next line
+ penX = 0;
+ penY += fontMetrics.height;
+ }
+
+ visualModel.SetGlyphPositions( &glyphPositions[0], glyphCount );
+ }
+ }
+
+ unsigned int mLayout;
+
+ TextAbstraction::FontClient mFontClient;
+};
+
+LayoutEngine::LayoutEngine()
+: mImpl( NULL )
+{
+ mImpl = new LayoutEngine::Impl();
+}
+
+LayoutEngine::~LayoutEngine()
+{
+ delete mImpl;
+}
+
+void LayoutEngine::SetLayout( Layout layout )
+{
+ mImpl->mLayout = layout;
+}
+
+void LayoutEngine::UpdateVisualModel( const Vector2& boundingBox, const LogicalModel& logicalModel, VisualModel& visualModel )
+{
+ mImpl->UpdateVisualModel( boundingBox, logicalModel, visualModel );
+}
+
+} // namespace Text
+
+} // namespace Toolkit
+
+} // namespace Dali
--- /dev/null
+#ifndef __DALI_TOOLKIT_TEXT_LAYOUT_ENGINE_H__
+#define __DALI_TOOLKIT_TEXT_LAYOUT_ENGINE_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.
+ *
+ */
+
+namespace Dali
+{
+
+struct Vector2;
+
+namespace Toolkit
+{
+
+namespace Text
+{
+
+class LogicalModel;
+class VisualModel;
+
+/**
+ * @brief LayoutEngine is responsible for calculating the visual position of glyphs in layout.
+ */
+class LayoutEngine
+{
+public:
+
+ enum Layout
+ {
+ SINGLE_LINE_BOX,
+ MULTI_LINE_BOX
+ };
+
+ /**
+ * @brief Create a new instance of a LayoutEngine.
+ */
+ LayoutEngine();
+
+ /**
+ * @brief Virtual destructor.
+ */
+ ~LayoutEngine();
+
+ /**
+ * @brief Choose the required layout.
+ *
+ * @param[in] layout The required layout.
+ */
+ void SetLayout( Layout layout );
+
+ /**
+ * @brief Store the visual position of glyphs in the VisualModel.
+ *
+ * @param[in] boundingBox The size of the box containing the text.
+ * @param[in] logicalModel The logical model.
+ * @param[in] visualModel The visual model to update.
+ */
+ void UpdateVisualModel( const Vector2& boundingBox, const LogicalModel& logicalModel, VisualModel& visualModel );
+
+private:
+
+ // Undefined
+ LayoutEngine( const LayoutEngine& handle );
+
+ // Undefined
+ LayoutEngine& operator=( const LayoutEngine& handle );
+
+private:
+
+ struct Impl;
+ Impl* mImpl;
+};
+} // namespace Text
+
+} // namespace Toolkit
+
+} // namespace Dali
+
+#endif // __DALI_TOOLKIT_TEXT_LAYOUT_ENGINE_H__
// CLASS HEADER
#include <dali-toolkit/public-api/text/text-controller.h>
+// EXTERNAL INCLUDES
+#include <dali/public-api/text-abstraction/font-client.h>
+
// INTERNAL INCLUDES
#include <dali-toolkit/public-api/text/character-set-conversion.h>
+#include <dali-toolkit/public-api/text/layouts/layout-engine.h>
#include <dali-toolkit/public-api/text/logical-model.h>
#include <dali-toolkit/public-api/text/text-view.h>
#include <dali-toolkit/public-api/text/visual-model.h>
struct Controller::Impl
{
Impl()
+ : mNewTextArrived( false )
{
mLogicalModel = LogicalModel::New();
mVisualModel = VisualModel::New();
mFontClient = TextAbstraction::FontClient::Get();
}
+ std::string mNewText;
+ bool mNewTextArrived;
+
LogicalModelPtr mLogicalModel;
VisualModelPtr mVisualModel;
View mView;
+ LayoutEngine mLayoutEngine;
+
TextAbstraction::FontClient mFontClient;
};
void Controller::SetText( const std::string& text )
{
- // Convert text into UTF-32
- Vector<Character> utf32Characters;
- utf32Characters.Resize( text.size() );
+ // Keep until size negotiation
+ mImpl->mNewText = text;
+ mImpl->mNewTextArrived = true;
+}
+
+bool Controller::Relayout( const Vector2& size )
+{
+ bool viewUpdated( false );
+
+ if( mImpl->mNewTextArrived )
+ {
+ std::string& text = mImpl->mNewText;
+
+ // Convert text into UTF-32
+ Vector<Character> utf32Characters;
+ utf32Characters.Resize( text.size() );
+
+ // This is a bit horrible but std::string returns a (signed) char*
+ const uint8_t* utf8 = reinterpret_cast<const uint8_t*>( text.c_str() );
+
+ Length characterCount = Utf8ToUtf32( utf8, text.size(), &utf32Characters[0] );
- // This is a bit horrible but std::string returns a (signed) char*
- const uint8_t* utf8 = reinterpret_cast<const uint8_t*>( text.c_str() );
+ // Manipulate the logical model
+ mImpl->mLogicalModel->SetText( &utf32Characters[0], characterCount );
- Length characterCount = Utf8ToUtf32( utf8, text.size(), &utf32Characters[0] );
+ // Update the visual model
+ mImpl->mLayoutEngine.UpdateVisualModel( size, *mImpl->mLogicalModel, *mImpl->mVisualModel );
- // Manipulate the logical model
- mImpl->mLogicalModel->SetText( &utf32Characters[0], characterCount );
+ // Discard temporary text
+ mImpl->mNewTextArrived = false;
+ text.clear();
- UpdateVisualModel();
+ viewUpdated = true;
+ }
+
+ return viewUpdated;
}
View& Controller::GetView()
return mImpl->mView;
}
+LayoutEngine& Controller::GetLayoutEngine()
+{
+ return mImpl->mLayoutEngine;
+}
+
Controller::~Controller()
{
delete mImpl;
mImpl = new Controller::Impl();
}
-// TODO - Move this with LayoutEngine
-void Controller::UpdateVisualModel()
-{
- if( mImpl->mLogicalModel &&
- mImpl->mVisualModel )
- {
- const LogicalModel& logicalModel = *(mImpl->mLogicalModel);
- VisualModel& visualModel = *(mImpl->mVisualModel);
-
- TextAbstraction::FontId fontId = mImpl->mFontClient.GetFontId( "/usr/share/fonts/truetype/ubuntu-font-family/UbuntuMono-R.ttf", 13*64 );
-
- const Length characterCount = logicalModel.GetNumberOfCharacters();
-
- Vector<GlyphInfo> glyphs;
- glyphs.Reserve( characterCount );
-
- Vector<CharacterIndex> characterIndices;
- characterIndices.Reserve( characterCount );
-
- std::vector<Length> charactersPerGlyph;
- charactersPerGlyph.assign( characterCount, 1 );
-
- for( unsigned int i=0; i<characterCount; ++i )
- {
- Character charcode;
- logicalModel.GetText( i, &charcode, 1 );
-
- // TODO - Perform shaping to get correct glyph indices
- GlyphIndex glyphIndex = mImpl->mFontClient.GetGlyphIndex( fontId, charcode );
-
- glyphs.PushBack( GlyphInfo(fontId, glyphIndex) );
- characterIndices.PushBack( 1 );
- }
-
- if( mImpl->mFontClient.GetGlyphMetrics( &glyphs[0], glyphs.Size() ) )
- {
- visualModel.SetGlyphs( &glyphs[0],
- &characterIndices[0],
- &charactersPerGlyph[0],
- characterCount );
-
- UpdateVisualPositions();
- }
- }
-}
-
-// TODO - Move this with LayoutEngine
-void Controller::UpdateVisualPositions()
-{
- if( mImpl->mVisualModel )
- {
- VisualModel& visualModel = *(mImpl->mVisualModel);
-
- Length glyphCount = visualModel.GetNumberOfGlyphs();
-
- std::vector<Vector2> glyphPositions;
- glyphPositions.reserve( glyphCount );
-
- if( glyphCount > 0 )
- {
- // FIXME Single font assumption
- Text::FontMetrics fontMetrics;
- GlyphInfo firstGlyph;
- visualModel.GetGlyphs( 0, &firstGlyph, 1 );
- mImpl->mFontClient.GetFontMetrics( firstGlyph.fontId, fontMetrics );
-
- float penX( 0 );
- float penY( fontMetrics.ascender ); // Move to baseline
-
- for( unsigned int i=0; i<glyphCount; ++i )
- {
- GlyphInfo glyph;
- visualModel.GetGlyphs( i, &glyph, 1 );
-
- glyphPositions.push_back( Vector2( penX + glyph.xBearing,
- penY - glyph.yBearing ) );
-
- penX += glyph.advance;
- }
-
- visualModel.SetGlyphPositions( &glyphPositions[0], glyphCount );
- }
- }
-}
-
} // namespace Text
} // namespace Toolkit
{
class Controller;
+class LayoutEngine;
+
typedef IntrusivePtr<Controller> ControllerPtr;
/**
*/
static ControllerPtr New();
- // TODO - Layouting options e.g. single vs multi-line
-
/**
* @brief Replaces any text previously set.
*
void SetText( const std::string& text );
/**
+ * @brief Triggers a relayout which updates View (if necessary).
+ *
+ * @note UI Controls are expected to minimize calls to this method e.g. call once after size negotiation.
+ * @param[in] size A the size of a bounding box to layout text within.
+ * @return True if the View was updated.
+ */
+ bool Relayout( const Vector2& size );
+
+ /**
+ * @brief Return the layout engine.
+ *
+ * @return A reference to the layout engine.
+ */
+ LayoutEngine& GetLayoutEngine();
+
+ /**
* @brief Return a view of the text.
*
- * @return An interface to the view.
+ * @return A reference to the view.
*/
View& GetView();
Controller();
/**
- * TODO - Move these with LayoutEngine
+ * @brief Populates the visual model.
*/
void UpdateVisualModel();
- void UpdateVisualPositions();
// Undefined
Controller( const Controller& handle );
publicapibasetableviewdir = $(publicapibasedir)/controls/table-view
publicapibasetextcontrolsdir = $(publicapibasedir)/controls/text-controls
publicapibasetextdir = $(publicapibasedir)/text
+publicapibasetextlayoutsdir = $(publicapibasedir)/text/layouts
publicapibasetextrenderingdir = $(publicapibasedir)/text/rendering
publicapibasetextrenderingbasicdir = $(publicapibasedir)/text/rendering/basic
publicapibasetextrenderingshadersdir = $(publicapibasedir)/text/rendering/shaders
publicapibasetableview_HEADERS = $(public_api_base_table_view_header_files)
publicapibasetextcontrols_HEADERS = $(public_api_base_text_controls_header_files)
publicapibasetext_HEADERS = $(public_api_base_text_header_files)
+publicapibasetextlayouts_HEADERS = $(public_api_base_text_layouts_header_files)
publicapibasetextrendering_HEADERS = $(public_api_base_text_rendering_header_files)
publicapibasetextrenderingbasic_HEADERS = $(public_api_base_text_rendering_basic_header_files)
publicapibasetextrenderingshaders_HEADERS = $(public_api_base_text_rendering_shaders_header_files)
#include <dali-toolkit/public-api/text/character-set-conversion.h>
#include <dali-toolkit/public-api/text/font-run.h>
#include <dali-toolkit/public-api/text/logical-model.h>
+#include <dali-toolkit/public-api/text/script.h>
#include <dali-toolkit/public-api/text/segmentation.h>
#include <dali-toolkit/public-api/text/multi-language-support.h>
-#include <dali-toolkit/public-api/text/script.h>
#include <dali-toolkit/public-api/text/text-controller.h>
#include <dali-toolkit/public-api/text/text-definitions.h>
#include <dali-toolkit/public-api/text/text-view.h>
#include <dali-toolkit/public-api/text/text-view-interface.h>
#include <dali-toolkit/public-api/text/visual-model.h>
+#include <dali-toolkit/public-api/text/layouts/layout-engine.h>
#include <dali-toolkit/public-api/text/rendering/text-renderer.h>
#include <dali-toolkit/public-api/text/rendering/basic/text-basic-renderer.h>
#include <dali-toolkit/public-api/text/rendering/shaders/text-basic-shader.h>