feat: Support for Korean line breaks and glyph spacing (#2288)

Co-authored-by: Uri Tauber <uritaube@gmail.com>
This commit is contained in:
Justin Mitchell
2026-06-17 17:27:03 +03:00
committed by GitHub
co-authored by Uri Tauber
parent d4069aeae5
commit 22f3575064
16 changed files with 443 additions and 121 deletions
+16 -3
View File
@@ -2,6 +2,7 @@
#include <FsHelpers.h>
#include <HalStorage.h>
#include <Memory.h>
#include "CrossPointSettings.h"
#include "Epub.h"
@@ -29,7 +30,11 @@ std::unique_ptr<Epub> ReaderActivity::loadEpub(const std::string& path) {
return nullptr;
}
auto epub = std::unique_ptr<Epub>(new Epub(path, "/.crosspoint"));
auto epub = makeUniqueNoThrow<Epub>(path, "/.crosspoint");
if (!epub) {
LOG_ERR("READER", "Failed to allocate EPUB object");
return nullptr;
}
if (epub->load(true, SETTINGS.embeddedStyle == 0)) {
return epub;
}
@@ -44,7 +49,11 @@ std::unique_ptr<Xtc> ReaderActivity::loadXtc(const std::string& path) {
return nullptr;
}
auto xtc = std::unique_ptr<Xtc>(new Xtc(path, "/.crosspoint"));
auto xtc = makeUniqueNoThrow<Xtc>(path, "/.crosspoint");
if (!xtc) {
LOG_ERR("READER", "Failed to allocate XTC object");
return nullptr;
}
if (xtc->load()) {
return xtc;
}
@@ -59,7 +68,11 @@ std::unique_ptr<Txt> ReaderActivity::loadTxt(const std::string& path) {
return nullptr;
}
auto txt = std::unique_ptr<Txt>(new Txt(path, "/.crosspoint"));
auto txt = makeUniqueNoThrow<Txt>(path, "/.crosspoint");
if (!txt) {
LOG_ERR("READER", "Failed to allocate TXT object");
return nullptr;
}
if (txt->load()) {
return txt;
}