impr: Try to align additional fonts automatically

This commit is contained in:
WerWolv
2023-11-28 13:52:26 +01:00
parent 37ce37862a
commit 23fc232c47
4 changed files with 81 additions and 14 deletions

View File

@@ -612,6 +612,7 @@ namespace hex {
std::vector<u8> fontData;
std::vector<GlyphRange> glyphRanges;
Offset offset;
u32 flags;
};
namespace impl {
@@ -620,8 +621,13 @@ namespace hex {
}
void loadFont(const std::fs::path &path, const std::vector<GlyphRange> &glyphRanges = {}, Offset offset = {});
void loadFont(const std::string &name, const std::span<const u8> &data, const std::vector<GlyphRange> &glyphRanges = {}, Offset offset = {});
GlyphRange glyph(const char *glyph);
GlyphRange glyph(u32 codepoint);
GlyphRange range(const char *glyphBegin, const char *glyphEnd);
GlyphRange range(u32 codepointBegin, u32 codepointEnd);
void loadFont(const std::fs::path &path, const std::vector<GlyphRange> &glyphRanges = {}, Offset offset = {}, u32 flags = 0);
void loadFont(const std::string &name, const std::span<const u8> &data, const std::vector<GlyphRange> &glyphRanges = {}, Offset offset = {}, u32 flags = 0);
}