# How to increase font without affecting grid spacing?

Here's an example of the problem, say you have a Grid with particular spacings that looks like this:

disk = Graphics[Disk[], ImageSize -> 10];
opts = {Alignment -> Right, Spacings -> {{0.5, {0.5, 0.5, 0.5, 2}}, .5}};
grid = {If[Mod[#, 4] == 0, ToString@#, ""] & /@ Range[12], Table[disk, 12]};
Grid[grid, BaseStyle -> 10, Sequence @@ opts]


You may want to increase the text size a little, however, this changes the spacing which is not desired:

Grid[grid, BaseStyle -> 30, Sequence @@ opts]


I'd like to keep both the size and spacing of dots the same (it's ok for text to extend left over multiple dots). This rules out using ItemSize -> All:

Grid[grid, ItemSize -> All, Dividers -> All, BaseStyle -> 30, Sequence @@ opts]


I'm pretty sure there's an easy trick to doing this. Note: Magnify does not work for me because it won’t preserve my settings when Exported.

1. Since Spacings are in units of current font size, we need to adjust the vertical spacings when font size is changed.

2. We can modify the first row to make use of SpanFromLeft to allow content to extend multiple cells to the left.

grid2 = {If[Mod[#, 4] == 3, ToString@(# + 1),
If[Mod[#, 4] == 0, SpanFromLeft, ""]] & /@ Range[12],
Table[disk, 12]}

Grid[grid2, BaseStyle -> 30,
Spacings -> {{0.5 , {0.5, 0.5, .5, 2}}, .5/12}, Alignment -> Right]


g = Grid[grid, BaseStyle -> 10, Sequence @@ opts]
Magnify[g, 2]

• I can’t use magnify
– M.R.
Dec 11 '20 at 5:33