Use sane smaller data types for data in section.bin (#188)
## Summary * Update EpdFontFamily::Style to be u8 instead of u32 (saving 3 bytes per word) * Update layout width/height to be u16 from int * Update page element count to be u16 from u32 * Update text block element count to be u16 from u32 * Bumped section bin version to version 8
This commit is contained in:
@@ -33,10 +33,10 @@ class ChapterHtmlSlimParser {
|
||||
int fontId;
|
||||
float lineCompression;
|
||||
bool extraParagraphSpacing;
|
||||
int viewportWidth;
|
||||
int viewportHeight;
|
||||
uint16_t viewportWidth;
|
||||
uint16_t viewportHeight;
|
||||
|
||||
void startNewTextBlock(TextBlock::BLOCK_STYLE style);
|
||||
void startNewTextBlock(TextBlock::Style style);
|
||||
void makePages();
|
||||
// XML callbacks
|
||||
static void XMLCALL startElement(void* userData, const XML_Char* name, const XML_Char** atts);
|
||||
@@ -45,8 +45,8 @@ class ChapterHtmlSlimParser {
|
||||
|
||||
public:
|
||||
explicit ChapterHtmlSlimParser(const std::string& filepath, GfxRenderer& renderer, const int fontId,
|
||||
const float lineCompression, const bool extraParagraphSpacing, const int viewportWidth,
|
||||
const int viewportHeight,
|
||||
const float lineCompression, const bool extraParagraphSpacing,
|
||||
const uint16_t viewportWidth, const uint16_t viewportHeight,
|
||||
const std::function<void(std::unique_ptr<Page>)>& completePageFn,
|
||||
const std::function<void(int)>& progressFn = nullptr)
|
||||
: filepath(filepath),
|
||||
|
||||
Reference in New Issue
Block a user