16#ifndef AEONGUI_SKIATEXTLAYOUT_H
17#define AEONGUI_SKIATEXTLAYOUT_H
21#include "aeongui/TextLayout.hpp"
24typedef struct _PangoLayout PangoLayout;
26typedef struct _PangoContext PangoContext;
27struct _PangoFontDescription;
28typedef struct _PangoFontDescription PangoFontDescription;
40 DLL ~SkiaTextLayout()
override;
41 DLL
void SetText (
const std::string& aText )
override;
42 DLL
void SetFontFamily (
const std::string& aFamily )
override;
55 void UpdateFontDescription();
56 std::string mFontFamily{
"sans-serif"};
57 double mFontSize{16.0};
60 PangoContext* mPangoContext{
nullptr};
61 PangoLayout* mLayout{
nullptr};
62 PangoFontDescription* mFontDescription{
nullptr};
double GetTextHeight() const override
Get the logical height of the laid-out text.
Definition SkiaTextLayout.cpp:152
double GetCharOffsetX(long aIndex) const override
Definition SkiaTextLayout.cpp:168
void SetFontStyle(int aStyle) override
Set the font style.
Definition SkiaTextLayout.cpp:138
double GetBaseline() const override
Get the baseline offset from the top.
Definition SkiaTextLayout.cpp:160
void SetFontWeight(int aWeight) override
Set the font weight.
Definition SkiaTextLayout.cpp:132
void SetText(const std::string &aText) override
Set the text content to lay out.
Definition SkiaTextLayout.cpp:115
void SetFontFamily(const std::string &aFamily) override
Set the font family.
Definition SkiaTextLayout.cpp:120
PangoLayout * GetPangoLayout() const
Get the underlying PangoLayout.
Definition SkiaTextLayout.cpp:175
void SetFontSize(double aSize) override
Set the font size.
Definition SkiaTextLayout.cpp:126
double GetTextWidth() const override
Get the logical width of the laid-out text.
Definition SkiaTextLayout.cpp:144
Abstract text layout interface.
Definition TextLayout.hpp:35