JNGL
Easy to use cross-platform 2D game library
Loading...
Searching...
No Matches
jngl
FontInterface.hpp
Go to the documentation of this file.
1
// Copyright 2026 Jan Niklas Hasse <jhasse@bixense.com>
2
// For conditions of distribution and use, see copyright notice in LICENSE.txt
5
#pragma once
6
7
#include <
string_view
>
8
9
namespace
jngl
{
10
11
class
Mat3;
12
14
class
FontInterface
{
15
public
:
16
virtual
~FontInterface
() =
default
;
17
virtual
void
print(
const
Mat3
&
modelview
,
std::string_view
text)
const
= 0;
18
virtual
double
getTextWidth(
std::string_view
text)
const
= 0;
19
virtual
double
getLineHeight()
const
= 0;
20
};
21
22
}
// namespace jngl
std::string_view
jngl::FontInterface
Common interface for fonts, used internally by jngl::Font and jngl::OutlinedFont::bake.
Definition
FontInterface.hpp:14
jngl::Mat3
3x3 matrix
Definition
Mat3.hpp:18
jngl
JNGL's main namespace.
Definition
Achievement.hpp:10
jngl::modelview
jngl::Mat3 modelview()
Returns a copy of the global ModelView matrix.
string_view