driver/fontrenderer: let RenderString() and getRenderWidth() default to UTF8

Origin commit data
------------------
Commit: bec2e87412
Author: martii <m4rtii@gmx.de>
Date: 2014-06-11 (Wed, 11 Jun 2014)
This commit is contained in:
martii
2014-06-11 10:26:26 +02:00
committed by vanhofen
parent 3414e8b997
commit 81d1ff3ebc
3 changed files with 7 additions and 7 deletions

View File

@@ -62,7 +62,7 @@ bool CFBWindow::paintIcon(const char * const _filename, const int _x, const int
return 0;
}
void CFBWindow::RenderString(const font_t _font, const int _x, const int _y, const int _width, const char * const _text, const color_t _color, const int _boxheight, const bool _utf8_encoded)
void CFBWindow::RenderString(const font_t _font, const int _x, const int _y, const int _width, const char * const _text, const color_t _color, const int _boxheight, const unsigned int _flags)
{
((Font *)_font)->RenderString(x + _x, y + _y, _width, _text, _color, _boxheight, _utf8_encoded);
((Font *)_font)->RenderString(x + _x, y + _y, _width, _text, _color, _boxheight, _flags);
}

View File

@@ -44,7 +44,7 @@ class CFBWindow
void paintBoxRel(const int _x, const int _y, const int _dx, const int _dy, const color_t _col, int radius = 0, int type = 0xF);
bool paintIcon(const char * const _filename, const int _x, const int _y, const int _h = 0, const color_t _offset = 1);
void RenderString(const font_t _font, const int _x, const int _y, const int _width, const char * const _text, const color_t _color, const int _boxheight = 0, const bool _utf8_encoded = false);
void RenderString(const font_t _font, const int _x, const int _y, const int _width, const char * const _text, const color_t _color, const int _boxheight = 0, const unsigned int _flags = Font::IS_UTF8);
};
#endif /* __fb_window_h__ */

View File

@@ -71,11 +71,11 @@ class Font
FULLBG = 2
};
void RenderString(int x, int y, const int width, const char * text, const fb_pixel_t color, const int boxheight = 0, const unsigned int flags = 0);
void RenderString(int x, int y, const int width, const std::string & text, const fb_pixel_t color, const int boxheight = 0, const unsigned int flags = 0);
void RenderString(int x, int y, const int width, const char * text, const fb_pixel_t color, const int boxheight = 0, const unsigned int flags = IS_UTF8);
void RenderString(int x, int y, const int width, const std::string & text, const fb_pixel_t color, const int boxheight = 0, const unsigned int flags = IS_UTF8);
int getRenderWidth(const char * text, const bool utf8_encoded = false);
int getRenderWidth(const std::string & text, const bool utf8_encoded = false);
int getRenderWidth(const char * text, const bool utf8_encoded = true);
int getRenderWidth(const std::string & text, const bool utf8_encoded = true);
int getHeight(void);
int getDigitHeight(void);
int getMaxDigitWidth(void);