mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-12 06:21:50 +00:00
feat: non-monospaced fonts support
This commit is contained in:
parent
93dbf34d15
commit
ae54ac9975
8 changed files with 90 additions and 46 deletions
|
|
@ -15,7 +15,6 @@ namespace gui {
|
|||
};
|
||||
|
||||
struct LabelCache {
|
||||
ptrdiff_t fontId = 0;
|
||||
FontMetrics metrics;
|
||||
|
||||
std::vector<LineScheme> lines;
|
||||
|
|
@ -24,7 +23,7 @@ namespace gui {
|
|||
size_t wrapWidth = -1;
|
||||
int multilineWidth = 0;
|
||||
|
||||
void prepare(std::ptrdiff_t fontId, FontMetrics metrics, size_t wrapWidth);
|
||||
void prepare(const std::shared_ptr<Font>& font, FontMetrics metrics, size_t wrapWidth);
|
||||
void update(std::wstring_view text, bool multiline, bool wrap);
|
||||
|
||||
size_t getTextLineOffset(size_t line) const;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue