   ctx.fillStyle = 'white'
   ctx.fillRect 0, 0, canvas.width, canvas.height
 
-draw_title = (text, {font, x, y, gravity}) ->
+draw_title = (text, {font, x, y, gravity}={}) ->
   gravity ||= ''
   ctx.font = font if font
   m = ctx.measureText(text)

        ctx.fillStyle = 'rgb(10,20,30)'
        ctx.fillText chord_name, h_gutter, -3

        fingering = []
        for semitones, degree_index in chord.pitch_classes
          for {string, fret} in intervals_from(root_fingering, semitones)
            fingering.push {string, fret, degree_index}
        fingering = best_fingering_for(chord, pitch) if best_fingering

        position.color = degree_colors[position.degree_index] for position in fingering
        draw_fingerboard fingering, draw_barres: best_fingering

chord_book = (options) ->
  page_count = options.pages

  fingerings = sort_fingerings(fingerings)

  # for fingering in fingerings
  #   console.info finger_count(fingering)
  return fingerings

best_fingering_for = (chord, root_note) ->
  return fingerings_for(chord, root_note)[0]
