widthxheight support
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
defmodule LabelmakerWeb.Constants do
|
||||
@defaults %{
|
||||
color: "black",
|
||||
font: "Helvetica",
|
||||
gravity: "Center",
|
||||
height: "0",
|
||||
label: "",
|
||||
link: "",
|
||||
font: "Helvetica",
|
||||
color: "black",
|
||||
outline: "none",
|
||||
size: "72"
|
||||
size: "72",
|
||||
width: "0"
|
||||
}
|
||||
|
||||
@preview %{
|
||||
@@ -53,8 +56,11 @@ defmodule LabelmakerWeb.Constants do
|
||||
"verdana" => "Verdana"
|
||||
}
|
||||
|
||||
@max_label_length 64
|
||||
@max_label_error "64-character maximum"
|
||||
@max_height 1024
|
||||
@max_width 1024
|
||||
|
||||
@max_label_length 1024
|
||||
@max_label_error "1024-character maximum"
|
||||
|
||||
@sizes 16..128
|
||||
|> Enum.to_list()
|
||||
@@ -73,6 +79,8 @@ defmodule LabelmakerWeb.Constants do
|
||||
|> Enum.map(fn color -> color |> String.replace("-MS", "") |> String.replace("-", " ") end)
|
||||
|
||||
def font_map, do: @font_map
|
||||
def max_height, do: @max_height
|
||||
def max_width, do: @max_width
|
||||
def max_label_length, do: @max_label_length
|
||||
def max_label_error, do: @max_label_error
|
||||
def outlines, do: ["none" | @colors]
|
||||
|
||||
Reference in New Issue
Block a user