vexchords icon indicating copy to clipboard operation
vexchords copied to clipboard

Fix fret position label, especially at small sizes

Open bkeepers opened this issue 2 months ago • 0 comments

This improves the layout of text labels, specifically to fix a bug with rendering the position label at small sizes with custom font size.

Given:

draw(
  sel,
  {
    chord: [[1, 1], [2, 1], [3, 2], [4, 3], [5, 3], [6, 1]],
    position: 5,
    barres: [{ fromString: 6, toString: 1, fret: 1 }]
  },
  {
    width: 60,
    height: 80,
    showTuning: false,
    fontSize: 12
  }
);

Before image

After image

[!NOTE]
I know this library has been stagnant for a while, so I'm not sure if my recent PRs will be merged or not. In the meantime, I'll be maintaining a fork with all my improvements at chordbook/vexchords.

bkeepers avatar Dec 24 '24 20:12 bkeepers