Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix fret position label, especially at small sizes #52

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bkeepers
Copy link
Contributor

@bkeepers bkeepers commented Dec 24, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant