For purposes of this section, let's say that <arg> marks a required argument and [arg] marks an optional argument.
For everyone's sanity, comments may only appear at line start, like so
# this is a comment # this is a comment too keyword # this is not a comment
Some of the following rules accept one or more glyphs to apply them to.
A glyph can be written literally (if it is not a "space") character or as an escape sequence.
Escape sequences start with a backslash \
character.
The following escape sequences are supported:
The backslash itself.
Newline, carriage return, and tab characters respectively (much like in most programming languages).
A 2-digit hexadecimal code point.
For example, \x20
is a space and \x71
is q
.
A 4-digit hexadecimal code point.
For example, \u0457
is ї
.
A hexadecimal code point with any number of digits.
For example, \u{457}
is ї
and \u{1F695}
is 🚕
.
For rule arguments that support multiple code points, this expands into a handful of common space characters.
These ones
0x09, // HORIZONTAL TABULATION 0x0B, // VERTICAL TABULATION 0x0C, // FORM FEED 0x20, // SPACE 0xA0, // NO-BREAK SPACE 0x1680, // OGHAM SPACE MARK 0x2000, // EN QUAD 0x2001, // EM QUAD 0x2002, // EN SPACE 0x2003, // EM SPACE 0x2004, // THREE-PER-EM SPACE 0x2005, // FOUR-PER-EM SPACE 0x2006, // SIX-PER-EM SPACE 0x2007, // FIGURE SPACE 0x2008, // PUNCTUATION SPACE 0x2009, // THIN SPACE 0x200A, // HAIR SPACE 0x202F, // NARROW NO-BREAK SPACE 0x205F, // MEDIUM MATHEMATICAL SPACE 0x3000, // IDEOGRAPHIC SPACE 0x200B, // ZERO WIDTH SPACE 0xFEFF, // ZERO WIDTH NO-BREAK SPACE
You will not receive warnings if some of these glyphs are not present in your font.
For rule arguments that support multiple code points, this expands into a range between the specified glyphs.
Hides a specific warning/error.
For example,
ignore past_ascent
will ignore the "glyph extends past ascent" warnings for all glyphs, and
ignore past_ascent |⁺
will ignore it just for |
and ⁺
.
Hides the contours inside one or more glyphs!
But their pixels will still be measured for font metrics.
New and imported fonts start with
hide \s
to hide all the space characters.
Defines a kerning pair between one or more pairs of characters!
X and (optional) Y are measured in pixels.
For example,
kern T a -1
will move a
one pixel closer when preceded by a T
, and
kern T/ ,. -1
will move ,
and .
one pixel closer if they are preceded by T
or /
(4 pairs total).
Adjusts spacing to the left of a character, measured in pixels.
For example,
left ? 1
will add one pixel of space before a ?
, and
left \u0303 -4
will move a combining tilde (like in ã) 4 pixels over the preceding letter.
This rule can also be written as lsb
if you prefer.
Adjusts spacing to the right of a character, measured in pixels.
For example,
right .?! 3
will add a 3-pixel space after the punctuation signs, and
right ( -1
will move any character closer to a (
by one pixel.
This rule can also be written as rsb
if you prefer.
Indicates glyph that should be displayed if the requested glyph wasn't found in the font.
Software quite commonly ignores this, so don't get too excited.
For example,
default_char ?
would set the default character to ?
.
Specification: MSDN