Skip to content

Instantly share code, notes, and snippets.

@rben01
Last active February 22, 2023 23:10
Show Gist options
  • Save rben01/c0f51d8481c3ba8bd0ac108ac0b5ace8 to your computer and use it in GitHub Desktop.
Save rben01/c0f51d8481c3ba8bd0ac108ac0b5ace8 to your computer and use it in GitHub Desktop.
Homer Simpson
{
"attrs": { "viewBox": "0 0 540 341" },
"vars": {
"textX": 270,
"textFill": "white",
"textStroke": "black",
"textAnchor": "middle",
"textBaseline": "central",
"textFont": "sans-serif",
"textSize": "100px"
},
"children": [
{
"tag": "image",
"attrs": {
"href": "https://metro.co.uk/wp-content/uploads/2017/01/ezgif-com-crop-33.gif?quality=90&strip=all&zoom=1&resize=540%2C341",
"x": 0,
"y": 0,
"width": 540,
"height": 341
}
},
{
"tag": "g",
"attrs": {
"text-anchor": "{textAnchor}",
"fill": "{textFill}",
"stroke": "{textStroke}",
"font-family": "{textFont}",
"font-size": "{textSize}"
},
"children": [
{
"tag": "text",
"text": "Homer",
"attrs": {
"x": "{textX}",
"y": 80,
"dominant-baseline": "{textBaseline}"
}
},
{
"tag": "text",
"text": "Simpson",
"attrs": {
"x": "{textX}",
"y": 261,
"dominant-baseline": "{textBaseline}"
}
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment