diff --git a/src/escpos/job.rs b/src/escpos/job.rs index 5a0a75f..7910ba4 100644 --- a/src/escpos/job.rs +++ b/src/escpos/job.rs @@ -21,11 +21,20 @@ pub enum BARType { EAN13 = 0x43, UPCA = 0x41, } - pub enum ImageOrientation { Preserve, Largest, } +#[repr(u8)] +pub enum JustifyOrientation {} + +#[repr(u8)] +pub enum TextEffect { + DoubleHeight = 16, + Bold = 8, + DoubleWidth = 32, + Justify(JustifyOrientation) = b'a', +} pub struct Job { pub ready: bool, @@ -46,6 +55,11 @@ impl Job { } } + pub fn write_feed(&mut self, amount: Option) -> () { + let amount = amount.unwrap_or(1); + self.content.extend_from_slice(&[0x1B, b'd', amount]) + } + // pub fn write_text(&mut self, text: String, ) pub fn write_bitmap( &mut self, img: &DynamicImage,