raylib_impl 0.1.0
Vendor raylib 5.5 : IGraphic2Module / IGraphic3Module / IAudioModule
Loading...
Searching...
No Matches
RayFont.hpp
Go to the documentation of this file.
1
11#ifndef RAYFONT_HPP_
12#define RAYFONT_HPP_
13
14//Raylib (without conflict)
15#include "RaylibAliases.hpp"
16
17//Interface
18#include "IFont.hpp"
19
24class RayFont : public graphic::IFont {
25
26 public:
27 RayFont(std::string path) {
28 _font = raylib::LoadFont(path.c_str());
29 }
30
32 raylib::UnloadFont(_font);
33 }
34
35 bool isReady() const override {
36 return raylib::IsFontValid(_font);
37 }
38
39 raylib::Font handle() const {
40 return _font;
41 }
42
43 private:
44 raylib::Font _font;
45};
46
49#endif /* !RAYFONT_HPP_ */
Raylib Font class - owns the loaded font, independent of any RayText built from it.
Definition RayFont.hpp:24
bool isReady() const override
Definition RayFont.hpp:35
~RayFont()
Definition RayFont.hpp:31
RayFont(std::string path)
Definition RayFont.hpp:27
raylib::Font handle() const
Definition RayFont.hpp:39