diff options
author | Eugene Sandulenko | 2016-10-12 23:27:50 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2016-10-12 23:27:50 +0200 |
commit | ce89406b9a7e68acefae307281dc98e97a7bca88 (patch) | |
tree | d6d2315b2cd65f0ea43eab8978610631333cc436 /graphics/fonts/bdf.cpp | |
parent | b5d4c302d0661fe1bfd5144a5eab4d1e3b02ffab (diff) | |
download | scummvm-rg350-ce89406b9a7e68acefae307281dc98e97a7bca88.tar.gz scummvm-rg350-ce89406b9a7e68acefae307281dc98e97a7bca88.tar.bz2 scummvm-rg350-ce89406b9a7e68acefae307281dc98e97a7bca88.zip |
GRAPHICS: Fix BDF font referencing on font generation
Diffstat (limited to 'graphics/fonts/bdf.cpp')
-rw-r--r-- | graphics/fonts/bdf.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/graphics/fonts/bdf.cpp b/graphics/fonts/bdf.cpp index 34155fcec1..93b64d8225 100644 --- a/graphics/fonts/bdf.cpp +++ b/graphics/fonts/bdf.cpp @@ -706,7 +706,7 @@ BdfFont *BdfFont::scaleFont(BdfFont *src, int newSize) { return NULL; } - if (src->getFontSize()) { + if (src->getFontSize() == 0) { warning("Requested to scale 0 size font"); return NULL; } @@ -735,11 +735,13 @@ BdfFont *BdfFont::scaleFont(BdfFont *src, int newSize) { boxes[i].xOffset = src->_data.boxes[i].xOffset; boxes[i].yOffset = src->_data.boxes[i].yOffset; } + data.boxes = boxes; byte *advances = new byte[data.numCharacters]; for (int i = 0; i < data.numCharacters; ++i) { advances[i] = src->_data.advances[i]; } + data.advances = advances; byte **bitmaps = new byte *[data.numCharacters]; @@ -758,8 +760,6 @@ BdfFont *BdfFont::scaleFont(BdfFont *src, int newSize) { } data.bitmaps = bitmaps; - data.advances = advances; - data.boxes = boxes; return new BdfFont(data, DisposeAfterUse::YES); } |