Toggle navigation
ivorium
iv_components
Example project
GitHub
Main Page
Modules
Classes
Files
File List
File Members
ivorium_graphics
Text
Font.cpp
Go to the documentation of this file.
1
#include "
Font.hpp
"
2
3
namespace
iv
4
{
5
6
Font::Font
(
Instance
* inst ) :
7
cm( inst, this,
"Font"
),
8
inst( inst )
9
{
10
}
11
12
Instance
*
Font::instance
()
const
13
{
14
return
this->inst;
15
}
16
17
Font::Info
const
&
Font::GetInfo
()
const
18
{
19
return
this->
_info
;
20
}
21
22
Font::Variant
const
&
Font::SelectVariant
(
unsigned
font_size )
const
23
{
24
auto
it = this->
_variant_fixed
.find( font_size );
25
if
( it != this->
_variant_fixed
.end() )
26
return
it->second;
27
else
28
return
this->
_variant_msdf
;
29
}
30
31
Font::Variant
const
&
Font::SelectVariantMsdf
()
const
32
{
33
return
this->
_variant_msdf
;
34
}
35
36
}