News for hackers. Stuff that matters.
Re:Webamp: Winamp 2 in the browser by mjaniczek on Wednesday April 14, 2021 @06:11PM (#26813742)
Very cool! I am particularly intrigued by the "full-colour" bitmap font approach you took. (I'm trying to get a Fallout 2 font into my F2-inspired browser game, and so far I've managed to get PNG-in-SVG-in-OT working in everything except Chrome. Infuriating.)

I want to ask, did you notice any performance hits when wrapping each character in its own <span> with background-image? Do you think that would scale for a page with up to ~2 screens of text at one time?

Re:Webamp: Winamp 2 in the browser by captbaritone on Wednesday April 14, 2021 @06:34PM (#26813930)
I'm a bit lucky here in that the number of characters on the screen at any given time is bounded, so at max we have maybe 50 spans, which should not be a big deal.

I'm not sure how it would scale. In general, if you employ windowing all UI rendering issues are bounded by the number of items visible at a time which can let you get away with a lot of craziness, but if the number of items on the screen is as much as the number of characters on the screen... that could end up being a bit much.

I know a lot of things like that end up using shaders to render text, but that is a lot of added complexity.