Skip to content

Fix #208 — draw |: and :: as abcm2ps does - #213

Merged
sbeitzel merged 1 commit into
developfrom
feature/fix_208
Oct 3, 2026
Merged

sbeitzel merged 1 commit into
developfrom
feature/fix_208

Conversation

@sbeitzel

@sbeitzel sbeitzel commented Oct 3, 2026

Copy link
Copy Markdown
Owner

Fix #208

Repeat signs now draw as abcm2ps 8.14 draws them, checked against both its source and its -g output:

  • |: draws thick, thin, dots, the same as [|: and the mirror image of :|. abcm2ps rewrites |: to [|: before drawing it (draw.c, bar_cnv).
  • :: draws dots, thick, thick, dots. That is abcm2ps's default %%dblrepbar :][: (format.c). The two thick bars stand barlineSeparation apart, edge to edge, because SMuFL has no thick–thick separation. ColumnMetrics.rightPadding is sized from that offset.
  • Repeat dots were set repeatBarlineDotSeparation from the centre of the bar they abut, so the dots of :: ran into its thick bars. That was already true of its start-side dots before this change. They are now measured from the bar's edge, and ColumnMetrics.leftMargin measures the same way. For ::, that means from the thick bar on its anchor rather than from a thin–thick span it no longer has, so the space after a :: is a little tighter.

No API changes. Pages using |: or :: render differently.

Tests

  • |: and [|: mid-line both draw thick, thin, dots, and draw identically.
  • :: mid-line draws two thick bars barlineSeparation apart, with dots on both sides clear of the bars' edges.
  • Replaced the A |: at the end of a line is drawn past the staff end, and again at the start of the next line #197 mid-line test, which assumed :: has a single thick bar.
  • Re-recorded the Canzonetta page snapshot (§14.4 uses both signs). The diff is only bar strokes, dots, and the re-justified system that holds the ::.

Follow-up: #212, a :: written at the start of a source line still loses its end-repeat dots.

🤖 Generated with Claude Code

abcm2ps rewrites `|:` to `[|:` before drawing it (draw.c, bar_cnv), so a
start repeat is thick, thin, dots: the mirror image of `:|`.  CeolKit drew
it thin, thick, dots.  `|:` now draws exactly as `[|:`.

abcm2ps draws `::` as its `%%dblrepbar`, which defaults to `:][:` (format.c):
dots, two thick bars, dots.  CeolKit drew dots, thin, thick, dots.  The two
thick bars stand `barlineSeparation` apart edge to edge (SMuFL has no
thick–thick separation), and the closing padding is sized from that offset.

The repeat dots were set `repeatBarlineDotSeparation` from the *centre* of
the bar they abut.  Against a thin bar that hardly shows; against the thick
bars of `::` the dots ran into them.  They are now measured from the bar's
edge, and `leftMargin` measures the same way — for `::` from the thick bar
on its anchor, rather than from a thin–thick span it no longer has.

The Canzonetta snapshot (§14.4 has both signs) is re-recorded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sbeitzel
sbeitzel merged commit 71dfc07 into develop Oct 3, 2026
2 checks passed
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