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

To add a glyph that will stand by itself:

  1. Create a new character and give it an appropriate camel-case name. Do this for all three base fonts, using the same name in each font.
  2. In fonts/squarize.py add the number to the DIRECT_GLYPH_NAMES list.
  3. 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 a value to the gtex_type enum.
  5. Modify fonts/squarize.py and add a shape constant (that begins with S_) and give it a camel-case string value made of only ASCII letters.
  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