Add correct fonts
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
#include "Display/Graphics/Framebuffer.h"
|
||||
#include "Display/UI/Text/FontFace.h"
|
||||
#include "Display/UI/Text/GlyphCache.h"
|
||||
#include "Display/UI/Text/Fonts.h"
|
||||
#include "Display/UI/Text/Font.h"
|
||||
#include "Display/Graphics/Color.h"
|
||||
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
|
||||
namespace Display::UI::Text
|
||||
{
|
||||
@@ -13,16 +14,14 @@ namespace Display::UI::Text
|
||||
class Renderer
|
||||
{
|
||||
public:
|
||||
Renderer();
|
||||
void drawText(Display::Graphics::Framebuffer &fb, int x, int y, const std::string &text, const Display::Graphics::Color &color = Display::Graphics::Color{255, 255, 255}, const Font &font = {"LiberationSans-Regular", 12});
|
||||
void drawTextOutlined(Display::Graphics::Framebuffer &fb, int x, int y, const std::string &text, const Display::Graphics::Color &colorText = Display::Graphics::Color{255, 255, 255}, const Display::Graphics::Color &colorOutline = Display::Graphics::Color{0, 0, 0}, const Font &font = {"LiberationSans-Regular", 12});
|
||||
|
||||
Renderer(const Renderer &) = delete;
|
||||
Renderer &operator=(const Renderer &) = delete;
|
||||
|
||||
void drawText(Display::Graphics::Framebuffer &fb, int x, int y, const std::string &text, const Display::Graphics::Color &color);
|
||||
// int measureWidth(const std::string &text);
|
||||
// int measureHeight(const std::string &text);
|
||||
|
||||
private:
|
||||
FontFace fontFace;
|
||||
GlyphCache glyphCache;
|
||||
Fonts fonts;
|
||||
};
|
||||
|
||||
} // namespace Display::UI::Text
|
||||
Reference in New Issue
Block a user