gregorio-project / gregorio

The Gregorio Project
http://gregorio-project.github.io
Other
164 stars 43 forks source link

Magic spaces #1521

Closed rpspringuel closed 3 years ago

rpspringuel commented 3 years ago

While working on #1491 I found a magic space and while looking to fix that, I've found a couple of more:

gregoriotex-signs.tex:1213:\gre@dimen@temp@three=\dimexpr(3700sp * \gre@factor)\relax % gregoriotex-signs.tex:1215:\gre@dimen@temp@three=\dimexpr(4500sp * \gre@factor)\relax% gregoriotex-signs.tex:1218:\gre@dimen@temp@three=\dimexpr(2500sp * \gre@factor)\relax % gregoriotex-spaces.tex:173:\global\gre@dimen@stafflineheight=\dimexpr(1500 sp * \gre@stafflinefactor)\relax % gregoriotex-spaces.tex:182:\global\gre@dimen@interstafflinespace=\dimexpr((31500sp * \gre@factor) % gregoriotex-spaces.tex:220:\global\gre@dimen@constantglyphraise = \dimexpr((-22000 sp * \gre@factor) % gregoriotex-spaces.tex:815:\global\gre@dimen@glyphraisevalue = \dimexpr(15750 sp * \gre@factor * \gre@count@temp@three)\relax % gregoriotex-spaces.tex:999:\global\gre@dimen@additionaltopspace=\dimexpr(15750 sp * \gre@count@temp@one * \gre@factor)\relax % gregoriotex-spaces.tex:1006:\global\gre@dimen@additionaltopspacealt=\dimexpr(15750 sp * \gre@count@temp@one * \gre@factor)\relax % gregoriotex-spaces.tex:1013:\global\gre@dimen@additionaltopspacenabc=\dimexpr(15750 sp * \gre@count@temp@one * \gre@factor)\relax %

The ones in gregoriotex-spaces.tex all appear to be related to the staff lines (the distance between them, their thickness, the vertical distance between note positions, etc.). The ones in gregoriotex-signs.tex seem to be related to positioning the mora after a punctum inclinatum.

Should I convert all these to configurable dimensions, or should they remain as hard-coded internal values? In either case, I'm going to try to work out the sensical relations between the numbers and store them in registers so that they can be referred to by name.

henryso commented 3 years ago

I think some of these, at least, are properties of assumptions on the font size. In my opinion, those should not be configured via gsp-default. Font related spaces should be modified along with selecting such a font. I don't think we are in a good position to support this generically yet. Work has already been done to support the Solesmes fonts which is the IP of the monastery, and such a mechanism should probably build on that.

rpspringuel commented 3 years ago

That makes sense. Is the existing work to support the Solesmes fonts in any of the repositories?

henryso commented 3 years ago

Yes, the work was already integrated by Elie. Basically, the Solesmes fonts have a different scale than the gregorio fonts. The adjustments to make everything sane are already in, at least enough to support the Solesmes fonts.

rpspringuel commented 3 years ago

Okay, then what I'm going to do is name the magic distances, put their definitions near the font selection code, and identify the distances as "font calibration distances." That should make it clear what they're for and put them into the place where someone who is working on making a new font compatible with GregorioTeX is likely to look for them.

henryso commented 3 years ago

Sounds like a plan.