1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
#ifndef __LIBJIN_FONT_H
#define __LIBJIN_FONT_H
#include <vector>
#include "Text.h"
namespace jin
{
namespace graphics
{
struct Page;
class Font
{
public:
Font(unsigned fontsize)
: fontSize(fontsize)
{
}
virtual ~Font() {};
virtual Page* typeset(const Text& text, int lineheight, int spacing = 0) = 0;
virtual Page* typeset(const Content& text, int lineheight, int spacing = 0) = 0;
virtual void print(const Page* page, int x, int y) = 0;
virtual void print(const Content& text, int x, int y, int lineheight, int spacing = 0) = 0;
virtual void print(const Text& text, int x, int y, int lineheight, int spacing = 0) = 0;
inline unsigned getFontSize() { return fontSize; };
protected:
unsigned fontSize;
};
} // graphics
} // jin
#endif
|