malena
Why malena
Quick start
Tutorials
API docs
GitHub
GitHub
Tutorials
Loading...
Searching...
No Matches
Resources
FontManager.h
Go to the documentation of this file.
1
// Copyright (c) 2025 Dave R. Smith. All rights reserved.
2
// Malena Framework — Proprietary Software. See LICENSE for terms.
3
4
#ifndef MALENA_FONTMANAGER_H
5
#define MALENA_FONTMANAGER_H
6
7
#include <
Malena/Core/malena_export.h
>
8
#include <
Malena/Resources/ResourceManager.h
>
9
#include "
Malena/Manifests/DefaultManifest.h
"
10
#include <
SFML/Graphics/Font.hpp
>
11
#include <
Malena/Resources/Fonts/arial.h
>
12
#include <
Malena/Utilities/LoaderFunctions.h
>
13
14
namespace
ml
15
{
45
template
<
typename
Manifest = DefaultManifest>
46
class
FontManager
:
public
ResourceManager
<Manifest, sf::Font, &fileOpener>
47
{
48
public
:
58
static
const
sf::Font
&
getDefault
();
59
69
static
void
prewarm
(
const
sf::Font
& font,
unsigned
int
charSize);
70
};
71
72
}
// namespace ml
73
74
#include "../../../src/Resources/FontManager.tpp"
75
#endif
// MALENA_FONTMANAGER_H
DefaultManifest.h
Font.hpp
LoaderFunctions.h
ResourceManager.h
arial.h
ml::FontManager
Manifest-driven cache for sf::Font resources.
Definition
FontManager.h:47
ml::FontManager::getDefault
static const sf::Font & getDefault()
Return the built-in Arial font.
ml::FontManager::prewarm
static void prewarm(const sf::Font &font, unsigned int charSize)
Pre-populate the glyph atlas for a font at a given character size.
ml::ResourceManager
Generic manifest-driven resource cache.
Definition
ResourceManager.h:43
sf::Font
malena_export.h
ml
Definition
Component.h:22