I've re-written the "ascii sizer" algorithm and am making it available at this location:
http://stonestoryrpg.com/StandardcombosAsciiSizer.csThis concludes an important step in the porting. The game now automatically switches to the best font and rebuilds the grid at runtime if it detects a change in screen size.
The new version is faster and reduces padding and clipping margins. I've also tightened the row constraint from 24-28 to 25-27 rows, for a more consistent result across devices.
Here is the updated list of fonts. #p denotes priority to be implemented. In parenthesis are easy ways to modify another font size to achieve it:
7x12 #p0
10x19
13x24 (14x25 - 1x0)
14x25 #p0 (7x12 * 2 + 0x1)
15x28
16x28 #p1 (16x29 - 0x1)
16x29 #p0
16x30 (16x29 + 0x1)
18x32
20x36 (10x19 * 2 - 0x2)
22x40 #p0
22x41
25x46
26x46
27x48
32x59 #p0 (16x29 * 2 + 0x1)
35x64
45x82 #p1 (22x40 * 2 + 1x2)
Screen sizes and their outcomes with the new algorithm:
Resolution, Aspect Ratio (Devices)
grid size | font size = used pixels (padding)
480x320, 3:2 (Android HVGA)
68x26 | 7x12 = 476x312 (+4, +8)
800x480, 5:3 (Android WVGA800)
80x25 | 10x19 = 800x475 (0, +5)
854x480, 16:9 (Android WVGA854)
85x25 | 10x19 = 850x475 (+4, +5)
1024x600, 1024:600 (Android)
78x25 | 13x24 = 1014x600 (+10, 0)
960x640, 3:2 (iPhone 4s, Android)
68x25 | 14x25 = 952x625 (+8, +15)
1136x640, 16:9 (iPhone 5)
81x25 | 14x25 = 1134x625 (+2, +15)
1280x720, 16:9 (Youtube)
80x25 | 16x29 = 1280x725 (0, -5)
1334x750, 16:9 (iPhone 6)
83x25 | 16x30 = 1328x750 (+6, 0)
1024x768, 4:3 (PC, iPad Mini, iPad2, Android)
64x27 | 16x28 = 1024x756 (0, +12)
1280x768, 5:3 (Android)
80x27 | 16x28 = 1280x756 (0, +12)
1366x768, 16:9 (PC)
91x27 | 15x28 = 1365x756 (+1, +12)
1280x800, 8:5 (PC, Android WXGA)
71x25 | 18x32 = 1278x800 (+2, 0)
1440x900, 8:5 (PC)
72x25 | 20x36 = 1440x900 (0, 0)
1600x900, 16:9 (PC)
80x25 | 20x36 = 1600x900 (0, 0)
1280x1024, 5:4 (PC)
58x25 | 22x41 = 1276x1025 (+4, -1)
1920x1080, 16:9 (PC, iPhone 6+)
87x27 | 22x40 = 1914x1080 (+6, 0)
1546x1152, 4:3 (Android)
62x25 | 25x46 = 1550x1150 (-4, +2)
1920x1152, 5:3 (Android)
74x25 | 26x46 = 1924x1150 (-4, +2)
1920x1200, 8:5 (Android)
71x25 | 27x48 = 1917x1200 (+3, 0)
2048x1536, 4:3 (iPad mini 2/3/4, iPad3, iPad Air/2, Android)
64x26 | 32x59 = 2048x1534 (0, +2)
2560x1536, 5:3 (Android)
80x26 | 32x59 = 2560x1534 (0, +2)
2560x1600, 8:5 (Android)
73x25 | 35x64 = 2555x1600 (+5, 0)
2732x2048, 4:3 (iPad Pro)
60x25 | 45x82 = 2700x2050 (+32, -2)