ScummVM API documentation
jp_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
22#ifndef ULTIMA8_GFX_FONTS_JPFONT_H
23#define ULTIMA8_GFX_FONTS_JPFONT_H
24
25#include "ultima/ultima8/gfx/fonts/font.h"
26
27namespace Ultima {
28namespace Ultima8 {
29
30class ShapeFont;
31
32class JPFont : public Font {
33public:
34 JPFont(ShapeFont *jpfont, unsigned int fontnum);
35 ~JPFont() override;
36
37 int getWidth(int c);
38
39 int getHeight() override;
40 int getBaseline() override;
41 int getBaselineSkip() override;
42
43 void getStringSize(const Common::String &text,
44 int32 &width, int32 &height) override;
45 void getTextSize(const Common::String &text, int32 &resultwidth,
46 int32 &resultheight, unsigned int &remaining, int32 width = 0,
47 int32 height = 0, TextAlign align = TEXT_LEFT,
48 bool u8specials = false, bool pagebreaks = false) override;
49
51 unsigned int &remaining, int32 width = 0, int32 height = 0,
52 TextAlign align = TEXT_LEFT, bool u8specials = false,
53 bool pagebreaks = false,
54 Common::String::size_type cursor = Common::String::npos) override;
55
56protected:
57
58 unsigned int _fontNum;
59 ShapeFont *_shapeFont;
60};
61
62} // End of namespace Ultima8
63} // End of namespace Ultima
64
65#endif
Definition: str.h:59
Definition: font.h:41
Definition: jp_font.h:32
int getHeight() override
get the height of the font
int getBaselineSkip() override
get the baselineskip of the font (distance between two baselines)
int getBaseline() override
get the baseline of the font (relative from the top)
void getTextSize(const Common::String &text, int32 &resultwidth, int32 &resultheight, unsigned int &remaining, int32 width=0, int32 height=0, TextAlign align=TEXT_LEFT, bool u8specials=false, bool pagebreaks=false) override
RenderedText * renderText(const Common::String &text, unsigned int &remaining, int32 width=0, int32 height=0, TextAlign align=TEXT_LEFT, bool u8specials=false, bool pagebreaks=false, Common::String::size_type cursor=Common::String::npos) override
void getStringSize(const Common::String &text, int32 &width, int32 &height) override
Definition: rendered_text.h:32
Definition: shape_font.h:31