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

Missing torculus resupinus flexus #18

Closed
olivierberten opened this issue Dec 31, 2014 · 12 comments
Closed

Missing torculus resupinus flexus #18

olivierberten opened this issue Dec 31, 2014 · 12 comments
Assignees
Milestone

Comments

@olivierberten
Copy link

Here are some samples from the dominican Graduale: in these, the first interval is 1 or 2. In the last one, the first interval is 1 but the last note is a liquescence.
dominican neumes 2

dominican neumes 3

dominican neumes 4

@henryso
Copy link
Contributor

henryso commented Mar 27, 2015

Continuing the discussion from duplicate #155 and not knowing (Lua)TeX well enough to know if this is a silly question: Would it be possible to superimpose two glyphs on top of each other? For this particular neume, if this were possible, you could compose a glyph consisting of the first note and a line to the second pitch with a glyph containing the rest of the neume.

@olivierberten
Copy link
Author

Well... One of the points of Gregorio is, unlike other systems, to precompose all glyphs in the font for a more precise result (see http://home.gna.org/gregorio/gregoriotex/fonts.fr sorry it's only in french).

@eroux
Copy link
Contributor

eroux commented Mar 27, 2015

Wow, that file is so outdated... Anyway, that's true, but for 5 notes glyphs, precomposing them is just too much (it would multiply the font size by 3 at least, just for this rare glyph), so we have to compose them in TeX. The best way to do that is to precompose (for all ambitus):

  • a punctum with a bar on the top right, where the bar is just a little higher than usual so that it melts with the porrectus bar
  • idem with an initio debilis
  • idem with a quilisma
  • idem with an oriscus

also, putting a glyph of the bar (just it) in the font, so that TeX can know the bar width. Then having a \buildtorculusresupinusflexus macro taking two arguments: the glyph number of the first part (the punctum with the bar in a simple case) and the glyph number of the second part (the porrectus with no bar, already in the font), and:

  • draw the first part
  • compute the width of the bar by making a fake box with the bar glyph and measuring it
  • \kern -\barwidth (surrounded by \nobreak)
  • draw the second part

like this there will be only a small point where the bar will melt with the porrectus (it renders sometimes a little oddly in pdf viewers, but it's ok for printing) and that's all...

This makes 21 more glyphs in the font, which is more reasonable than the 7500 it would take to make the same thing only in the font...

What do you think?

@henryso
Copy link
Contributor

henryso commented Mar 27, 2015

There are other melting artifacts when viewing on screen already (like for connected episemus), so as long as it prints properly, I think it's a viable solution.

@eroux
Copy link
Contributor

eroux commented Mar 27, 2015

Correction, there might be some more subtelties with signs placement (not the most simple part of GregorioTeX)... but it shouldn't be too complex...

@eroux eroux added this to the 4.0 milestone May 6, 2015
@henryso henryso self-assigned this May 6, 2015
@eroux
Copy link
Contributor

eroux commented May 6, 2015

@henryso : a few notes: you can generate the pre-composed glyphs in squarize.py, no need to do it in gre*-base.sfd... Also, if you encounter difficulties with the final part (sign placement), don't bother, I'll do it when I'll change the rest of the sign placement (for gregoria4o)

@henryso
Copy link
Contributor

henryso commented May 6, 2015

It seems like I don't have to kern if I adjust the widths of the leading character correctly. Any disadvantages to doing it this way?

I am now running into the sign placement issue. I will admit that those numbers are a bit insane. Should we continue passing the numbers or should we switch to passing a macro that we can then compare using \ifx in the TeX code?

@eroux
Copy link
Contributor

eroux commented May 6, 2015

Good idea indeed... don't forget the \grenobreak though.

Let's stick with numbers first, and switch to some macros later on, this will be a good exercise for someone wanting to understand this part... Do you have a pull request or a branch in which I can implement it?

henryso added a commit to henryso/gregorio that referenced this issue May 6, 2015
Fixes gregorio-project#18.
Also used fused rendering for torculus resupinus figures that start with a
quilisma or an oriscus.
@henryso
Copy link
Contributor

henryso commented May 6, 2015

I created a new branch fix-18 in the main repository and pulled my changes into it.

@henryso
Copy link
Contributor

henryso commented May 6, 2015

The signs are all wrong, of course, with a torculus resupinus flexus. I think the incorrect type is getting into the function to determine the correct "number," but I have to grok the numbers before I can get the right thing into there.

@henryso
Copy link
Contributor

henryso commented May 6, 2015

I more or less understand that macro now. I should have something by the morning.

@henryso
Copy link
Contributor

henryso commented May 7, 2015

I deleted the branch and created #379 for this, since I my implementation is more or less complete.

@henryso henryso closed this as completed May 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants