From ec67b583b05ace5a0e70449cf335deeba6df5e14 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 26 Jul 2009 14:18:34 +0000 Subject: Add way to overwrite default SJIS font. svn-id: r42819 --- graphics/sjis.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'graphics/sjis.cpp') diff --git a/graphics/sjis.cpp b/graphics/sjis.cpp index d46ac3e965..589e27fd43 100644 --- a/graphics/sjis.cpp +++ b/graphics/sjis.cpp @@ -31,17 +31,19 @@ namespace Graphics { -FontSJIS *FontSJIS::createFont() { +FontSJIS *FontSJIS::createFont(const Common::Platform platform) { FontSJIS *ret = 0; - // First try ScummVM's font. - ret = new FontSjisSVM(); - if (ret && ret->loadData()) - return ret; - delete ret; + // Try the font ROM of the specified platform + if (platform == Common::kPlatformFMTowns) { + ret = new FontTowns(); + if (ret && ret->loadData()) + return ret; + delete ret; + } - // Next try the FM-Towns font ROM. - ret = new FontTowns(); + // Try ScummVM's font. + ret = new FontSjisSVM(); if (ret && ret->loadData()) return ret; delete ret; -- cgit v1.2.3