Cinder-SdfText icon indicating copy to clipboard operation
Cinder-SdfText copied to clipboard

Feature request: use bin packing instead of fixed spacing.

Open paulhoux opened this issue 8 years ago • 1 comments

More glyphs would fit on a single texture if bin packing were used. For this kind of stuff, offline bin packing can be used when adding many characters at once (or when doing an optimization step) and online bin packing can be used when adding one character at a time.

I happen to have a bin packing implementation ready for use, let me know if you're interested. It's not perfect and starts to slow down when packing >1000 glyphs, but it's a start. This will complicate texture creation, but only marginally.

-Paul

paulhoux avatar Jul 27 '16 09:07 paulhoux

See: https://github.com/paulhoux/Cinder/tree/bin_packing

paulhoux avatar Jul 27 '16 15:07 paulhoux