22 #ifndef GRAPHICS_KORFONT_H 23 #define GRAPHICS_KORFONT_H 25 #include "common/str.h" 26 #include "graphics/surface.h" 58 virtual bool loadData(
const char *fontFile) = 0;
83 virtual void setLineSpacing(
int spacing) {}
117 virtual void drawChar(
void *dst, uint16 ch,
int pitch,
int bpp, uint32 c1, uint32 c2,
int maxW,
int maxH)
const = 0;
137 virtual void drawChar(
void *dst, uint16 ch,
int pitch,
int bpp, uint32 c1, uint32 c2,
int maxW,
int maxH)
const;
139 template<
typename Color>
140 void blitCharacter(
const uint8 *glyph,
const int w,
const int h, uint8 *dst,
int pitch, Color c)
const;
141 void createOutline(uint8 *outline,
const uint8 *glyph,
const int w,
const int h)
const;
146 int _fontWidth, _fontHeight;
147 uint8 _bitPosNewLineMask;
149 bool isASCII(uint16 ch)
const;
151 virtual const uint8 *getCharData(uint16 c)
const = 0;
153 enum DrawingFeature {
154 kFeatDefault = 1 << 0,
155 kFeatOutline = 1 << 1,
156 kFeatShadow = 1 << 2,
157 kFeatFMTownsShadow = 1 << 3,
158 kFeatFlipped = 1 << 4
161 virtual bool hasFeature(
int feat)
const = 0;
174 bool loadData(
const char *fontFile);
176 uint8 *_fontData16x16;
177 uint _fontData16x16Size;
179 uint8 *_fontData8x16;
180 uint _fontData8x16Size;
183 uint _fontData8x8Size;
185 virtual const uint8 *getCharData(uint16 c)
const;
187 bool hasFeature(
int feat)
const;
189 const uint8 *getCharDataPCE(uint16 c)
const;
190 const uint8 *getCharDataDefault(uint16 c)
const;
193 kKoreanFontVersion = 3
207 bool loadData(
const char *fontFile);
218 int _englishFontWidth;
219 int _englishFontHeight;
220 uint8 *_englishFontData;
221 uint _englishFontDataSize;
224 virtual const uint8 *getCharData(uint16 c)
const;
226 bool hasFeature(
int feat)
const;
228 bool englishLoadData(
const char *fontFile);
virtual uint getMaxFontWidth() const =0
virtual bool loadData(const char *fontFile)=0
DrawingMode
Definition: korfont.h:66
virtual void setCharSpacing(int spacing)
Definition: korfont.h:82
Definition: korfont.h:123
static FontKorean * createFont(const char *fontFile)
Definition: korfont.h:200
virtual uint getCharWidth(uint16 ch) const =0
Definition: korfont.h:167
virtual void toggleFlippedMode(bool enable)
Definition: korfont.h:77
Definition: formatinfo.h:28
void drawChar(Graphics::Surface &dst, uint16 ch, int x, int y, uint32 c1, uint32 c2) const
virtual uint getFontHeight() const =0