Repairing Fonts
Introduction
This results in this reporting tool are based on analysis performed using shaperglot. Shaperglot works by processing font binaries through an instance of harfbuzz to ensure that a font not only supports a given language's characterset but also renders it appropriately on-screen. Since shaperglot is analyzing binary font files it is important to be aware that the errors being reported for a given font may not necessarily be evident in the font source but may be an artifact of the font exporting process. If errors cannot be confirmed in the source file then it is worth looking into how the fonts are exported.
Interpreting Results
Support for Pan-African Latin language support is determined by evaluating the following criteria. The data shown in this reporting tool is a truncated version of the full error message reported by shaperglot. See sections below for details about errors and how to remedy these errors in a font.
- Missing Bases
- Missing Marks
- Orphaned Marks
- Un-encoded Glyph Variants
- Missing OT locl Feature
- Missing Small-Caps
The Font Results page reports the aggregated errors for all language tags tested. When a data row is selected the combined errors will be reported in the sidebar. Pressing the Breakdown button will breakout the errors for the selected font by language tag. Selecting any given data row will then report the specific errors for that language tag in the side bar. In both cases the error details can be copied to your clipboard.
Missing Bases/Missing Marks
The missing bases and missing marks test is fairly straightforward. The test compares the glyph set in a font against the exemplar character sets defined in GF Languages for a given language tag. If the glyph is missing in the font it is reported as an error. Missing marks will be shown attached to a dotted circle for cleaner presentation, however the glyph that needs to be added to a failing font is the combining mark itself.
The equivalent long form error messages from shaperglot are as follows:
Remedy
Add missing glyphs to font. If the glyphs are found to be in the font source file check to see if any subsetting routines are used to export the font. If so, ensure that the required glyphs are not excluded from the export.
Orphaned Marks
The orphaned marks test checks to see if necessary marks for a language attach to a base glyph via the OT mark feature. If the mark fails to attach to the base glyph it is reported as an error. If either the base or mark are missing in the font, then mark attachment cannot be tested. In this case, the error will be reported as "*see missing bases/marks*".
The equivalent long form error messages from shaperglot are as follows:
Remedy
Ensure that the tested base and mark glyphs have corresponding anchors defined. For "*see missing bases/marks*" errors first add all of the necessary base and mark glyphs to the font and in the proces add the appropriate anchors to each.
Guide
Below is an example of an orphaned mark error. This first two images show the cause of the error in the font source and the final image shows how to repair the font.
orphaned marks: (acutecomb to uni0259)



No Variant/Missing locl Feature
No variant and missing locl feature are related errors. The first check looks for un-encoded glyph variants that are required for certain languages. If a variant is not present in a font, this is not necessarily a failure, as the default form may be the appropriate style. The missing locl feature test checks to see if a target glyph variant is accessed via an OpenType locl feature in the font. This test only runs if the target language has a valid OpenType Lang tag. If the glyph for which a variant is being searched for is not in the font then the error will be reported as "*see notes on glyph variants*".
The equivalent long form error messages from shaperglot are as follows:
Remedy
For no variant errors use the guide below to determine if the default style of the letter matches the requirements for African languages. If not, add the appropriate variant to the font. For missing locl feature errors update the locl feature to create the proper glyph substitution using the guide below to write the necessary OT code. Refer to OT Language Tags to see a list of valid language tags. For "*see notes on glyph variants*" errors first add all of the necessary glyphs to the font then create the appropriate variants.
Guide
Overview of preferred glyph variants for African languages. If a language has a valid OT Language Tag add the following code to the locl feature.
Sample locl feature code
script latn;
language <TAG>;
sub <GLYPHNAME> by <GLYPHNAME.alt>;
Eng (014A)
For all African languages the preferred form for the uppercase Eng resembles the lowercase n. If the preferred style is already the default design in the font then no further action is necessary. If not, than the preferred style should be added to the font as an alternate.


Bhook (0181)
The uppercase Bhook used for Kpelle in Liberia resembles a Cyrillic Be with a more rounded bowl. The OT language tag for Toma is XPE.


Vhook (01B2)/vhook (028B)
The preferred style of the vhook for Toma resembles a "V" rather than the more rounded standard form. The OT language tag for Toma is TOD0.




Esh (01A9)/Ezh (01B7)
The preferred style of the uppercase esh and ezh for Ga resembles a sigma. The OT language tag for Toma is GAD.




Missing Small-Caps
The mising small-caps test check ensures that small cap versions of all exemplar characters exist in the font if the font includes a smcp OpenType feature.
The equivalent long form error messages from shaperglot are as follows:
Remedy: Add small cap versions of all glyphs reported by the error and ensure the smcp feature is updated. When adding missing small-caps be mindful of the glyph variants defined above as well as including anchors for all required diacritics.
Guide
Sample smcp feature code