ScummVM API documentation
font.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
21 #ifndef FREESCAPE_FONT_H
22 #define FREESCAPE_FONT_H
23 
24 #include "common/array.h"
25 #include "common/stream.h"
26 
27 #include "graphics/font.h"
28 #include "graphics/managed_surface.h"
29 
30 namespace Freescape {
31 
32 class Font : public Graphics::Font {
33 public:
34  Font();
36  ~Font() override;
37 
38  void setBackground(uint32 color);
39  void setSecondaryColor(uint32 color);
40  void setTertiaryColor(uint32 color);
41  void setQuaternaryColor(uint32 color);
42  int getFontHeight() const override;
43  int getMaxCharWidth() const override;
44  int getCharWidth(uint32 chr) const override;
45  int getKerningOffset(uint32 left, uint32 right) const override { return _kerningOffset; }
46  void setKernelingOffset(int offset) { _kerningOffset = offset; }
47  void setCharWidth(int width) { _charWidth = width; }
48 
49  void drawChar(Graphics::Surface *dst, uint32 chr, int x, int y, uint32 color) const override;
50 
51  //const Graphics::ManagedSurface &getImageSurface() const { return _image; }
52 private:
54  uint32 _backgroundColor;
55  uint32 _secondaryColor;
56  uint32 _tertiaryColor;
57  uint32 _quaternaryColor;
58  int _kerningOffset;
59  int _charWidth;
60 };
61 
62 } // End of namespace Freescape
63 
64 #endif // FREESCAPE_FONT_H
int getKerningOffset(uint32 left, uint32 right) const override
Definition: font.h:45
Definition: font.h:83
Definition: surface.h:67
Definition: area.h:36
Definition: array.h:52
int getFontHeight() const override
void drawChar(Graphics::Surface *dst, uint32 chr, int x, int y, uint32 color) const override
int getCharWidth(uint32 chr) const override
Definition: font.h:32
int getMaxCharWidth() const override