The origin of the fret diagram will be at fret zero, string 1.
The x alignment is adjusted to put the fret diagram over a note
for the fret diagram markup. The y alignment used to be centered,
but now it is not adjusted during creation of the grob.
Add regression test for fret board alignment
(cherry picked from commit
c9457c9c0556da32dac4f07e8cc8236656120eb4)
--- /dev/null
+\header {
+
+ texidoc = "FretBoards should be aligned in the Y direction
+at the fret-zero, string 1 intersection."
+
+}
+
+\version "2.12.2"
+
+\include "predefined-guitar-fretboards.ly"
+
+mychords = \chordmode{
+ c1 f g
+}
+
+<<
+ \context ChordNames {
+ \mychords
+ }
+ \context FretBoards {
+ \mychords
+ }
+>>
dot-pos orientation)
"Draw a capo indicator across the full width of the fret-board
at @var{fret}."
-(let* (;(sth (* th size))
- (capo-thick
+(let* ((capo-thick
(* size (assoc-get 'capo-thickness details 0.5)))
(half-thick (* capo-thick 0.5))
(last-string-pos 0)
fret-diagram-stencil
(label-fret
layout props string-count fret-range size orientation))))
- (ly:stencil-aligned-to
- (ly:stencil-aligned-to fret-diagram-stencil X alignment)
- Y 0)))
+ (ly:stencil-aligned-to fret-diagram-stencil X alignment)))
(define (fret-parse-definition-string props definition-string)
"Parse a fret diagram string and return a pair containing: