Add font foverrides to reader menu
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -394,6 +394,8 @@ bool JsonSettingsIO::saveRecentBooks(const RecentBooksStore& store, const char*
|
||||
obj["coverBmpPath"] = book.coverBmpPath;
|
||||
obj["embeddedStyleOverride"] = book.embeddedStyleOverride;
|
||||
obj["imageRenderingOverride"] = book.imageRenderingOverride;
|
||||
obj["fontFamilyOverride"] = book.fontFamilyOverride;
|
||||
obj["fontSizeOverride"] = book.fontSizeOverride;
|
||||
}
|
||||
|
||||
String json;
|
||||
@@ -428,6 +430,9 @@ bool JsonSettingsIO::loadRecentBooks(RecentBooksStore& store, const char* json)
|
||||
book.coverBmpPath = obj["coverBmpPath"] | std::string("");
|
||||
book.embeddedStyleOverride = clampInt8(obj["embeddedStyleOverride"] | -1, -1, 1, -1);
|
||||
book.imageRenderingOverride = clampInt8(obj["imageRenderingOverride"] | -1, -1, 2, -1);
|
||||
book.fontFamilyOverride =
|
||||
clampInt8(obj["fontFamilyOverride"] | -1, -1, CrossPointSettings::FONT_FAMILY_COUNT - 1, -1);
|
||||
book.fontSizeOverride = clampInt8(obj["fontSizeOverride"] | -1, -1, CrossPointSettings::FONT_SIZE_COUNT - 1, -1);
|
||||
store.recentBooks.push_back(book);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user