summaryrefslogtreecommitdiff
path: root/osframework/source/SexyAppFramework/Font.h
diff options
context:
space:
mode:
Diffstat (limited to 'osframework/source/SexyAppFramework/Font.h')
-rw-r--r--osframework/source/SexyAppFramework/Font.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/osframework/source/SexyAppFramework/Font.h b/osframework/source/SexyAppFramework/Font.h
new file mode 100644
index 0000000..debae94
--- /dev/null
+++ b/osframework/source/SexyAppFramework/Font.h
@@ -0,0 +1,43 @@
+#ifndef __FONT_H__
+#define __FONT_H__
+
+#include "Common.h"
+#include "Rect.h"
+#include "Color.h"
+
+namespace Sexy
+{
+
+class Graphics;
+
+class Font
+{
+public:
+ int mAscent;
+ int mAscentPadding; // How much space is above the avg uppercase char
+ int mHeight;
+ int mLineSpacingOffset; // This plus height should get added between lines
+
+public:
+ Font();
+ Font(const Font& theFont);
+ virtual ~Font();
+
+ virtual int GetAscent();
+ virtual int GetAscentPadding();
+ virtual int GetDescent();
+ virtual int GetHeight();
+ virtual int GetLineSpacingOffset();
+ virtual int GetLineSpacing();
+ virtual int StringWidth(const SexyString& theString);
+ virtual int CharWidth(SexyChar theChar);
+ virtual int CharWidthKern(SexyChar theChar, SexyChar thePrevChar);
+
+ virtual void DrawString(Graphics* g, int theX, int theY, const SexyString& theString, const Color& theColor, const Rect& theClipRect);
+
+ virtual Font* Duplicate() = NULL;
+};
+
+}
+
+#endif //__FONT_H__ \ No newline at end of file