16#ifndef AEONGUI_PANGOTEXTLAYOUT_H
17#define AEONGUI_PANGOTEXTLAYOUT_H
21#include "aeongui/TextLayout.hpp"
24typedef struct _PangoLayout PangoLayout;
26typedef struct _PangoContext PangoContext;
27struct _PangoFontDescription;
28typedef struct _PangoFontDescription PangoFontDescription;
29typedef void* gpointer;
48 DLL
void SetText (
const std::string& aText )
override;
52 DLL
void SetFontFamily (
const std::string& aFamily )
override;
87 void UpdateFontDescription();
88 PangoContext* mPangoContext{};
89 PangoLayout* mLayout{};
90 PangoFontDescription* mFontDescription{};
91 std::string mFontFamily{
"sans-serif"};
92 double mFontSize{16.0};
void SetText(const std::string &aText) override
Set the text content to lay out.
Definition PangoTextLayout.cpp:112
void SetFontStyle(int aStyle) override
Set the font style.
Definition PangoTextLayout.cpp:135
PangoTextLayout()
Default constructor. Creates a layout with default font settings.
Definition PangoTextLayout.cpp:24
double GetCharOffsetX(long aIndex) const override
Get the x-offset of a character at the given byte index.
Definition PangoTextLayout.cpp:165
~PangoTextLayout() override
Destructor. Releases Pango resources.
Definition PangoTextLayout.cpp:38
void SetFontSize(double aSize) override
Set the font size.
Definition PangoTextLayout.cpp:123
void SetFontWeight(int aWeight) override
Set the font weight.
Definition PangoTextLayout.cpp:129
double GetTextWidth() const override
Get the logical width of the laid-out text.
Definition PangoTextLayout.cpp:141
PangoLayout * GetPangoLayout() const
Access the underlying PangoLayout for advanced use.
Definition PangoTextLayout.cpp:172
double GetBaseline() const override
Get the baseline offset from the top of the layout.
Definition PangoTextLayout.cpp:157
void SetFontFamily(const std::string &aFamily) override
Set the font family.
Definition PangoTextLayout.cpp:117
double GetTextHeight() const override
Get the logical height of the laid-out text.
Definition PangoTextLayout.cpp:149
Abstract text layout interface.
Definition TextLayout.hpp:35