Skip to content

Adding New Neume Fonts

Elias Zolotas edited this page Aug 12, 2021 · 3 revisions

Kassia will search the fonts folder for neume fonts. Only the TTF format is supported, due to a limitation by an underlying library (ReportLab). If a font is broken up into multiple files, place them all in a folder with the font family name. See New Stathis as an example.

Font Configuration Files

Each neume font also needs to be accompanied by two font configuration files: glyphnames.yaml and classes.yaml. These configuration files must be placed in the same folder as the neume font.

Font Configuration Format

glyphnames.yaml

This file contains neume names. See the Font Table page for accepted neume names. If a font is split across multiple files, family should be the specific name of the font where the neume is found. codepoint is the key-stroke. description is an optional description of the neume. component_glyphs is an optional list of neumes that make up this neume (ligature).

ken2:
  family: "KA New Stathis Main"
  codepoint: "`"
  description: "kentemata"
olig:
  family: "KA New Stathis Main"
  codepoint: '1'
  description: "oligon"
spec-olig-kentD:
  family: "KA New Stathis Main"
  codepoint: '2'
  component_glyphs:
    - olig
    - kent

classes.yaml

This file contains categories of neumes. See the New Stathis implementation for an example of how your classes.yaml file should be structured.

family_name:
  The Font Family Name Goes Here

# A list of neumes that can take lyrics below them
takes_lyric:
  - olig
  - ison
  - etc.

# A list of neumes that can be a 'base neume' (other neumes could be placed on it). Each neume chunk only has one base neume.
standalone:
  - olig
  - ison
  - etc.

# A list of neumes that should be attached to the neume chunk that follows (ex: bareia). A line break will not occur between this neume and the next neume.
keep_with_next:
  - bare
  - etc.

# Used primarily for lyric centering under syneches elaphron. If not specified, Kassia will attempt to calculate apostrophos width. Positive values are for moving lyrics to the right. The value will be multiplied by the neume font size.
lyric_offsets:
  neume_name: 0.792

# Sharps, flats, and fthores. These can all be colored red or some other color.
accidentals:
  - flatU
  - flatU2R2
  - flat1U
  - flat1U2R2
  - flat2U
  - flat2U2R2
  - sharpD
  - sharpDR
  - sharpD2
  - sharp1D
  - sharp1DR
  - sharp2D
  - sharp2DR

# Martyriae that are meant to be stacked.
martyriae:
  - mpa
  - mzygos
  - mspathi
  - etc.

# A list of tempo marking neumes (Greek letter χ with gorgon, trigorgon, etc. above it).
tempo_markings:
  - chitria
  - chidiar
  - chihemi
  - etc.

# A list of neumes that specify a rest.
rests:
  - res1
  - res2
  - etc.

# Optional ligatures that can be turned on or off. This is currently not used.
optional_ligatures:
  apos_apos:
    component_glyphs:
      - apos
      - apos
  ison_apos:
    component_glyphs:
      - ison
      - apos

# Special glyphs that are applied only if certain conditions are met (base neume matches, component glyphs follow, etc.
# base_neume: A list of possible base neumes for condition to be met.
# component_glyphs: A list of glyphs that must follow base for condition to be met.
# replace_glyph: The glyph to be replaced.
# draw_glyph: The glyph to draw in place of the 'replace_glyph'.
conditional_neumes:
  spec-hypo-haplD:
    base_neume:
      - hypo
    component_glyphs:
      - diplD
    replace_glyph:
      diplD
    draw_glyph:
      spec-apos-diplD