Hi tone
I tested your code on 2.18.2 (doesn't compile)
and on 2.19.24 (looks NOTHING like what you have)
I think the first issue I would solve is - why? why does it not look correct on other versions. I only mention it because all your work could become useless once you upgrade.
As a side note there are other approaches. I am not sure the best for your case, but I have used \halign #x and \center-column\text in and out of "joint" markups. In other words "joint" meaning create the fret diagram then the chord name, and position them together in a markup, or use two separate markups with \halign.
something like this. Of course positioned wherever needed.
\markup \fill-line {
\concat{
%% chord 1
\override #'(size . .7) \override #'(fret-diagram-details . ((finger-code . below-string)
(dot-radius . 0.35)
(number-type . roman-lower)
(finger-code . below-string)
(fret-count . 3)))
\halign #-.72
\raise #0 \pad-around #.2 {
\center-column\text {
\halign #-13 \fontsize #-2.5 {
Am
}
\vspace #-.6
\fret-diagram #"6-x;5-o;4-2-2;3-2-3;2-1-1;1-o;"
}
}
}
}
Of course just looking at your code a quick solution for what you have may be to add space. so fret "4" would be "4 " and then us \halign for minor adjustments. Not sure as I haven't tested it since they don't compile correctly on my systems.
HTH
Stephen