Text-Renderer/src/Font.h

45 lines
793 B
C++

//
// 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;
unsigned int fillValue;
char firstChar;
Font();
explicit Font(const std::string &file, const std::string &configFile);
void load(const std::string &file, const std::string &configFile);
int width();
int height();
bool getPixel(char character, int x, int y);
};
#endif //TEXTRENDERER_FONT_H