Mercurial > fife-parpg
comparison engine/core/gui/base/gui_font.h @ 228:756b895e1dab
Merged unicode-support back into trunk.
Now all GUI/visible strings should be unicode.
Internal strings unchanged.
Remember to use a font that actually has the desired codepoints.
Current default unicode policiy is 'ignore'.
author | phoku@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Sat, 21 Mar 2009 10:38:11 +0000 |
parents | 90005975cdbb |
children | 7887f3854862 |
comparison
equal
deleted
inserted
replaced
227:d642169490f7 | 228:756b895e1dab |
---|---|
33 // Second block: files included from the same folder | 33 // Second block: files included from the same folder |
34 #include "video/fonts/abstractfont.h" | 34 #include "video/fonts/abstractfont.h" |
35 | 35 |
36 | 36 |
37 namespace FIFE { | 37 namespace FIFE { |
38 class gcn::Graphics; | |
39 | 38 |
40 class GuiFont : public gcn::Font, public AbstractFont { | 39 class GuiFont : public gcn::Font { |
41 public: | 40 public: |
42 /** Constructor | 41 /** Constructor |
43 * Takes the ownership of given font | 42 * Takes the ownership of given font |
44 */ | 43 */ |
45 GuiFont(AbstractFont* font); | 44 GuiFont(AbstractFont* font); |
46 virtual ~GuiFont(); | 45 virtual ~GuiFont(); |
47 | 46 |
48 int getStringIndexAt(const std::string& text, int x); | 47 int getStringIndexAt(const std::string& text, int x) const; |
49 void drawString(gcn::Graphics* graphics, const std::string& text, int x, int y); | 48 void drawString(gcn::Graphics* graphics, const std::string& text, int x, int y); |
50 void drawMultiLineString(gcn::Graphics* graphics, const std::string& text, int x, int y); | 49 void drawMultiLineString(gcn::Graphics* graphics, const std::string& text, int x, int y); |
51 std::string splitTextToWidth (const std::string& text, int render_width); | 50 std::string splitTextToWidth (const std::string& text, int render_width); |
52 | 51 |
53 void setRowSpacing (int spacing); | 52 void setRowSpacing (int spacing); |