aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--devtools/convbdf.cpp7
-rw-r--r--graphics/fonts/bdf.cpp7
2 files changed, 6 insertions, 8 deletions
diff --git a/devtools/convbdf.cpp b/devtools/convbdf.cpp
index 5fbcd98b25..6ec453db38 100644
--- a/devtools/convbdf.cpp
+++ b/devtools/convbdf.cpp
@@ -142,10 +142,9 @@ int main(int argc, char *argv[]) {
if (in.fail() || in.eof())
error("Premature end of file");
- if (hasPrefix(line, "SIZE ")) {
- int hDpi, vDpi;
- if (sscanf(line.c_str(), "SIZE %d %d %d", &font.size, &hDpi, &vDpi) != 3)
- error("Invalid SIZE");
+ if (hasPrefix(line, "PIXEL_SIZE ")) {
+ if (sscanf(line.c_str(), "PIXEL_SIZE %d", &font.size) != 1)
+ error("Invalid PIXEL_SIZE");
} else if (hasPrefix(line, "FONT ")) {
fontName = line.substr(5);
} else if (hasPrefix(line, "COPYRIGHT ")) {
diff --git a/graphics/fonts/bdf.cpp b/graphics/fonts/bdf.cpp
index 1a23133858..9c5105d8b5 100644
--- a/graphics/fonts/bdf.cpp
+++ b/graphics/fonts/bdf.cpp
@@ -336,10 +336,9 @@ BdfFont *BdfFont::loadFont(Common::SeekableReadStream &stream) {
font.defaultBox.height = height;
font.defaultBox.xOffset = xOffset;
font.defaultBox.yOffset = yOffset;
- } else if (line.hasPrefix("SIZE ")) {
- int hDpi, vDpi;
- if (sscanf(line.c_str(), "SIZE %d %d %d", &font.size, &hDpi, &vDpi) != 3) {
- warning("BdfFont::loadFont: Invalid SIZE");
+ } else if (line.hasPrefix("PIXEL_SIZE ")) {
+ if (sscanf(line.c_str(), "PIXEL_SIZE %d", &font.size) != 1) {
+ warning("BdfFont::loadFont: Invalid PIXEL_SIZE");
freeBitmaps(bitmaps, font.numCharacters);
delete[] bitmaps;
delete[] advances;