mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-09 21:11:50 +00:00
fix label font cache
This commit is contained in:
parent
c8ba5b5dbb
commit
edc6810283
7 changed files with 75 additions and 36 deletions
11
src/graphics/core/FontMetics.hpp
Normal file
11
src/graphics/core/FontMetics.hpp
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
struct FontMetrics {
|
||||
int lineHeight;
|
||||
int yoffset;
|
||||
int glyphInterval = 8;
|
||||
|
||||
int calcWidth(std::wstring_view text, size_t offset=0, size_t length=-1) const;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue