We never had Open Graph on the casino, and adding meta tags would not have fixed it. Every route was behind requirePlayer, so a link pasted into a chat window got a 302 to sign-in and unfurled as whatever the auth screen said: "parodia.dev", no image, no description. Tags on a page a stranger cannot fetch are tags nobody reads. So the casino now has a front door — a real page, served to anybody, that says what the place is and offers a way in. You still can't play from it, and every table still bounces you to sign-in. The share card is drawn in Go rather than checked in as a picture, because the casino has two names on a clock and the card keeps the joke: paste the link in daylight and you get Casinopolis on green felt, paste it after six and the neon is on and it says Casino Night Zone. Same roomAt() rule as everywhere else, except the clock that decides is the server's — an unfurl bot has no evening of its own. Both cards are drawn once, at first ask, and kept. Two things worth keeping from building it. color.RGBA is alpha-premultiplied, and the lamp over the table wrote raw channels next to a low alpha, which is not a dim glow but an invalid colour: image/draw ran it past 255 and wrapped the hue, and the first card came out with a blue dome over a green stripe. If a colour here ever comes out impossible, look for a missing premultiply. And og:image has to be an absolute URL that actually resolves, which is two different addresses depending on how you arrived: /og.png on the games host (hostRouter puts the /games back on) and /games/og.png anywhere else. The dev rig advertised the first while serving only the second. The test now reads the URL off the page and goes and fetches it, on both hosts, because an og:image that 404s is worth exactly as much as no og:image. Fredoka is vendored (OFL) — the page can reach for a font over the network and a server drawing a PNG cannot. Claude-Session: https://claude.ai/code/session_013M5nD7PgUboJXoDcYHzpuJ
9 lines
464 B
Plaintext
9 lines
464 B
Plaintext
Fredoka is copyright the Fredoka Project Authors
|
|
(https://github.com/hafontia/Fredoka), licensed under the SIL Open Font
|
|
License, Version 1.1: https://openfontlicense.org
|
|
|
|
It is vendored here because the share card (games_og.go) is drawn on the
|
|
server, and a server cannot reach for a font over the network the way the
|
|
page does. The site itself still loads Fredoka from Google's CDN, so this is
|
|
the same typeface arriving by a second road, not a second typeface.
|