JNGL
Easy to use cross-platform 2D game library
Loading...
Searching...
No Matches
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
9namespace jngl {
10
11class Mat3;
12
15public:
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
Common interface for fonts, used internally by jngl::Font and jngl::OutlinedFont::bake.
3x3 matrix
Definition Mat3.hpp:18
JNGL's main namespace.
jngl::Mat3 modelview()
Returns a copy of the global ModelView matrix.