From 47bd048199d3d33f92faa6586e886560f9086412 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Fri, 19 Jul 2024 18:02:28 +0200 Subject: [PATCH] label: Add Square28 preset --- src/label/preset.rs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/label/preset.rs b/src/label/preset.rs index 3093686..4a5fcbf 100644 --- a/src/label/preset.rs +++ b/src/label/preset.rs @@ -16,6 +16,7 @@ pub enum LabelPreset { SeikoSlpMrlDataMatrix, SeikoSlpMrlCode128, SeikoSlpMrl, + Square28, } impl fmt::Display for LabelPreset { @@ -27,6 +28,7 @@ impl fmt::Display for LabelPreset { Self::SeikoSlpMrlDataMatrix => "Seiko SLP MRL (Data Matrix only)", Self::SeikoSlpMrlCode128 => "Seiko SLP MRL (Code128 only)", Self::SeikoSlpMrl => "Seiko SLP MRL", + Self::Square28 => "Square 28 × 28 mm", } ) } @@ -117,6 +119,26 @@ impl Into for LabelPreset { wrap: None, }), }, + Self::Square28 => LabelConfig { + width: Mm(20.0), + height: Mm(24.0), + data_matrix: Some(DataMatrixConfig { + scale: Mm(20.0), + position: (Mm(0.0), Mm(4.0)), + }), + code128: None, + id_text: Some(TextConfig { + font_size: 5.0, + position: (Mm(0.0), Mm(2.0)), + wrap: Some(19), + }), + short_id_text: None, + branding: Some(TextConfig { + font_size: 4.0, + position: (Mm(17.0), Mm(0.5)), + wrap: None, + }), + }, } } }