Text-Renderer/src/Font.h

44 lines
711 B
C
Raw Normal View History

2019-10-22 15:34:51 +02:00
//
// Copyright (c) 2019 Julian Hinxlage. All rights reserved.
//
#ifndef TEXTRENDERER_FONT_H
#define TEXTRENDERER_FONT_H
#include "Bitmap.h"
class Font {
public:
Bitmap bitmap;
//space between characters
int xOffset;
int yOffset;
//size of a character
int xSize;
int ySize;
//count of characters per row
int xCount;
//count of rows
int yCount;
//pixel offset of first character
int xStart;
int yStart;
2019-10-23 11:42:32 +02:00
unsigned int fillValue;
2019-10-22 15:34:51 +02:00
Font();
explicit Font(const std::string &file);
void load(const std::string &file);
int width();
int height();
2019-10-23 11:42:32 +02:00
bool getPixel(char character, int x, int y);
2019-10-22 15:34:51 +02:00
};
#endif //TEXTRENDERER_FONT_H