pub struct SnapcompactRenderOptions {
pub size: u32,
pub font: Option<String>,
pub cell_width: Option<u32>,
pub cell_height: Option<u32>,
pub variant: Option<String>,
pub line_repeat: Option<u32>,
pub stretch: Option<bool>,
pub columns: Option<u32>,
}Expand description
Shape options for one snapcompact frame.
Fields§
§size: u32Frame width in pixels; also bounds the grid rows
(floor(size/cellHeight/lineRepeat)). Output height hugs the rows the
text actually uses instead of padding to a square.
font: Option<String>Bundled font: "5x8", "6x12", "8x13" (X.org BDF), "8x8"
(unscii-8), or "silver" (embedded TrueType). Default "5x8".
cell_width: Option<u32>Target cell advance in pixels. Differing from the font’s natural cell triggers the Lanczos stretch path. Default: font natural width.
cell_height: Option<u32>Target cell pitch in pixels. Default: font natural height.
variant: Option<String>Ink variant: "sent" (six-hue sentence cycling) or "bw" (black).
Default "sent".
line_repeat: Option<u32>Print each text line this many times; copies after the first sit on a pale highlight band. Default 1.
stretch: Option<bool>Stretch behavior. Unset: auto — Lanczos-stretch whenever the target
cell differs from the font’s natural cell. false: never stretch —
render indexed with glyphs at natural size on the requested cell box
(e.g. 8x13 glyphs on an 8x16 pitch, the “8on16” shapes). true: force
the stretch path (identical to auto; natural cells render indexed).
columns: Option<u32>Layout columns: 1 (default) row-major grid; 2 two newspaper “doc”
columns of pre-wrapped newline-separated lines.
Trait Implementations§
Source§impl Clone for SnapcompactRenderOptions
impl Clone for SnapcompactRenderOptions
Source§fn clone(&self) -> SnapcompactRenderOptions
fn clone(&self) -> SnapcompactRenderOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more