font stringSize load
This commit is contained in:
parent
6edbc9e4a2
commit
1e03d3843f
@ -48,6 +48,8 @@ void font::unload()
|
|||||||
|
|
||||||
void font::stringSize(const std::string &string, float *width, float *height)
|
void font::stringSize(const std::string &string, float *width, float *height)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
float penX = 0;
|
float penX = 0;
|
||||||
|
|
||||||
float size_x = 0;
|
float size_x = 0;
|
||||||
|
@ -31,6 +31,8 @@ void font::unload()
|
|||||||
|
|
||||||
void font::stringSize(const std::string &string, float *width, float *height)
|
void font::stringSize(const std::string &string, float *width, float *height)
|
||||||
{
|
{
|
||||||
|
if (!isLoaded())
|
||||||
|
load();
|
||||||
auto &font = detail::font::get(handle);
|
auto &font = detail::font::get(handle);
|
||||||
font.stringSize(string, width, height);
|
font.stringSize(string, width, height);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user