Accidentally made art...

a month ago by Ephera to c/programmerhumor

Trying to figure out how to best add text to an SVG, I thought maybe it doesn't show up because it's black-on-black, so I gave it stroke="white" before realizing I need to zoom out. Well, and stroke means the outline in SVG, so on the white background, it just makes the font look really thin.

This is the whole code:

<svg viewBox="0 -5 40 10" xmlns="http://www.w3.org/2000/svg">
  <text stroke="white">hello</text>
  <circle id="myCircle" cx="5" cy="5" r="4" />
  <use href="#myCircle" x="10" fill="blue" />
  <use href="#myCircle" x="20" fill="white" stroke="red" />
</svg>

And most of that is just this MDN example: https://developer.mozilla.org/...

It does use my default font, which is Fira Sans. Will look different on other systems.

Ephera 22 points a month ago

By the way, I did not procrastinate posting this since July 25th. The file name does not say 2026-07-25. That did not happen. Nuh-uh.

🫠

path: 0 25845717, hotness: undefined, score: 22, children: 1
NeatNit 4 points a month ago

That would be ridiculous! You'll never catch me procrastinating anything for that long, either. I'm sure there's a perfectly good alternative explanation for where that filename came from.

path: 0 25845717 25857532, hotness: undefined, score: 4, children: 0
programmerhumor
programmerhumor

@lemmy.ml

login for more options
43730
1627
1156

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.

go to feed...