nw4r ut almost matching

This commit is contained in:
elijah-thomas774
2024-05-05 22:27:50 -04:00
parent 126c5db943
commit 344348bc05
39 changed files with 2477 additions and 346 deletions
+25
View File
@@ -0,0 +1,25 @@
#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