mirror of
https://github.com/zeldaret/ss
synced 2026-07-27 06:45:13 -04:00
26af4db82d
* update from dtk-template and start work towards using clangd * include <a> -> "a" * Update build.yml * remove/add non-trivial class in union warning
20 lines
641 B
C++
20 lines
641 B
C++
// 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
|