label: Add Square28 preset
All checks were successful
/ build (push) Successful in 5s

This commit is contained in:
Simon Bruder 2024-07-19 18:02:28 +02:00
parent 40497e83ab
commit 47bd048199
Signed by: simon
GPG key ID: 347FF8699CDA0776

View file

@ -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 × 28mm",
}
)
}
@ -117,6 +119,26 @@ impl Into<LabelConfig> 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,
}),
},
}
}
}