Build dynamic SVG and PNG badges with Quarkus. This hands-on tutorial shows Java developers how to use QuickJS4j, Batik, and Qute to create a full badge generator UI.
Couldn't agree more! Your honest take on JavaScript really resonated. QuickJS sounds like an intreresting workaround though, making JS seem almost tolerable. Gotta see it to believe it!
The QuickJS sandboxing is a smart move for production. No filesystem or network access by defalt means you can run untrusted JavaScript safely. The character width calculation in estimateTextWidth is clever, I wouldn't have thought to weight 'm' and 'w' differently. Are you palnning to cache popular badge combinations or would the native startup be fast enough to just generate on demand?
Couldn't agree more! Your honest take on JavaScript really resonated. QuickJS sounds like an intreresting workaround though, making JS seem almost tolerable. Gotta see it to believe it!
The QuickJS sandboxing is a smart move for production. No filesystem or network access by defalt means you can run untrusted JavaScript safely. The character width calculation in estimateTextWidth is clever, I wouldn't have thought to weight 'm' and 'w' differently. Are you palnning to cache popular badge combinations or would the native startup be fast enough to just generate on demand?