-
Notifications
You must be signed in to change notification settings - Fork 43
Adding new glyphs
Henry So edited this page Apr 23, 2015
·
4 revisions
To add a glyph that will stand by itself:
- 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.
- In
fonts/squarize.py
add the number to theDIRECT_GLYPH_NAMES
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 a value to thegtex_type
enum. - Modify
fonts/squarize.py
and add a shape constant (that begins withS_
) and give it a camel-case string value made of only ASCII letters. - 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.