Skip to content
Henry So edited this page Apr 11, 2015 · 4 revisions

To add a glyph that will stand by itself:

  1. Find a free slot in the base fonts which starts with an underscore and has four digits. These numbers are enumerated in src/gregoriotex/gregoriotex-write.c.
  2. Create a new character and give it the appropriate name (underscore and four digits). Do this for all three base fonts, using the same name in each font.
  3. In fonts/squarize.py add the number to the initial_glyphs list.
  4. Modify the gregorio source code to parse the gabc for the new glyph, dump it properly, and generate it in as GregorioTeX.

To add a family of glyphs generated by fonts/squarize.py:

  1. Typically, you will need to create a base form. Find another glyph similar to the form you are creating to copy/imitate. Name the base form {something}base.
  2. If the base form changes depending on ambitus, you will need multiple base forms. Again, try to find similar glyphs. Name these base forms {something}base{n}, where {n} is the ambitus.
  3. When creating the glyphs, if possible, make sure the "posts" which connect to "lines" are in the same place and are of the same width as other figures.
  4. Modify src/gregoriotex/gregoriotex.h and add an enum to the gtex_shapes enum. Be careful to space out the numbers. If the last shape is a short glyph, add 1. If the last shape is a long glyph with only partial generation of liquescentia, add 2, If the last shape is a long glyph with full generation of liquescentia, add 4. Refer to the comments in this file for more information.
  5. Modify fonts/squarize.py and add a number for the new family into the shapes dictionary. Use the same number from the gtex_shapes enum above.
  6. Modify fonts/squarize.py to generate the shapes (exactly how depends on the shapes).
  7. Run fonts/squarize.py and check the resultant fonts. Watch especially for figures which don't connect properly.
  8. Modify the gregorio source code to parse the gabc for the new shapes, dump them properly, and generate them as GregorioTeX.
Clone this wiki locally