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:
@@ -124,7 +124,19 @@ init script:
|
||||
)
|
||||
else base
|
||||
}
|
||||
|
||||
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:
|
||||
symbol:
|
||||
@@ -135,6 +147,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
|
||||
@@ -248,22 +264,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: 3
|
||||
symbol font:
|
||||
name: magic-embossedletters
|
||||
size: 22
|
||||
alignment: bottom center
|
||||
size: {name_font_size()}
|
||||
alignment: bottom center justify-all
|
||||
always symbol: true
|
||||
############################# Image
|
||||
image:
|
||||
@@ -450,22 +462,15 @@ extra card style:
|
||||
render style: image
|
||||
image: { card_ptbox() }
|
||||
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: 2
|
||||
visible: { card.name != "" }
|
||||
render style: image
|
||||
image: /magic-new-token.mse-style/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
|
||||
@@ -473,9 +478,7 @@ extra card style:
|
||||
render style: image
|
||||
image: /magic-new-token.mse-style/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
|
||||
|
||||
Reference in New Issue
Block a user