13508eddcSopenharmony_ci 23508eddcSopenharmony_ciTo report an issue in a Noto font, go [here](http://notofonts.github.io/reporter.html). 33508eddcSopenharmony_ci 43508eddcSopenharmony_ci## High level overview and instructions for font developers 53508eddcSopenharmony_ci 63508eddcSopenharmony_ciHere's what you need to know for general font-level work on the Noto project: 73508eddcSopenharmony_ci 83508eddcSopenharmony_ci* Each *script* in Noto gets its own repository. The script repository is based on the [noto-project-template](https://github.com/notofonts/noto-project-template) repo. If you are in the position of needing to **add a new script to Noto**, do so by visiting https://github.com/notofonts/noto-project-template and clicking the green "Use this template" button. *Make sure you click the "Include all branches" option on the page which follows.* 93508eddcSopenharmony_ci 103508eddcSopenharmony_ci* Each *family* within a script gets its own configuration file, `sources/config-<something>.yaml`. In many cases, you will want to automatically add a subset of glyphs from Noto Sans, Noto Serif or Noto Devanagari into the source UFOs. You can do this by adding the following to the configuration file: 113508eddcSopenharmony_ci 123508eddcSopenharmony_ci```yaml 133508eddcSopenharmony_ciincludeSubsets: 143508eddcSopenharmony_ci - name: "GF Glyph Sets/GF-latin-core" 153508eddcSopenharmony_ci from: "Noto Sans" 163508eddcSopenharmony_ci``` 173508eddcSopenharmony_ci 183508eddcSopenharmony_cior 193508eddcSopenharmony_ci 203508eddcSopenharmony_ci```yaml 213508eddcSopenharmony_ciincludeSubsets: 223508eddcSopenharmony_ci - from: "Noto Sans Devanagari" 233508eddcSopenharmony_ci ranges: 243508eddcSopenharmony_ci - from: 0x1CD0 253508eddcSopenharmony_ci to: 0x1CE7 263508eddcSopenharmony_ci - from: ... 273508eddcSopenharmony_ci``` 283508eddcSopenharmony_ci 293508eddcSopenharmony_ciThese subsets will be added to the font by Notobuilder, explained below. 303508eddcSopenharmony_ci 313508eddcSopenharmony_ci* Try to work on font problems in branches and make pull requests. When you work in a branch, GitHub actions will build the font, perform QA tests, and create QA reports and proof sheets. You can download these reports as a build artefact by going to the "Actions" page. 323508eddcSopenharmony_ci 333508eddcSopenharmony_ci* As well as the GitHub actions, you can trigger builds and tests manually using the Makefile: 343508eddcSopenharmony_ci - `make build` builds the font 353508eddcSopenharmony_ci - `make test` runs the fontbakery checks 363508eddcSopenharmony_ci 373508eddcSopenharmony_ci* The following QA tests are run: 383508eddcSopenharmony_ci * Fontbakery is run using the `notofonts` profile for the non-"full" builds and using the `googlefonts` profile for any outputs that are destined for Google Fonts onboarding. Fontbakery is also configured so that any [shaping tests](https://simoncozens.github.io/tdd-for-otl/) found in `qa/shaping_tests` are automatically run. 393508eddcSopenharmony_ci * The previous released version of the font is fetched and `gftools.diffenator` is run to produce a report showing the differences. As well as the glyph-level differences, any strings found in files matching `qa/*.txt` are rendered and their differences are displayed. 403508eddcSopenharmony_ci * Proof sheets are generated with `gftools-gen-html proof`. 413508eddcSopenharmony_ci 423508eddcSopenharmony_ci* In addition, the artefacts (latest font builds and QA reports) from the current `main` branch are published on the repository's GitHub Pages site. (see e.g. https://notofonts.github.io/vithkuqi/) 433508eddcSopenharmony_ci 443508eddcSopenharmony_ci* Repositories are organised by *script* but releases are organised by *family*. **When it's time to create a new release**, push a new tag of the form `<Family>-v<Version>` (e.g. `NotoSansBengali-v2.002`). If everything goes well, the release GitHub Action will then: 453508eddcSopenharmony_ci * Build and test the font. 463508eddcSopenharmony_ci * Create a GitHub Release including a Zip file of font binaries. 473508eddcSopenharmony_ci * Create a PR to Google Fonts to onboard the new release. 483508eddcSopenharmony_ci 493508eddcSopenharmony_ci> Note that the action to produce the Google Fonts PR requires the organisational secrets `SSH_KEY` and `USER_GITHUB_TOKEN` to be set, and the `category` key to be set correctly in each `config.yaml` file. 503508eddcSopenharmony_ci 513508eddcSopenharmony_ci## Build, QA and onboarding automation 523508eddcSopenharmony_ci 533508eddcSopenharmony_ciAll of the above is wonderful if everything works. Here's what you need to know if there are problems with the build process itself. 543508eddcSopenharmony_ci 553508eddcSopenharmony_ciThe main design goal for the build process has been *forward compatibility*. In other words, providing a consistent build experience across all Noto script project repositories while ensuring that any changes which need to be made to the build or its environment do not need to be repeated across all 150+ repos. 563508eddcSopenharmony_ci 573508eddcSopenharmony_ciThe main way this is achieved is through the [notobuilder](https://github.com/notofonts/notobuilder) repository. All script repositories use notobuilder, which provides: 583508eddcSopenharmony_ci 593508eddcSopenharmony_ci* The GitHub workflows which control building (`build.yaml`) and releasing (`release.yaml`). 603508eddcSopenharmony_ci* A declaration (through its `setup.py`) of the Python dependencies and their versions used to build all Noto fonts. 613508eddcSopenharmony_ci* The build process itself. (We will discuss below why Noto needs its own bulid process!) 623508eddcSopenharmony_ci* The QA process. 633508eddcSopenharmony_ci 643508eddcSopenharmony_ciThe aim is that Noto project repositories would pull the latest version of this 653508eddcSopenharmony_cirepository and use to get the latest actions as well as to use it to build the fonts; this means that both the way that font building happens, and the required versions of fonttools, fontmake, etc., can all be defined and updated in one single place, and also that any updates to the build methodology or the required versions will be automatically carried over to new builds. 663508eddcSopenharmony_ci 673508eddcSopenharmony_ci### notobuilder 683508eddcSopenharmony_ci 693508eddcSopenharmony_ciThe `Notobuilder` class is a subclass of [GFBuilder](https://github.com/googlefonts/gftools), 703508eddcSopenharmony_cibut with certain modifications to suit the Noto workflow. 713508eddcSopenharmony_ci 723508eddcSopenharmony_ci* We expect a certain directory structure for the output files: 733508eddcSopenharmony_ci - `fonts/<family>/unhinted/variable-ttf` 743508eddcSopenharmony_ci - `fonts/<family>/unhinted/otf` 753508eddcSopenharmony_ci - `fonts/<family>/unhinted/ttf` 763508eddcSopenharmony_ci - `fonts/<family>/hinted/ttf` 773508eddcSopenharmony_ci* In Noto, we produce unhinted and hinted versions of the font; hinted versions 783508eddcSopenharmony_ciare produced by trying to run ttfautohint with an appropriate script (`-D`) flag. (If autohinting fails, the unhinted font is copied to the hinted font path without erroring out.) 793508eddcSopenharmony_ci* We try to produce a variable font by default but also don't error out if that fails. 803508eddcSopenharmony_ci* We also (based on a configuration file) use UFO merging to add subsets of Noto Sans, Noto Serif or Noto Sans Devanagari into the sources to produce a "full" build of the font. 813508eddcSopenharmony_ci 823508eddcSopenharmony_ciAs these are Noto-specific process requirements they have not been merged into the upstream GFBuilder. 833508eddcSopenharmony_ci 843508eddcSopenharmony_ci### notoqa 853508eddcSopenharmony_ci 863508eddcSopenharmony_ciThis Python module defines the process used to test Noto fonts. In a similar vein to [notobuilder](https://github.com/notofonts/notobuilder/), the point is that we define the test procedures in one location, and all project repositories automatically receive updated versions of the test protocols when this repository changes. 873508eddcSopenharmony_ci 883508eddcSopenharmony_ciIt defines two kind of tests: 893508eddcSopenharmony_ci 903508eddcSopenharmony_ci* `python -m notoqa` runs fontbakery checks on each family, and is used to implement the `make test` target in the project repository Makefile. 913508eddcSopenharmony_ci 923508eddcSopenharmony_ci* `python -m notoqa.regression` downloads the latest release of the family and runs regression tests between the current build and the previous, using `gftools.qa`. 933508eddcSopenharmony_ci 94