This pull request optimizes the number of columns and rows in grid mode. Previously, you could easily end up with a 3x2 instead of 2x2 grid with 4 elements, or a 4x2 instead of 3x2 grid for 5 elements.
Example:
set grid_mode
viewport 800, 400
fragment gly, m1
fragment gly, m2
fragment gly, m3
fragment gly, m4
This pull request optimizes the number of columns and rows in grid mode. Previously, you could easily end up with a 3x2 instead of 2x2 grid with 4 elements, or a 4x2 instead of 3x2 grid for 5 elements.
Example: