aboutsummaryrefslogtreecommitdiff
path: root/graphics/font.h
diff options
context:
space:
mode:
authorJohannes Schickel2012-01-08 02:33:34 +0100
committerWillem Jan Palenstijn2012-01-29 16:26:20 +0100
commit9f3fbe1bd773664b1e86241e71875cd97230d791 (patch)
tree1eae5b18934a2433aef7205a86bdd9a999261346 /graphics/font.h
parentd21ae1aa40f7ef5442d98c377800a0157af069c8 (diff)
downloadscummvm-rg350-9f3fbe1bd773664b1e86241e71875cd97230d791.tar.gz
scummvm-rg350-9f3fbe1bd773664b1e86241e71875cd97230d791.tar.bz2
scummvm-rg350-9f3fbe1bd773664b1e86241e71875cd97230d791.zip
GRAPHICS/GUI: Implement kerning support for Font.
This adapts the related graphics code, which is the generic Font API and the TTF font implementation. It furthermore adapts the GUI to properly take care of kerning in text input widgets.
Diffstat (limited to 'graphics/font.h')
-rw-r--r--graphics/font.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/graphics/font.h b/graphics/font.h
index 9c0b4affc1..6819b42f52 100644
--- a/graphics/font.h
+++ b/graphics/font.h
@@ -73,6 +73,15 @@ public:
virtual int getCharWidth(byte chr) const = 0;
/**
+ * Query the kerning offset between two characters.
+ *
+ * @param left The left character. May be 0.
+ * @param right The right character. May be 0.
+ * @return The horizontal displacement.
+ */
+ virtual int getKerningOffset(byte left, byte right) const;
+
+ /**
* Draw a character at a specific point on a surface.
*
* Note that the point describes the top left edge point of the