Hershey Vector Fonts 0.1.0
A C++ library for working with the Hershey vector fonts
Loading...
Searching...
No Matches
string.hpp
Go to the documentation of this file.
1#ifndef STRING_HPP
2#define STRING_HPP
3
8#include <cstring>
9#include <fstream>
10#include <iostream>
11
12#include "font.hpp"
13#include "glyph.hpp"
14
15namespace Hershey {
16
20class String {
21
22 int num_glyphs;
23 Glyph *glyphs;
25 public:
29 String();
30
37 String(Font font, const char *chars);
38
45
51 int get_nglyph();
52
59 Glyph get_glyph(int i);
60
66 int get_width();
67
73 int get_height();
74};
75} // namespace Hershey
76
77#endif
A Hershey vector font.
Definition font.hpp:19
A Hershey vector font glyph.
Definition glyph.hpp:17
A character string comprising Hershey vector font glyphs.
Definition string.hpp:20
int get_height()
Get the height of the string.
Definition string.cpp:49
int get_width()
Get the width of the string.
Definition string.cpp:41
int get_nglyph()
Get the number of glyphs in the string.
Definition string.cpp:33
String operator+(String rhs)
Add two strings.
Definition string.cpp:16
String()
Create a new string.
Definition string.cpp:5
Glyph get_glyph(int i)
Get a i'th glyph in the string.
Definition string.cpp:37