5#ifndef INCLUDE_FIFECHAN_DEFAULTFONT_HPP_
6#define INCLUDE_FIFECHAN_DEFAULTFONT_HPP_
10#include "fifechan/font.hpp"
11#include "fifechan/platform.hpp"
45 int getWidth(std::string
const & text)
const override;
A basic font implementation capable only of drawing rectangles (placeholder).
int getWidth(std::string const &text) const override
Gets the width of a string.
virtual int drawGlyph(Graphics *graphics, unsigned char glyph, int x, int y)
Draws a glyph as a rectangle.
int getStringIndexAt(std::string const &text, int x) const override
Gets a string index in a string providing an x coordinate.
int getHeight() const override
Gets the height of the glyphs in the font.
void drawString(Graphics *graphics, std::string const &text, int x, int y) override
Draws a string.
Abstract interface providing primitive drawing functions (lines, rectangles, etc.).