aboutsummaryrefslogtreecommitdiff
path: root/src/libjin/Graphics/Font/Font.h
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2018-10-15 12:49:54 +0800
committerchai <chaifix@163.com>2018-10-15 12:49:54 +0800
commit68b60be0d1da84aa670d29b87b26ab3e3db51b69 (patch)
tree661b2b1aff66ce3068c2bd6e4abe66734e3d1706 /src/libjin/Graphics/Font/Font.h
parent437ea76fc9b61240b2f8d1b0b800f3f7a73af766 (diff)
*增加默认字体
Diffstat (limited to 'src/libjin/Graphics/Font/Font.h')
-rw-r--r--src/libjin/Graphics/Font/Font.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/libjin/Graphics/Font/Font.h b/src/libjin/Graphics/Font/Font.h
index 424c324..fcc559c 100644
--- a/src/libjin/Graphics/Font/Font.h
+++ b/src/libjin/Graphics/Font/Font.h
@@ -13,7 +13,10 @@ namespace graphics
class Font
{
public:
- Font() {}
+ Font(unsigned fontsize)
+ : fontSize(fontsize)
+ {
+ }
virtual ~Font() {};
virtual Page* typeset(const Text& text, int lineheight, int spacing = 0) = 0;
@@ -23,6 +26,11 @@ namespace graphics
virtual void print(const Content& text, int x, int y, int lineheight, int spacing = 0) = 0;
virtual void print(const Text& text, int x, int y, int lineheight, int spacing = 0) = 0;
+ inline unsigned getFontSize() { return fontSize; };
+
+ protected:
+ unsigned fontSize;
+
};
} // graphics