Text-Renderer/src/Font.h

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