Skip to content

Commit

Permalink
Ledger Lines default to double width
Browse files Browse the repository at this point in the history
  • Loading branch information
rvilarl committed Jul 4, 2021
1 parent a6dc984 commit 6df8a11
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/stavenote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1119,7 +1119,12 @@ export class StaveNote extends StemmableNote {
ctx.stroke();
};

const style = { ...stave.getStyle(), ...(this.getLedgerLineStyle() || {}) };
const style = {
...stave.getStyle(),
...(this.getLedgerLineStyle() || {
lineWidth: stave.getStyle().lineWidth * Flow.LEDGER_LINE_THICKNESS_MULTIPLIER,
}),
};
this.applyStyle(ctx, style);

// Draw ledger lines below the staff:
Expand Down
1 change: 1 addition & 0 deletions src/tables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ export const Tables = {
STEM_WIDTH: 1.5,
STEM_HEIGHT: 35,
STAVE_LINE_THICKNESS: 1,
LEDGER_LINE_THICKNESS_MULTIPLIER: 2.0, // Gould, Behind Bars: "about twice as thick"
RESOLUTION: RESOLUTION,

/**
Expand Down

0 comments on commit 6df8a11

Please sign in to comment.