Added ACC flipping of page
This commit is contained in:
+26
-2
@@ -507,7 +507,28 @@ class EbookReader:
|
||||
Current font scale factor
|
||||
"""
|
||||
return self.settings_manager.get_font_size()
|
||||
|
||||
|
||||
def set_font_family(self, font_family) -> Optional[Image.Image]:
|
||||
"""
|
||||
Set the font family and re-render current page.
|
||||
|
||||
Args:
|
||||
font_family: BundledFont enum value (SERIF, SANS, MONOSPACE) or None for document default
|
||||
|
||||
Returns:
|
||||
PIL Image of the re-rendered page
|
||||
"""
|
||||
return self.settings_manager.set_font_family(font_family)
|
||||
|
||||
def get_font_family(self):
|
||||
"""
|
||||
Get the current font family.
|
||||
|
||||
Returns:
|
||||
Current BundledFont or None if using document default
|
||||
"""
|
||||
return self.settings_manager.get_font_family()
|
||||
|
||||
def set_line_spacing(self, spacing: int) -> Optional[Image.Image]:
|
||||
"""
|
||||
Set line spacing using pyWebLayout's native support.
|
||||
@@ -989,6 +1010,8 @@ class EbookReader:
|
||||
line_spacing = self.page_style.line_spacing
|
||||
inter_block_spacing = self.page_style.inter_block_spacing
|
||||
word_spacing = self.page_style.word_spacing
|
||||
font_family = self.get_font_family()
|
||||
font_family_name = font_family.name if font_family else "Default"
|
||||
|
||||
# Use the Settings sub-application
|
||||
overlay_subapp = self._overlay_subapps[OverlayState.SETTINGS]
|
||||
@@ -997,7 +1020,8 @@ class EbookReader:
|
||||
font_scale=font_scale,
|
||||
line_spacing=line_spacing,
|
||||
inter_block_spacing=inter_block_spacing,
|
||||
word_spacing=word_spacing
|
||||
word_spacing=word_spacing,
|
||||
font_family=font_family_name
|
||||
)
|
||||
|
||||
# Update state
|
||||
|
||||
Reference in New Issue
Block a user