diff options
author | Vincent Bénony | 2016-01-06 16:20:23 +0100 |
---|---|---|
committer | Vincent Bénony | 2016-01-06 16:20:23 +0100 |
commit | efdb5679ce6304dbc854afbbc511e633d7513338 (patch) | |
tree | e680a240e5f6018fc3a4cce53b50060caa22a929 /graphics/fonts/ttf.h | |
parent | 4687ff6d6d2863cc95c8137543ecf9c39bc01723 (diff) | |
parent | b72c02bad44749a1355acefdb198e36b2e772575 (diff) | |
download | scummvm-rg350-efdb5679ce6304dbc854afbbc511e633d7513338.tar.gz scummvm-rg350-efdb5679ce6304dbc854afbbc511e633d7513338.tar.bz2 scummvm-rg350-efdb5679ce6304dbc854afbbc511e633d7513338.zip |
IOS: Merge branch 'master' into ios-fix
Diffstat (limited to 'graphics/fonts/ttf.h')
-rw-r--r-- | graphics/fonts/ttf.h | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/graphics/fonts/ttf.h b/graphics/fonts/ttf.h index bd25b69f21..4110486357 100644 --- a/graphics/fonts/ttf.h +++ b/graphics/fonts/ttf.h @@ -56,10 +56,32 @@ enum TTFRenderMode { }; /** + * This specifies how the font size is defined. + */ +enum TTFSizeMode { + /** + * Character height only. + * + * This matches rendering obtained when calling + * CreateFont in Windows with negative height values. + */ + kTTFSizeModeCharacter, + + /** + * Full cell height. + * + * This matches rendering obtained when calling + * CreateFont in Windows with positive height values. + */ + kTTFSizeModeCell +}; + +/** * Loads a TTF font file from a given data stream object. * * @param stream Stream object to load font data from. * @param size The point size to load. + * @param sizeMode The point size definition used for the size parameter. * @param dpi The dpi to use for size calculations, by default 72dpi * are used. * @param renderMode FreeType2 mode used to render glyphs. @see TTFRenderMode @@ -71,7 +93,7 @@ enum TTFRenderMode { * supported. * @return 0 in case loading fails, otherwise a pointer to the Font object. */ -Font *loadTTFFont(Common::SeekableReadStream &stream, int size, uint dpi = 0, TTFRenderMode renderMode = kTTFRenderModeLight, const uint32 *mapping = 0); +Font *loadTTFFont(Common::SeekableReadStream &stream, int size, TTFSizeMode sizeMode = kTTFSizeModeCharacter, uint dpi = 0, TTFRenderMode renderMode = kTTFRenderModeLight, const uint32 *mapping = 0); void shutdownTTF(); |