name: "High Room" panels { name: "HIGH" path: "Panels/panel_4" clue: "high" answer: "hi" symbols: ZERO } tane/atom/src/font.h?h=main' type='application/atom+xml'/>
summary refs log blame commit diff stats
path: root/src/font.h
blob: fd24830a052bb4e841e1509366aa84b10075c769 (plain) (tree)
































                                                          
#ifndef FONT_H_C80183A7
#define FONT_H_C80183A7

#include <string_view>
#include <vector>
#include "vector.h"

class Renderer;

class Font {
public:

  Font(std::string_view filename, Renderer& renderer);

  int getTextureId() const { return textureId_; }

  vec2i getCharacterLocation(char ch) const;

  vec2i getCharacterSize(char ch) const;

  int getCharacterWidth(char ch) const;

  int getCharacterHeight() const { return tileSize_.h(); }

private:

  int textureId_;
  int columns_;
  vec2i tileSize_;
  std::vector<int> widths_;
};

#endif /* end of include guard: FONT_H_C80183A7 */