pub struct LayoutHints {
pub base_font_size_px: f32,
pub min_font_size_px: f32,
pub max_font_size_px: f32,
pub min_line_height: f32,
pub max_line_height: f32,
pub text_scale: f32,
}Expand description
Safe layout hint clamps for text style normalization.
Fields§
§base_font_size_px: f32Default base font size in pixels.
min_font_size_px: f32Lower clamp for effective font size.
max_font_size_px: f32Upper clamp for effective font size.
min_line_height: f32Lower clamp for effective line-height multiplier.
max_line_height: f32Upper clamp for effective line-height multiplier.
text_scale: f32Global text scale multiplier applied after CSS size resolution.
This lets reader UIs scale books even when EPUB CSS uses fixed px sizes.
Trait Implementations§
Source§impl Clone for LayoutHints
impl Clone for LayoutHints
Source§fn clone(&self) -> LayoutHints
fn clone(&self) -> LayoutHints
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LayoutHints
impl Debug for LayoutHints
Source§impl Default for LayoutHints
impl Default for LayoutHints
Source§impl PartialEq for LayoutHints
impl PartialEq for LayoutHints
impl Copy for LayoutHints
impl StructuralPartialEq for LayoutHints
Auto Trait Implementations§
impl Freeze for LayoutHints
impl RefUnwindSafe for LayoutHints
impl Send for LayoutHints
impl Sync for LayoutHints
impl Unpin for LayoutHints
impl UnsafeUnpin for LayoutHints
impl UnwindSafe for LayoutHints
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more