22 #ifndef GRAPHICS_FONT_H 23 #define GRAPHICS_FONT_H 25 #include "common/str.h" 26 #include "common/ustr.h" 27 #include "common/rect.h" 30 template<
class T>
class Array;
93 virtual int getFontHeight()
const = 0;
106 virtual int getFontAscent()
const;
114 virtual int getFontDescent()
const;
124 virtual int getFontLeading()
const;
131 virtual int getMaxCharWidth()
const = 0;
140 virtual int getCharWidth(uint32 chr)
const = 0;
150 virtual int getKerningOffset(uint32 left, uint32 right)
const;
213 virtual void drawChar(
Surface *dst, uint32 chr,
int x,
int y, uint32 color)
const = 0;
214 virtual void drawChar(
ManagedSurface *dst, uint32 chr,
int x,
int y, uint32 color)
const;
301 void scaleSingleGlyph(
Surface *scaleSurface,
int *grayScaleMap,
int grayScaleMapSize,
int width,
int height,
int xOffset,
int yOffset,
int grayLevel,
int chr,
int srcheight,
int srcwidth,
float scale)
const;
Definition: managed_surface.h:51
Center the text.
Definition: font.h:52
TextAlign
Definition: font.h:48
Default wrapping mode.
Definition: font.h:59
Allow any amount of trailing whitespace before wrapping as it won't be drawn.
Definition: font.h:62
Align the text to the left.
Definition: font.h:51
Indicates invalid alignment.
Definition: font.h:49
Make the resulting line segments close to the same width.
Definition: font.h:60
WordWrapMode
Definition: font.h:58
Graphics::Surface * scale(const Graphics::Surface &srcImage, int xSize, int ySize)
TextAlign convertTextAlignH(TextAlign alignH, bool rtl)
Align the text to the right.
Definition: font.h:54
Align the text to start of line (virtual).
Definition: font.h:50
Definition: algorithm.h:29
Definition: formatinfo.h:28
Align the text to end of line (virtual).
Definition: font.h:53
Text is wrapped on new lines. Otherwise, treats them as single whitespace.
Definition: font.h:61
virtual Common::String getFontName() const
Definition: font.h:98