summaryrefslogtreecommitdiff
path: root/src/nw4r/ut/ut_Font.cpp
blob: 305209f37880bb29608889334c55281e989d3b35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Ported from https://github.com/kiwi515/ogws/blob/master/src/nw4r/ut/ut_Font.cpp

#include "nw4r/ut.h"

namespace nw4r {
namespace ut {

void Font::InitReaderFunc(FontEncoding encode) {
    switch (encode) {
        case FONT_ENCODE_UTF8:   mReadFunc = &CharStrmReader::ReadNextCharUTF8; break;
        case FONT_ENCODE_UTF16:  mReadFunc = &CharStrmReader::ReadNextCharUTF16; break;
        case FONT_ENCODE_SJIS:   mReadFunc = &CharStrmReader::ReadNextCharSJIS; break;
        case FONT_ENCODE_CP1252:
        default:                 mReadFunc = &CharStrmReader::ReadNextCharCP1252; break;
    }
}

} // namespace ut
} // namespace nw4r