Capycore Engine  0.1.0
A simple and lightweight game engine written in C++ based on the Unity API architecture.
Loading...
Searching...
No Matches
font.h
Go to the documentation of this file.
1#pragma once
2
3#include <memory>
4#include <string>
5
6class TTF_Font; // NOLINT
7class TTF_CloseFont; // NOLINT
8
9class Font final {
10 public:
11 [[nodiscard]] std::string get_name() const;
12 [[nodiscard]] int8_t get_size() const;
13 [[nodiscard]] TTF_Font& get_ttf_font() const;
14
15 private:
16 int8_t size_;
17 std::string name_;
18 std::unique_ptr<TTF_Font, void (*)(TTF_Font*)> font_;
19
20 friend class AssetService;
21
22 explicit Font(std::string name, int8_t size, TTF_Font* font);
23};
Service responsible for managing game assets such as textures and spritesheets.
Definition assetService.h:20
Definition font.h:9
TTF_Font & get_ttf_font() const
std::string get_name() const
int8_t get_size() const