SIL Font Development Guide

How to build, modify, and contribute to SIL International font projects

View project onGitHub

3. Repository Structures

Our projects use a consistent directory structure for both our source repositories and release packages. So, if you know your way around one of our projects, you can easily understand all of them. We’d be happy to see others adopt this overall structure, too, so please consider it for your projects.

We talk about repositories because our project directory structures and all the (important) files they contain are tracked with git. We make our repositories available on GitHub, but there’s nothing about our structures or processes that depends on that hosting service.

Each of our projects (which usually contain only a single font family) use a single dedicated project folder that contains all the font sources, so that it remains self-contained. If any common files are shared among multiple projects, then dedicated tools and corresponding documentation will be available inside the project to do a manual synchronisation so that one source checkout always gives you everything you need.

Our convention is to name the project folder font-name-of-font-family as in font-andika-mtihani.

Example structure

Here is an annotated example of our project repository structure based on Andika Mtihani’s public git repository. Files that we normally have in all projects are in bold. All others are optional and may differ from project to project. Files and folders not in the Andika Mtihani project are in (parentheses) and are provided as a guide to other projects.

  • .gitattributesgit attributes configuration hidden file tailored for font projects
  • .gitignoregit ignore configuration hidden file tailored for font projects
  • FONTLOG.txtfont design and engineering-oriented changelog
  • OFL-FAQ.txtFrequently Asked Questions file for the SIL Open Font License
  • OFL.txtSIL Open Font License file with the copyright statement(s) in its header
  • preflightnormalization script to be run before testing/committing a change
  • preflightgscript to produce and normalize UFOs from a Glyphs file
  • preflightflscript to produce and normalize UFOs from a FontLab-produced UFO
  • preflightffscript to produce and normalize UFOs from a Fontforge-produced UFO
  • preglyphsscript to produce temporary Glyphs files from UFOs+designspace
  • README.mdmarkdown file with minimal information
  • README.txtmore complete README file describing the font project
  • wscriptSmith configuration used for building, testing and releasing
  • ( documentation/ — folder for user documentation )
  • source/folder for containing UFOs, designspaces, smart code sources, etc
    • ( AndikaMtihani.feax — OpenType feature code including SIL extensions to .fea )
    • AndikaMtihani-Bold.ufo
    • AndikaMtihani-BoldItalic.ufo
    • AndikaMtihani-Italic.ufo
    • AndikaMtihani-Regular.ufo
    • AndikaMtihaniItalic.designspace — designspace definition for Italic & Bold Italic
    • AndikaMtihaniRoman.designspacedesignspace definition for Regular & Bold
    • composites.txt — composite character definitions
    • glyph_data.csvglyph-specific data such as production glyph names and glyph orders
    • archive/ — folder for legacy formats if needed for archival purposes
    • ( graphite/ — folder for Graphite source code )
    • logs/ — folder for log files, only needed as a placeholder to make tools happy
    • ( masters/ — folder for master UFOs for projects involving interpolated instances )
  • tests/folder for various test documents and data files
  • references/folder for font binaries used for regression testing
  • ( tools/ — folder for project-specific scripts and utilities )
    • ( fontbakery/ — folder for project-specific fontbakery checks )
    • ( lib/ — folder for project-specific libraries )
  • ( web/ — example files for self-hosted webfonts )

Ignored files: temporary files, generated files

By default, the results generated by a build (including the fonts, various reports and log files) will appear in a separate results/ folder not stored in the git repository. Temporary files and generated artifacts like backups, logs, test results, specimens, etc. are not stored in the git repository and are set to be ignored via the .gitignore configuration file. There is some flexibility though, as certain source files are generated or modified by scripts at various times in the lifecycle of a project.