fix 8ED tokens name formula (#38)

* change resize formula to be character-based
* add embossed letters for accent, grave, circumflex, and overdots (à, á, â, ä) for aeiou.

---------

Co-authored-by: cajun <12363371+CajunAvenger@users.noreply.github.com>
This commit is contained in:
cajun
2024-03-06 02:01:34 -06:00
committed by GitHub
parent 3c4f3b5086
commit c8982ea81c
28 changed files with 31914 additions and 12045 deletions

View File

@@ -66,6 +66,18 @@ init script:
paintbrush_color := { if font_white() then "white" else "black" }
card_shape := { "token" }
name_font_size := {
nl := length(card.name)-14
gv := to_number(styling.name_font_size)
if gv != 0
then gv
else if nl < 0
then 21
else if nl < 9
then 21 - nl
else
13
}
############################################################## Set info fields
set info style:
@@ -77,6 +89,10 @@ set info style:
fill color: rgb(255,255,255)
border color: rgb(0,0,0)
############################################################## Extra style
styling field:
type: text
name: name font size
description: Override the font size for the token's name. Default is 21.
styling field:
type: boolean
name: grey hybrid typeline
@@ -174,22 +190,18 @@ card style:
image: { color_background(type:"card" + text_shape(), base_hybrid:card_hybrid) }
###################C######### Name line
name:
left:
{ if card_style.name.content_width > 269 then 50
else card_style.name.content_width * -0.5 + 184.5 }
top: 23
width:
{ if card_style.name.content_width > 269 then 275
else card_style.name.content_width + 6 }
left: {max(50, 183.5 - 10*length(card.name))}
top: 25
width: {min(275, 6+20*length(card.name))}
height: 28
alignment: bottom center justify-all
alignment: middle center
padding bottom: -2
padding top: 2
z index: 2
symbol font:
name: magic-embossedletters
size: 22
alignment: bottom center
size: {name_font_size()}
alignment: bottom center justify-all
always symbol: true
############################# Image
image:
@@ -397,22 +409,15 @@ extra card style:
render style: image
image: {if styling.overlay == "" then nil else styling.overlay + "/overlay.png"}
name box:
left:
{ if card_style.name.content_width > 275 then 50
else card_style.name.content_width * -0.5 + 185.5 }
left: {max(50, 183.5 - 10*length(card.name))}
top: 26
width:
{ if card_style.name.content_width > 275 then 275
else card_style.name.content_width + 3}
width: {min(275, 6+20*length(card.name))}
height: 35
z index: 1
visible: { card.name != "" }
render style: image
image: name-mid.png
name box left:
right:
{ if card_style.name.content_width > 275 then 50
else card_style.name.content_width * -0.5 + 185.5 }
right: {max(50, 183.5 - 10*length(card.name))}
top: 26
width: 15
height: 35
@@ -420,9 +425,7 @@ extra card style:
render style: image
image: name-left.png
name box right:
left:
{ if card_style.name.content_width > 275 then 325
else card_style.name.content_width * 0.5 + 187.5 }
left: {min(325, 189.5 + 10*length(card.name))}
top: 26
width: 14
height: 35