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

Added support for dotted barlines. #1387

Merged
merged 3 commits into from
Nov 26, 2017

Conversation

henryso
Copy link
Contributor

@henryso henryso commented Nov 23, 2017

Fixes #1360.

Please review and merge if satisfactory.

@rpspringuel
Copy link
Contributor

Did you add just the one style or is the other style somewhere I'm not seeing?

@henryso
Copy link
Contributor Author

henryso commented Nov 23, 2017

I only added one style that imitates the one in the image. I don't have examples of the other style to try to imitate.

@rpspringuel
Copy link
Contributor

I posted a pdf with a different style. It uses much larger dots (really more like dashes).

@rpspringuel
Copy link
Contributor

I just reupload the image as something that will display directly (you have to download a pdf in order to view it, so it's kind of easy to miss).

I'm running through the tests and have been able to clear at least some (if not all, I'll find out when the tests finish) of the spurious failures by clearing my image cache.

@henryso
Copy link
Contributor Author

henryso commented Nov 24, 2017

Looking at the sample, I think that's more of a typographic difference rather than a variant/style within the typographic style. I think it's best to just have that be a font thing and don't see a need to put another set of glyphs in the current font. I could put this other style in the gregorio font, if you think that OK.

However this does bring up an issue of the difficulty in redefining bar glyphs. The code currently uses font substitution to select bar glyphs based on number of staff lines. This makes it impossible to change the bar glyphs via glyph substitution. The solution is not as simple as an additional level of indirection because sized bars are defined as variant glyphs. I think the solution will have to be an additional level of indirection plus a renaming of bar glyphs, but I need to think about this a bit more.

@rpspringuel
Copy link
Contributor

Looking at the sample, I think that's more of a typographic difference rather than a variant/style within the typographic style. I think it's best to just have that be a font thing and don't see a need to put another set of glyphs in the current font. I could put this other style in the gregorio font, if you think that OK.

That sounds good.

However this does bring up an issue of the difficulty in redefining bar glyphs. The code currently uses font substitution to select bar glyphs based on number of staff lines. This makes it impossible to change the bar glyphs via glyph substitution. The solution is not as simple as an additional level of indirection because sized bars are defined as variant glyphs. I think the solution will have to be an additional level of indirection plus a renaming of bar glyphs, but I need to think about this a bit more.

Would it be possible to use a sort of offset system? I.e. set things up so that the 2, 3, 4, and 5 line variants of the bar lines always have the same relative location to each other in the code points. We would then add a particular offset which corresponds to the number of lines to a base code point which corresponds to the kind of bar line. Changing to a variant bar line, therefore, would be a matter of changing just the base code point (which should be fairly similar to the way our variant glyph system works for other glyphs), while changing the number of lines would be changing the offset.

@henryso
Copy link
Contributor Author

henryso commented Nov 24, 2017

I think it's more straightforward to bring in all the sizes of bars into \GreCP variables (e.g., \GreCPVirgulaTwo, \GreCPVirgulaThree, \GreCPVirgulaFour, \GreCPVirgulaFive, etc.) and have the code that switches number of lines set the variables to be used for the given score (e.g., set \GreCPVirgula to \GreCPVirgulaFour for a 4-line staff). Then the user could map these glyphs directly, even with asterisks if the names in the alternate font are the same. This is my current thought, but I have not dived into the code to see how feasible this implementation is.

@henryso
Copy link
Contributor Author

henryso commented Nov 25, 2017

OK, this should now allow what you need. To use, add:

\grechangeglyph{DivisioMaiorDotted*}{gregorio}{}
\gresetlinesbehinddottedbar{visible}

to your preamble.

@rpspringuel
Copy link
Contributor

rpspringuel commented Nov 25, 2017 via email

@henryso
Copy link
Contributor Author

henryso commented Nov 26, 2017

Added.

@rpspringuel
Copy link
Contributor

Looks good.

@rpspringuel rpspringuel merged commit 2008486 into gregorio-project:develop Nov 26, 2017
@henryso henryso deleted the fix-1360 branch November 26, 2017 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants