Font generation
================
Gregorio works with Omega, but for TeX compatibility of the fonts, they are divided into 255 character fonts. The chant font files you'll need to install in your TeX system are now included with Gregorio, so for most people there is no need to regenerate the font files. For those interested in modifying the included chant fonts, or even developing their own, these instructions on how to generate the fonts may be helpful.

You can notice if you open gregorio-base.sfd (sfd is the native fontforge format), that there are only a few glyphs. First you must combine them to get all the glyphs (more than 1000). It is made by a quite dirty trick: a python script (squarize.py) generates a fontforge script (fontname.pe) that generates nine 255 character fonts containing all the glyphs of gregorian chant. It generates the fonts in pfb, afm, enc and tfm.

In the next steps, we create gregorio, but to create parmesan or greciliae, just replace "gregorio" by "parmesan" or "greciliae".

So for now the basic use is:

 python squarize.py gregorio
 fontforge -script gregorio.pe

The second step may take several minutes, even on a recent machine.

Then we must generate an ovp (the readable format of omega virtual font). To do so, we use the script create-ovp.perl. But this script needs the pl files corresponding to the tfm files of the fonts. So we must generate them with tftopl (included in TeXlive) :

 tftopl gregorio-0.tfm gregorio-0.pl
 tftopl gregorio-1.tfm gregorio-1.pl
 tftopl gregorio-2.tfm gregorio-2.pl
 tftopl gregorio-3.tfm gregorio-3.pl
 tftopl gregorio-4.tfm gregorio-4.pl
 tftopl gregorio-5.tfm gregorio-5.pl
 tftopl gregorio-6.tfm gregorio-6.pl
 tftopl gregorio-7.tfm gregorio-7.pl
 tftopl gregorio-8.tfm gregorio-8.pl

and then we execute the script:

 perl create-ovp.perl gregorio

It generates the ovp file. We finally need to generate usable virtual fonts: ofm and ovf. They are both generated by ovp2ovf (also included in TeXlive):

 ovp2ovf gregorio.ovp

Font and TeX installation
=========================
To install the fonts, simply execute install.py, it will look for the texmf directory of your distribution. If it doesn't find it, there is a list at the beginning of the file, where you can simply add yours. Please e-mail gregorio-devel@gna.org if your directory wasn't found by the installation script.

If you are under debian or ubuntu, and you are compiling from source, the best and most simple way to install the fonts is to build the package, with dpkg-buildpackage. You will need dpkg-dev. Just type dpkg-buildpackage in the root directory of the sources, it will tell you which packets to install, and will build you (in the parent directory) two .deb files: one containing the gregorio program (gregorio_x.y.z.deb) and the other containing the fonts (gregoriotex_x.y.z.deb). You'll just have to install the gregoriotex package to get the fonts installed and working. To install foo.deb, use dpkg -i foo.deb, with root privileges.
