Skip to content

A free open source IT asset/license management system

more adjustments to labels

Godfrey M12040562fc38
diff --git a/app/Models/Labels/CustomLabels/Concerns/HasCustomLabelEditorSections.php b/app/Models/Labels/CustomLabels/Concerns/HasCustomLabelEditorSections.php
index aa11f40d5b..5abe0b18f8 100644
--- a/app/Models/Labels/CustomLabels/Concerns/HasCustomLabelEditorSections.php
+++ b/app/Models/Labels/CustomLabels/Concerns/HasCustomLabelEditorSections.php
@@ -78,7 +78,13 @@ trait HasCustomLabelEditorSections
'label' => 'admin/labels/general.groups.tag',
'toggle' => 'supports.asset_tag',
'fields' => [
- 'tag_font' => ['type' => 'text'],
+ 'tag_font' => ['type' => 'select',
+ 'options' => [
+ 'freemono' => 'admin/labels/general.options.freemono',
+ 'freesans' => 'admin/labels/general.options.freesans',
+ 'dejavusans' => 'admin/labels/general.options.dejavusans',
+ ],
+ ],
'tag_font_size' => ['type' => 'number'],
'tag_alignment' => [
'type' => 'select',
@@ -97,7 +103,13 @@ trait HasCustomLabelEditorSections
'label' => 'admin/labels/general.groups.title',
'toggle' => 'supports.title',
'fields' => [
- 'title_font' => ['type' => 'text'],
+ 'title_font' => ['type' => 'select',
+ 'options' => [
+ 'freemono' => 'admin/labels/general.options.freemono',
+ 'freesans' => 'admin/labels/general.options.freesans',
+ 'dejavusans' => 'admin/labels/general.options.dejavusans',
+ ],
+ ],
'title_font_size' => ['type' => 'number'],
'title_margin' => ['type' => 'number'],
'title_offset_x' => ['type' => 'number'],
@@ -116,7 +128,13 @@ trait HasCustomLabelEditorSections
'label' => 'admin/labels/general.groups.field_labels',
'toggle' => 'supports.fields',
'fields' => [
- 'field_label_font' => ['type' => 'text'],
+ 'field_label_font' => ['type' => 'select',
+ 'options' => [
+ 'freemono' => 'admin/labels/general.options.freemono',
+ 'freesans' => 'admin/labels/general.options.freesans',
+ 'dejavusans' => 'admin/labels/general.options.dejavusans',
+ ],
+ ],
'field_label_font_size' => ['type' => 'number'],
'field_label_margin' => ['type' => 'number'],
],
@@ -126,7 +144,13 @@ trait HasCustomLabelEditorSections
'label' => 'admin/labels/general.groups.field_values',
'toggle' => 'supports.fields',
'fields' => [
- 'field_value_font' => ['type' => 'text'],
+ 'field_value_font' => ['type' => 'select',
+ 'options' => [
+ 'freemono' => 'admin/labels/general.options.freemono',
+ 'freesans' => 'admin/labels/general.options.freesans',
+ 'dejavusans' => 'admin/labels/general.options.dejavusans',
+ ],
+ ],
'field_value_font_size' => ['type' => 'number'],
'field_value_margin' => ['type' => 'number'],
],
diff --git a/app/Models/Labels/Tapes/Dymo/LabelWriter_1933081.php b/app/Models/Labels/Tapes/Dymo/LabelWriter_1933081.php
index 1017adc0b7..76f23dd974 100644
--- a/app/Models/Labels/Tapes/Dymo/LabelWriter_1933081.php
+++ b/app/Models/Labels/Tapes/Dymo/LabelWriter_1933081.php
@@ -124,15 +124,19 @@ class LabelWriter_1933081 extends LabelWriter
'tag_font_size' => $this->getTagSize(),
'tag_alignment' => 'C',
'tag_position_mode' => 'under_barcode',
+ 'tag_font' => 'freesans',
- 'title_font_size' => $this->getTitleSize(),
+ 'title_font_size' => 3.8,
'title_margin' => $this->getTitleMargin(),
+ 'title_font' => 'freesans',
'field_label_font_size' => $this->getLabelSize(),
'field_label_margin' => $this->getLabelMargin(),
+ 'field_label_font' => 'freesans',
'field_value_font_size' => $this->getFieldSize(),
'field_value_margin' => $this->getFieldMargin(),
+ 'field_value_font' => 'freemono',
'text_render_mode' => 'block',
];
diff --git a/app/Models/Labels/Tapes/Dymo/LabelWriter_2112283.php b/app/Models/Labels/Tapes/Dymo/LabelWriter_2112283.php
index 3cd86da3ef..bfe7de2866 100644
--- a/app/Models/Labels/Tapes/Dymo/LabelWriter_2112283.php
+++ b/app/Models/Labels/Tapes/Dymo/LabelWriter_2112283.php
@@ -124,15 +124,19 @@ class LabelWriter_2112283 extends LabelWriter
'tag_font_size' => $this->getTagSize(),
'tag_alignment' => 'C',
'tag_position_mode' => 'under_barcode',
+ 'tag_font' => 'freesans',
- 'title_font_size' => $this->getTitleSize(),
+ 'title_font_size' => 3.8,
'title_margin' => $this->getTitleMargin(),
+ 'title_font' => 'freesans',
'field_label_font_size' => $this->getLabelSize(),
'field_label_margin' => $this->getLabelMargin(),
+ 'field_label_font' => 'freesans',
'field_value_font_size' => $this->getFieldSize(),
'field_value_margin' => $this->getFieldMargin(),
+ 'field_value_font' => 'freemono',
'text_render_mode' => 'block',
];
diff --git a/app/Models/Labels/Tapes/Dymo/LabelWriter_2112284.php b/app/Models/Labels/Tapes/Dymo/LabelWriter_2112284.php
index 1964f033b2..31a712ef80 100644
--- a/app/Models/Labels/Tapes/Dymo/LabelWriter_2112284.php
+++ b/app/Models/Labels/Tapes/Dymo/LabelWriter_2112284.php
@@ -68,6 +68,44 @@ class LabelWriter_2112284 extends LabelWriter
return true;
}
+ protected function getContentEditorConfig(): array
+ {
+ return [
+
+ 'barcode_size' => self::TAG_SIZE,
+ 'barcode_margin' => self::BARCODE_MARGIN,
+
+ 'barcode1D_v_align' => 'B',
+ 'barcode1D_placement' => 'text_column',
+
+
+ 'barcode_2d_size' => $this->getPrintableArea()->h - self::TAG_SIZE,
+ 'barcode2D_h_align' => 'L',
+ 'barcode2D_v_align' => 'T',
+
+
+ 'tag_font_size' => self::TAG_SIZE,
+ 'tag_alignment' => 'C',
+ 'tag_position_mode' => 'under_barcode',
+ 'tag_font' => 'freesans',
+
+
+ 'title_font_size' => self::TITLE_SIZE,
+ 'title_margin' => self::TITLE_MARGIN,
+ 'title_font' => 'freesans',
+
+
+ 'field_label_font_size' => self::LABEL_SIZE,
+ 'field_label_margin' => self::LABEL_MARGIN,
+ 'field_label_font' => 'freesans',
+
+ 'field_value_font_size' => self::FIELD_SIZE,
+ 'field_value_margin' => self::FIELD_MARGIN,
+ 'field_value_font' => 'freemono',
+
+ 'text_render_mode' => 'block',
+ ];
+ }
public function preparePDF($pdf)
{
}
diff --git a/app/Models/Labels/Tapes/Dymo/LabelWriter_30252.php b/app/Models/Labels/Tapes/Dymo/LabelWriter_30252.php
index fa5823c663..c680210ba6 100644
--- a/app/Models/Labels/Tapes/Dymo/LabelWriter_30252.php
+++ b/app/Models/Labels/Tapes/Dymo/LabelWriter_30252.php
@@ -60,6 +60,40 @@ class LabelWriter_30252 extends LabelWriter
return true;
}
+ protected function getContentEditorConfig(): array
+ {
+ return [
+ 'barcode_size' => self::TAG_SIZE,
+ 'barcode_margin' => self::BARCODE_MARGIN,
+
+ 'barcode1D_v_align' => 'B',
+ 'barcode1D_placement' => 'text_column',
+
+ 'barcode_2d_size' => $this->getPrintableArea()->h - self::TAG_SIZE,
+ 'barcode2D_h_align' => 'L',
+ 'barcode2D_v_align' => 'T',
+
+ 'tag_font_size' => self::TAG_SIZE,
+ 'tag_alignment' => 'C',
+ 'tag_position_mode' => 'under_barcode',
+ 'tag_font' => 'freemono',
+
+ 'title_font_size' => self::TITLE_SIZE,
+ 'title_margin' => self::TITLE_MARGIN,
+ 'title_font' => 'freesans',
+
+ 'field_label_font_size' => self::LABEL_SIZE,
+ 'field_label_margin' => self::LABEL_MARGIN,
+ 'field_label_font' => 'freesans',
+
+ 'field_value_font_size' => self::FIELD_SIZE,
+ 'field_value_margin' => self::FIELD_MARGIN,
+ 'field_value_font' => 'freemono',
+
+ 'text_render_mode' => 'vertical_stack',
+ ];
+ }
+
public function preparePDF($pdf) {}
public function write($pdf, $record)
diff --git a/resources/lang/en-US/admin/labels/general.php b/resources/lang/en-US/admin/labels/general.php
index 8c89495865..e615c34885 100644
--- a/resources/lang/en-US/admin/labels/general.php
+++ b/resources/lang/en-US/admin/labels/general.php
@@ -78,6 +78,9 @@ return [
'middle' => 'Middle',
'bottom' => 'Bottom',
'inline' => 'Inline',
+ 'freemono' => 'FreeMono',
+ 'freesans' => 'FreeSans',
+ 'dejavusans' => 'DejaVu Sans',
],
'create_label' => 'Create Label',
'label_type' => 'Label Type',