3#include <zenkit/Font.hh>
5#include <Tempest/Painter>
10 GthFont(zenkit::Read& data, std::string_view ftex,
const Tempest::Color &cl);
20 void drawText(Tempest::Painter& p,
int x,
int y,
int w,
int h, std::string_view txt, Tempest::AlignFlag align,
int firstLine=0)
const;
21 void drawText(Tempest::Painter& p,
int x,
int y, std::string_view txt)
const;
23 auto textSize(
const std::string_view txt)
const -> Tempest::Size;
24 auto textSize(
const char* b,
const char* e)
const -> Tempest::Size;
25 auto textSize(
const uint8_t* b,
const uint8_t* e)
const -> Tempest::Size;
26 auto textSize(
int w, std::string_view txt)
const -> Tempest::Size;
27 auto lineCount(
int w, std::string_view txt)
const -> int32_t;
30 std::shared_ptr<zenkit::Font> pfnt;
31 const Tempest::Texture2d* tex =
nullptr;
32 uint32_t fntHeight = 0;
36 const uint8_t* getLine(
const uint8_t* txt,
int bw,
int &width)
const;
37 const uint8_t* getWord(
const uint8_t* txt,
int &width,
int &space)
const;
39 static bool isSpace(uint8_t ch);
40 Tempest::Size processText(Tempest::Painter* p,
int x,
int y,
int w,
int h, std::string_view txt, Tempest::AlignFlag align,
int firstLine)
const;
GthFont(const GthFont &)=default
auto lineCount(int w, std::string_view txt) const -> int32_t
void drawText(Tempest::Painter &p, int x, int y, int w, int h, std::string_view txt, Tempest::AlignFlag align, int firstLine=0) const
GthFont & operator=(const GthFont &)=default
GthFont(zenkit::Read &data, std::string_view ftex, const Tempest::Color &cl)
auto textSize(const std::string_view txt) const -> Tempest::Size
GthFont(GthFont &&)=default