mapbox / shelf-pack

A 2D rectangular bin packing data structure that uses the Shelf Best Height Fit heuristic
ISC License
129 stars 17 forks source link

Expected heights parameter #5

Open bhousel opened 8 years ago

bhousel commented 8 years ago

Should be able to specify a expected shelf heights. This helps guard against the possibility of setting aside an entire shelf for a few unusually short early outliers.

For example, if we are packing glyphs and the first few glyphs happen to be short-height punctuation characters like ^ ., ,. They would get assigned their own shelf that is mostly wasted space.