Add font::is_rtl(uint32_t flags)

This will return if the given flags indicate RTL properties
(such as textboxes being right-aligned).
This commit is contained in:
Dav999 2024-01-03 20:23:57 +01:00 committed by Misa Elizabeth Kai
parent ed0c9b6b1f
commit 27e83b6008
2 changed files with 8 additions and 1 deletions

View File

@ -1247,6 +1247,12 @@ int height(const uint32_t flags)
return pf.font_sel->glyph_h * pf.scale;
}
bool is_rtl(const uint32_t flags)
{
PrintFlags pf = decode_print_flags(flags);
return pf.rtl;
}
void print(
const uint32_t flags,
int x,

View File

@ -85,7 +85,8 @@ std::string string_unwordwrap(const std::string& s);
bool glyph_dimensions(uint32_t flags, uint8_t* glyph_w, uint8_t* glyph_h);
int len(uint32_t flags, const char* text);
int height(const uint32_t flags);
int height(uint32_t flags);
bool is_rtl(uint32_t flags);
void print(
uint32_t flags,