Skip to content

Fix NABC inter-syllable overflow spacing and add nabcintersyllablemingap - #1716

Draft
lbssousa wants to merge 1 commit into
gregorio-project:developfrom
lbssousa:fix-issue-1715
Draft

Fix NABC inter-syllable overflow spacing and add nabcintersyllablemingap#1716
lbssousa wants to merge 1 commit into
gregorio-project:developfrom
lbssousa:fix-issue-1715

Conversation

@lbssousa

@lbssousa lbssousa commented Mar 1, 2026

Copy link
Copy Markdown
Contributor

Fixes #1715.

@davidweichiang

Copy link
Copy Markdown
Contributor

In #1720 I'm working on moving everything related to syllablefinalskip into Lua, while this PR adds a dependency on syllablefinalskip. So merging this PR first would create some extra work needed on #1720.

On the other hand, if #1720 were merged first, then managing the space between NABC syllables would become much easier. It would just involve adding a pass to the Lua pre_linebreak filter that looks for consecutive nodes with part=7, and if the distance between them is less than 0, increase the syllablefinalskip node by that amount. Similarly for part=8.

Maybe #1720 can reach a point where it's mergable in a few days. @lbssousa, what do you think about trying this in Lua instead?

@lbssousa

Copy link
Copy Markdown
Contributor Author

Sure, @davidweichiang . I'll try it when your work is ready. We can hold this PR for now.

@rpspringuel rpspringuel added this to the 7.0.0 milestone Mar 18, 2026
@rpspringuel rpspringuel modified the milestones: 7.0.0, 6.3.0 Apr 19, 2026
@rpspringuel
rpspringuel marked this pull request as draft May 3, 2026 19:38
@davidweichiang

Copy link
Copy Markdown
Contributor

@lbssousa Now that #1720 has been merged, I think it will be a lot cleaner to implement this.

gregorio-project#1715)

Replace the per-syllable NABC extrakern mechanism, which widened the
notes box whenever NABC extended past it (even when the natural
inter-syllable spacing was already sufficient), with a minimum-distance
constraint in the Lua syllable-spacing filter introduced by gregorio-project#1720.

The filter now records the zero-width NABC voice boxes (part=7/8) while
scanning syllables and, for each NABC voice present in two consecutive
syllables, widens the syllablefinalskip just enough to keep at least
nabcintersyllablemingap between the end of one syllable's neumes and
the start of the next. Distances are measured on the actual node
list, per voice, so no space is added when the neumes already fit.

The new nabcintersyllablemingap distance (default 0.06 cm, 25% of
intersyllablespacenotes) is configurable via \grechangedim and scales
with the score factor.
@lbssousa

Copy link
Copy Markdown
Contributor Author

@davidweichiang Just refactored here PR after #1720 is merged, but I also depend on PR #1764 do be merged in order to complete this one.

@davidweichiang

Copy link
Copy Markdown
Contributor

What do you need from #1764? Maybe we can cherry-pick those into a separate smaller PR.

@lbssousa

Copy link
Copy Markdown
Contributor Author

Essentially, I need the implementation around bar_syllable_spacing / old_bar_syllable_spacing functions. The end_shift constraint set in bar_syllable_spacing (and old_bar_syllable_spacing) can be extended by this PR with one term per NABC voice.

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.

NABC extrakern causes excessive inter-syllable spacing when natural gap is sufficient

3 participants