-
Notifications
You must be signed in to change notification settings - Fork 43
Adding new glyphs
Henry So edited this page Apr 11, 2015
·
4 revisions
To add a glyph that will stand by itself:
- 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
. - 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.
- In
fonts/squarize.py
add the number to theinitial_glyphs
list. - 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
:
- 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
. - 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. - 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.
- Modify
src/gregoriotex/gregoriotex.h
and add an enum to thegtex_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. - Modify
fonts/squarize.py
and add a number for the new family into theshapes
dictionary. Use the same number from thegtex_shapes
enum above. - Modify
fonts/squarize.py
to generate the shapes (exactly how depends on the shapes). - Run
fonts/squarize.py
and check the resultant fonts. Watch especially for figures which don't connect properly. - Modify the gregorio source code to parse the gabc for the new shapes, dump them properly, and generate them as GregorioTeX.