3 ms·
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,
by mjaniczek 6y ago
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?
- captbaritone 6y agoI'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.