CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
FontGlyphManager.hpp
Go to the documentation of this file.
1//
2// CeresEngine - A game development framework
3//
4// Created by Rogiel Sulzbach.
5// Copyright (c) 2018-2022 Rogiel Sulzbach. All rights reserved.
6//
7
8#pragma once
9
10#include "Forward.hpp"
12
14
16
21
22namespace CeresEngine {
23
25 private:
31
37
38 struct GlyphInfo {
40 Rect2 uv;
41 };
42
44
45 public:
46 explicit FontGlyphManager() = default;
47 ~FontGlyphManager() = default;
48
49 public:
50 private:
51 void fillGlyph(UInt32 glyph, const SPtr<Font>& font, const Vector2& size);
52 };
53
54} // namespace CeresEngine
Definition FontGlyphManager.hpp:24
HashMap< GlyphKey, GlyphInfo > mGlyphData
Definition FontGlyphManager.hpp:43
Vector< FontTextureInfo > mTextures
Definition FontGlyphManager.hpp:30
void fillGlyph(UInt32 glyph, const SPtr< Font > &font, const Vector2 &size)
Organizes a set of textures into a single larger texture (an atlas) by minimizing empty space.
Definition TextureAtlasLayout.hpp:18
Definition Application.hpp:19
std::shared_ptr< T > SPtr
SPtr is a smart pointer that retains shared ownership of an object through a pointer.
Definition SmartPtr.hpp:37
std::vector< T, ScopedAllocatorAdaptor< StdAllocator< T, RawAllocator > > > Vector
Vector is a sequence container that encapsulates dynamic size arrays.
Definition Vector.hpp:17
std::unordered_map< Key, T, Hash, KeyEqual, ScopedAllocatorAdaptor< StdAllocator< Pair< const Key, T >, RawAllocator > > > HashMap
HashMap is an associative container that contains key-value pairs with unique keys.
Definition Map.hpp:33
std::uint32_t UInt32
Definition DataTypes.hpp:23
Definition FontGlyphManager.hpp:26
HTexture texture
Definition FontGlyphManager.hpp:27
TextureAtlasLayout layout
Definition FontGlyphManager.hpp:28
Definition FontGlyphManager.hpp:38
UInt32 textureID
Definition FontGlyphManager.hpp:39
Rect2 uv
Definition FontGlyphManager.hpp:40
Definition FontGlyphManager.hpp:32
SPtr< Font > font
Definition FontGlyphManager.hpp:34
Vector2 size
Definition FontGlyphManager.hpp:35
UInt32 glyph
Definition FontGlyphManager.hpp:33